#include <itkResampleImageFilter.h>
Inheritance diagram for itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >:
Public Types | |
typedef ResampleImageFilter | Self |
typedef ImageToImageFilter< TInputImage, TOutputImage > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef TInputImage | InputImageType |
typedef TOutputImage | OutputImageType |
typedef InputImageType::Pointer | InputImagePointer |
typedef InputImageType::ConstPointer | InputImageConstPointer |
typedef OutputImageType::Pointer | OutputImagePointer |
typedef InputImageType::RegionType | InputImageRegionType |
typedef Transform< TInterpolatorPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) | TransformType ) |
typedef TransformType::ConstPointer | TransformPointerType |
typedef MatrixOffsetTransformBase< TInterpolatorPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) | LinearTransformType ) |
typedef LinearTransformType::ConstPointer | LinearTransformPointerType |
typedef IdentityTransform< TInterpolatorPrecisionType, itkGetStaticConstMacro(ImageDimension) | IdentityTransformType ) |
typedef IdentityTransformType::ConstPointer | IdentityTransformPointerType |
typedef InterpolateImageFunction< InputImageType, TInterpolatorPrecisionType > | InterpolatorType |
typedef InterpolatorType::Pointer | InterpolatorPointerType |
typedef Size< itkGetStaticConstMacro(ImageDimension) | SizeType ) |
typedef TOutputImage::IndexType | IndexType |
typedef InterpolatorType::PointType | PointType |
typedef TOutputImage::PixelType | PixelType |
typedef TInputImage::PixelType | InputPixelType |
typedef TOutputImage::RegionType | OutputImageRegionType |
typedef TOutputImage::SpacingType | SpacingType |
typedef TOutputImage::PointType | OriginPointType |
typedef TInputImage::DirectionType | DirectionType |
Public Member Functions | |
virtual const char * | GetNameOfClass () const |
virtual void | SetTransform (const TransformType *_arg) |
virtual const TransformType * | GetTransform () |
virtual void | SetInterpolator (InterpolatorType *_arg) |
virtual const InterpolatorType * | GetInterpolator () |
virtual void | SetSize (SizeType _arg) |
virtual const SizeType & | GetSize () |
virtual void | SetDefaultPixelValue (PixelType _arg) |
virtual PixelType | GetDefaultPixelValue () |
virtual const SpacingType & | GetOutputSpacing () |
virtual const PointType & | GetOutputOrigin () |
virtual void | SetOutputStartIndex (IndexType _arg) |
virtual const IndexType & | GetOutputStartIndex () |
virtual void | SetUseReferenceImage (bool _arg) |
virtual void | UseReferenceImageOn () |
virtual void | UseReferenceImageOff () |
virtual bool | GetUseReferenceImage () |
virtual void | GenerateOutputInformation () |
virtual void | GenerateInputRequestedRegion () |
virtual void | BeforeThreadedGenerateData () |
virtual void | AfterThreadedGenerateData () |
unsigned long | GetMTime (void) const |
itkStaticConstMacro (ImageDimension, unsigned int, TOutputImage::ImageDimension) | |
itkStaticConstMacro (InputImageDimension, unsigned int, TInputImage::ImageDimension) | |
virtual void | SetOutputSpacing (SpacingType _arg) |
virtual void | SetOutputSpacing (const double *values) |
virtual void | SetOutputOrigin (PointType _arg) |
virtual void | SetOutputOrigin (const double *values) |
virtual void | SetOutputDirection (DirectionType _arg) |
virtual const DirectionType & | GetOutputDirection () |
void | SetOutputParametersFromImage (typename OutputImageType::Pointer Image) |
void | SetReferenceImage (TOutputImage *image) |
virtual TOutputImage * | GetReferenceImage () |
Static Public Member Functions | |
Pointer | New () |
Protected Member Functions | |
ResampleImageFilter () | |
~ResampleImageFilter () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId) |
void | NonlinearThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId) |
void | LinearThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId) |
ResampleImageFilter resamples an existing image through some coordinate transform, interpolating via some image function. The class is templated over the types of the input and output images.
Note that the choice of interpolator function can be important. This function is set via SetInterpolator(). The default is itk::LinearInterpolateImageFunction<InputImageType, TInterpolatorPrecisionType>, which is reasonable for ordinary medical images. However, some synthetic images have pixels drawn from a finite prescribed set. An example would be a mask indicating the segmentation of a brain into a small number of tissue types. For such an image, one does not want to interpolate between different pixel values, and so itk::NearestNeighborInterpolateImageFunction< InputImageType, TCoordRep > would be a better choice.
Output information (spacing, size and direction) for the output image should be set. This information has the normal defaults of unit spacing, zero origin and identity direction. Optionally, the output information can be obtained from a reference image. If the reference image is provided and UseReferenceImage is On, then the spacing, origin and direction of the reference image will be used.
Since this filter produces an image which is a different size than its input, it needs to override several of the methods defined in ProcessObject in order to properly manage the pipeline execution model. In particular, this filter overrides ProcessObject::GenerateInputRequestedRegion() and ProcessObject::GenerateOutputInformation().
This filter is implemented as a multithreaded filter. It provides a ThreadedGenerateData() method for its implementation.
Definition at line 71 of file itkResampleImageFilter.h.
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 79 of file itkResampleImageFilter.h. |
|
Definition at line 144 of file itkResampleImageFilter.h. |
|
Definition at line 118 of file itkResampleImageFilter.h. |
|
IdentityTransform typedef. If the transform being used is an IdentityTransform, the we can use a fast path. Definition at line 117 of file itkResampleImageFilter.h. |
|
Image index typedef. Definition at line 128 of file itkResampleImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 83 of file itkResampleImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 82 of file itkResampleImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 85 of file itkResampleImageFilter.h. |
|
Some convenient typedefs. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 80 of file itkResampleImageFilter.h. |
|
Definition at line 136 of file itkResampleImageFilter.h. |
|
Definition at line 122 of file itkResampleImageFilter.h. |
|
Interpolator typedef. Definition at line 121 of file itkResampleImageFilter.h. |
|
Definition at line 113 of file itkResampleImageFilter.h. |
|
MatrixOffsetTransform typedef. If the transform being used is a subclass of MatrixOffsetTransform, then we can use a fast path. Definition at line 112 of file itkResampleImageFilter.h. |
|
Definition at line 143 of file itkResampleImageFilter.h. |
|
Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 84 of file itkResampleImageFilter.h. |
|
Typedef to describe the output image region type. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 139 of file itkResampleImageFilter.h. |
|
Some convenient typedefs. Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 81 of file itkResampleImageFilter.h. |
|
Image pixel value typedef. Definition at line 135 of file itkResampleImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 78 of file itkResampleImageFilter.h. |
|
Image point typedef. Definition at line 131 of file itkResampleImageFilter.h. |
|
Standard class typedefs. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 76 of file itkResampleImageFilter.h. |
|
Image size typedef. Definition at line 125 of file itkResampleImageFilter.h. |
|
Image spacing,origin and direction typedef Definition at line 142 of file itkResampleImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 77 of file itkResampleImageFilter.h. |
|
Definition at line 107 of file itkResampleImageFilter.h. |
|
Transform typedef.
Definition at line 106 of file itkResampleImageFilter.h. |
|
|
|
Definition at line 263 of file itkResampleImageFilter.h. |
|
This method is used to set the state of the filter after multi-threading. Reimplemented from itk::ImageSource< TOutputImage >. |
|
This method is used to set the state of the filter before multi-threading. Reimplemented from itk::ImageSource< TOutputImage >. |
|
ResampleImageFilter needs a different input requested region than the output requested region. As such, ResampleImageFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
ResampleImageFilter produces an image which is a different size than its input. As such, it needs to provide an implementation for GenerateOutputInformation() in order to inform the pipeline execution model. The original documentation of this method is below.
Reimplemented from itk::ProcessObject. |
|
Get the pixel value when a transformed pixel is outside of the image |
|
Get a pointer to the interpolator function. |
|
Method Compute the Modified Time based on changed to the components. Reimplemented from itk::Object. |
|
Run-time type information (and related methods). Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
Set the output direciton cosine matrix. |
|
Get the output image origin. |
|
Get the output image spacing. |
|
Get the start index of the output largest possible region. |
|
Copy the output information from another Image. By default, the information is specified with the SetOutputSpacing, Origin, and Direction methods. UseReferenceImage must be On and a Reference image must be present to override the defaul behavior. |
|
Get the size of the output image. |
|
Get a pointer to the coordinate transform. |
|
|
|
Number of dimensions. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
Number of dimensions. |
|
Implementation for resampling that works for with linear transformation types. |
|
Method for creation through the object factory. Reimplemented from itk::Object. |
|
Default implementation for resampling that works for any transformation type. |
|
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
Set the pixel value when a transformed pixel is outside of the image. The default default pixel value is 0. |
|
Set the interpolator function. The default is itk::LinearInterpolateImageFunction<InputImageType, TInterpolatorPrecisionType>. Some other options are itk::NearestNeighborInterpolateImageFunction (useful for binary masks and other images with a small number of possible pixel values), and itk::BSplineInterpolateImageFunction (which provides a higher order of interpolation). |
|
Set the output direciton cosine matrix. |
|
Set the output image origin. |
|
Set the output image origin. |
|
Helper method to set the output parameters based on this image Definition at line 202 of file itkResampleImageFilter.h. |
|
Set the output image spacing. |
|
Set the output image spacing. |
|
Set the start index of the output largest possible region. The default is an index of all zeros. |
|
Copy the output information from another Image. By default, the information is specified with the SetOutputSpacing, Origin, and Direction methods. UseReferenceImage must be On and a Reference image must be present to override the defaul behavior. Definition at line 220 of file itkResampleImageFilter.h. |
|
Set the size of the output image. |
|
Set the coordinate transformation. Set the coordinate transform to use for resampling. Note that this must be in index coordinates and is the output-to-input transform, NOT the input-to-output transform that you might naively expect. The default is itk::AffineTransform<TInterpolatorPrecisionType, ImageDimension>. |
|
|
|
ResampleImageFilter can be implemented as a multithreaded filter. Therefore, this implementation provides a ThreadedGenerateData() routine which is called for each processing thread. The output image data is allocated automatically by the superclass prior to calling ThreadedGenerateData(). ThreadedGenerateData can only write to the portion of the output image specified by the parameter "outputRegionForThread" Reimplemented from itk::ImageSource< TOutputImage >. |
|
|
|
|