Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType > Class Template Reference
[Geometric Transformation Filters]

Resample an image via a coordinate transform. More...

#include <itkResampleImageFilter.h>

Inheritance diagram for itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >:

Inheritance graph
[legend]
Collaboration diagram for itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ResampleImageFilter Self
typedef ImageToImageFilter<
TInputImage, TOutputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TInputImage InputImageType
typedef TOutputImage OutputImageType
typedef InputImageType::Pointer InputImagePointer
typedef OutputImageType::Pointer OutputImagePointer
typedef InputImageType::RegionType InputImageRegionType
typedef Transform< TInterpolatorPrecisionType,
itkGetStaticConstMacro(ImageDimension),
itkGetStaticConstMacro(ImageDimension) 
TransformType )
typedef TransformType::Pointer TransformPointerType
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 TOutputImage::RegionType OutputImageRegionType
typedef TOutputImage::SpacingType SpacingType
typedef TOutputImage::PointType OriginPointType

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (ImageDimension, unsigned int, TOutputImage::ImageDimension)
virtual void SetTransform (TransformType *_arg)
virtual TransformTypeGetTransform ()
virtual void SetInterpolator (InterpolatorType *_arg)
virtual InterpolatorTypeGetInterpolator ()
virtual void SetSize (SizeType _arg)
virtual const SizeTypeGetSize ()
virtual void SetDefaultPixelValue (PixelType _arg)
virtual PixelType GetDefaultPixelValue ()
virtual const SpacingTypeGetOutputSpacing ()
virtual const PointTypeGetOutputOrigin ()
virtual void SetOutputStartIndex (IndexType _arg)
virtual const IndexTypeGetOutputStartIndex ()
virtual void GenerateOutputInformation ()
virtual void GenerateInputRequestedRegion ()
virtual void BeforeThreadedGenerateData ()
unsigned long GetMTime (void) const
virtual void SetOutputSpacing (SpacingType _arg)
virtual void SetOutputSpacing (const double values[ImageDimension])
virtual void SetOutputOrigin (PointType _arg)
virtual void SetOutputOrigin (const double values[ImageDimension])

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)

Detailed Description

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
class itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >

Resample an image via a coordinate transform.

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.

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 62 of file itkResampleImageFilter.h.


Member Typedef Documentation

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef SmartPointer<const Self> itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::ConstPointer
 

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 70 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TOutputImage::IndexType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::IndexType
 

Image index typedef. Definition at line 103 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef InputImageType::Pointer itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::InputImagePointer
 

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 73 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef InputImageType::RegionType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::InputImageRegionType
 

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 75 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TInputImage itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::InputImageType
 

Some convenient typedefs.

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 71 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef InterpolatorType::Pointer itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::InterpolatorPointerType
 

Definition at line 97 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef InterpolateImageFunction<InputImageType, TInterpolatorPrecisionType> itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::InterpolatorType
 

Interpolator typedef. Definition at line 96 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TOutputImage::PointType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::OriginPointType
 

Definition at line 117 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef OutputImageType::Pointer itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::OutputImagePointer
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 74 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TOutputImage::RegionType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::OutputImageRegionType
 

Typedef to describe the output image region type.

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 113 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TOutputImage itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::OutputImageType
 

Some convenient typedefs.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 72 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TOutputImage::PixelType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::PixelType
 

Image pixel value typedef. Definition at line 110 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef SmartPointer<Self> itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::Pointer
 

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 69 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef InterpolatorType::PointType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::PointType
 

Image point typedef. Definition at line 106 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef ResampleImageFilter itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::Self
 

Standard class typedefs.

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 67 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef Size<itkGetStaticConstMacro(ImageDimension) itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SizeType)
 

Image size typedef. Definition at line 100 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TOutputImage::SpacingType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SpacingType
 

Image spacing typedef Definition at line 116 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef ImageToImageFilter<TInputImage,TOutputImage> itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::Superclass
 

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

Definition at line 68 of file itkResampleImageFilter.h.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef TransformType::Pointer itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::TransformPointerType
 

Definition at line 93 of file itkResampleImageFilter.h.

Referenced by itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter().

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
typedef Transform<TInterpolatorPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::TransformType)
 

Transform typedef.

Todo:
Check that input and output images have the same number of dimensions; this is required by the current implementation of AffineTransform.
Definition at line 92 of file itkResampleImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::ResampleImageFilter  )  [protected]
 

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::~ResampleImageFilter  )  [inline, protected]
 

Definition at line 199 of file itkResampleImageFilter.h.

References itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::IndexType, itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::InterpolatorPointerType, itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::OutputImageRegionType, itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::PixelType, itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::PointType, itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::Self, itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SizeType, itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SpacingType, and itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::TransformPointerType.


Member Function Documentation

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::BeforeThreadedGenerateData  )  [virtual]
 

This method is used to set the state of the filter before multi-threading.

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GenerateInputRequestedRegion  )  [virtual]
 

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.

See also:
ProcessObject::GenerateInputRequestedRegion()

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GenerateOutputInformation  )  [virtual]
 

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.

See also:
ProcessObject::GenerateOutputInformaton()

Reimplemented from itk::ProcessObject.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual const char* itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetClassName  )  const [virtual]
 

Run-time type information (and related methods).

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual PixelType itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetDefaultPixelValue  )  [virtual]
 

Get the pixel value when a transformed pixel is outside of the image

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual InterpolatorType* itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetInterpolator  )  [virtual]
 

Get a pointer to the interpolator function.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
unsigned long itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetMTime void   )  const [virtual]
 

Method Compute the Modified Time based on changed to the components.

Reimplemented from itk::Object.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual const PointType& itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetOutputOrigin  )  [virtual]
 

Get the output image origin.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual const SpacingType& itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetOutputSpacing  )  [virtual]
 

Get the output image spacing.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual const IndexType& itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetOutputStartIndex  )  [virtual]
 

Get the start index of the output largest possible region.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual const SizeType& itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetSize  )  [virtual]
 

Get the size of the output image.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual TransformType* itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::GetTransform  )  [virtual]
 

Get a pointer to the coordinate transform.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::itkStaticConstMacro ImageDimension  ,
unsigned  int,
TOutputImage::ImageDimension 
 

Number of dimensions.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
Pointer itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

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 >.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetDefaultPixelValue PixelType  _arg  )  [virtual]
 

Set the pixel value when a transformed pixel is outside of the image. The default default pixel value is 0.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetInterpolator InterpolatorType _arg  )  [virtual]
 

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).

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetOutputOrigin const double  values[ImageDimension]  )  [virtual]
 

Set the output image origin.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetOutputOrigin PointType  _arg  )  [virtual]
 

Set the output image origin.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetOutputSpacing const double  values[ImageDimension]  )  [virtual]
 

Set the output image spacing.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetOutputSpacing SpacingType  _arg  )  [virtual]
 

Set the output image spacing.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetOutputStartIndex IndexType  _arg  )  [virtual]
 

Set the start index of the output largest possible region. The default is an index of all zeros.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetSize SizeType  _arg  )  [virtual]
 

Set the size of the output image.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
virtual void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::SetTransform TransformType _arg  )  [virtual]
 

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>.

template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType = double>
void itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType >::ThreadedGenerateData const OutputImageRegionType outputRegionForThread,
int  threadId
[protected, virtual]
 

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"

See also:
ImageToImageFilter::ThreadedGenerateData(), ImageToImageFilter::GenerateData()

Reimplemented from itk::ImageSource< TOutputImage >.


The documentation for this class was generated from the following file:
Generated at Sun Apr 1 02:57:46 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000