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

itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField > Class Template Reference
[Geometric Transformation Filters]

Warps an image using an input deformation field. More...

#include <itkWarpImageFilter.h>

Inheritance diagram for itk::WarpImageFilter:

Inheritance graph
[legend]
Collaboration diagram for itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef WarpImageFilter Self
typedef ImageToImageFilter<
TInputImage, TOutputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TOutputImage::RegionType OutputImageRegionType
typedef Superclass::InputImageType InputImageType
typedef Superclass::InputImagePointer InputImagePointer
typedef Superclass::OutputImageType OutputImageType
typedef Superclass::OutputImagePointer OutputImagePointer
typedef Superclass::InputImageConstPointer InputImageConstPointer
typedef OutputImageType::IndexType IndexType
typedef OutputImageType::SizeType SizeType
typedef OutputImageType::PixelType PixelType
typedef TDeformationField DeformationFieldType
typedef DeformationFieldType::Pointer DeformationFieldPointer
typedef DeformationFieldType::PixelType DisplacementType
typedef double CoordRepType
typedef InterpolateImageFunction<
InputImageType, CoordRepType
InterpolatorType
typedef InterpolatorType::Pointer InterpolatorPointer
typedef LinearInterpolateImageFunction<
InputImageType, CoordRepType
DefaultInterpolatorType
typedef Point< CoordRepType,
itkGetStaticConstMacro(ImageDimension) 
PointType )

Public Methods

virtual const char * GetClassName () const
 itkStaticConstMacro (ImageDimension, unsigned int, TOutputImage::ImageDimension)
void SetDeformationField (DeformationFieldType *field)
DeformationFieldTypeGetDeformationField (void)
virtual void SetInterpolator (InterpolatorType *_arg)
virtual InterpolatorTypeGetInterpolator ()
virtual void SetOutputSpacing (const double values[ImageDimension])
const double * GetOutputSpacing ()
virtual void SetOutputOrigin (const double values[ImageDimension])
const double * GetOutputOrigin ()
virtual void SetEdgePaddingValue (PixelType _arg)
virtual PixelType GetEdgePaddingValue ()
virtual void GenerateOutputInformation ()
virtual void GenerateInputRequestedRegion ()
virtual void BeforeThreadedGenerateData ()

Static Public Methods

Pointer New ()

Protected Methods

 WarpImageFilter ()
 ~WarpImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId)

Detailed Description

template<class TInputImage, class TOutputImage, class TDeformationField>
class itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >

Warps an image using an input deformation field.

WarpImageFilter warps an existing image with respect to a given deformation field.

A deformation field is represented as a image whose pixel type is some vector type with at least N elements, where N is the dimension of the input image. The vector type must support element access via operator [].

The output image is produced by inverse mapping: the output pixels are mapped back onto the input image. This scheme avoids the creation of any holes and overlaps in the output image.

Each vector in the deformation field represent the distance between a geometric point in the input space and a point in the output space such that:

Typically the mapped position does not correspond to an integer pixel position in the input image. Interpolation via an image function is used to compute values at non-integer positions. The default interpolation typed used is the LinearInterpolateImageFunction. The user can specify a particular interpolation function via SetInterpolator(). Note that the input interpolator must derive from base class InterpolateImageFunction.

Position mapped to outside of the input image buffer are assigned a edge padding value.

The LargetPossibleRegion for the output is inherited from the input deformation field. The output image spacing and origin may be set via SetOutputSpacing, SetOutputOrigin. The default are respectively a vector of 1's and a vector of 0's.

This class is templated over the type of the input image, the type of the output image and the type of the deformation field.

The input image is set via SetInput. The input deformation field is set via SetDeformationField.

This filter is implemented as a multithreaded filter.

Warning:
This filter assumes that the input type, output type and deformation field type all have the same number of dimensions.

Definition at line 83 of file itkWarpImageFilter.h.


Member Typedef Documentation

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef SmartPointer<const Self> itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::ConstPointer
 

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

Definition at line 91 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef double itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::CoordRepType
 

Interpolator typedef support.

Definition at line 122 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef LinearInterpolateImageFunction<InputImageType,CoordRepType> itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::DefaultInterpolatorType
 

Definition at line 126 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef DeformationFieldType::Pointer itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::DeformationFieldPointer
 

Definition at line 118 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef TDeformationField itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::DeformationFieldType
 

Deformation field typedef support.

Definition at line 117 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef DeformationFieldType::PixelType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::DisplacementType
 

Definition at line 119 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef OutputImageType::IndexType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::IndexType
 

Definition at line 108 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef Superclass::InputImageConstPointer itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::InputImageConstPointer
 

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

Definition at line 107 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef Superclass::InputImagePointer itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::InputImagePointer
 

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

Definition at line 104 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef Superclass::InputImageType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::InputImageType
 

Inherit some types from the superclass.

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

Definition at line 103 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef InterpolatorType::Pointer itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::InterpolatorPointer
 

Definition at line 124 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef InterpolateImageFunction<InputImageType,CoordRepType> itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::InterpolatorType
 

Definition at line 123 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef Superclass::OutputImagePointer itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::OutputImagePointer
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 106 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef TOutputImage::RegionType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::OutputImageRegionType
 

Typedef to describe the output image region type.

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

Definition at line 100 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef Superclass::OutputImageType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::OutputImageType
 

Some convenient typedefs.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 105 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef OutputImageType::PixelType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::PixelType
 

Definition at line 110 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef SmartPointer<Self> itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::Pointer
 

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

Definition at line 90 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef Point<CoordRepType,itkGetStaticConstMacro(ImageDimension) itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::PointType)
 

Point type

Definition at line 129 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef WarpImageFilter itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::Self
 

Standard class typedefs.

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

Definition at line 88 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef OutputImageType::SizeType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::SizeType
 

Definition at line 109 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
typedef ImageToImageFilter<TInputImage,TOutputImage> itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::Superclass
 

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

Definition at line 89 of file itkWarpImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImage, class TOutputImage, class TDeformationField>
itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::WarpImageFilter   [protected]
 

template<class TInputImage, class TOutputImage, class TDeformationField>
itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::~WarpImageFilter   [inline, protected]
 

Definition at line 184 of file itkWarpImageFilter.h.


Member Function Documentation

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::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 TDeformationField>
virtual void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GenerateInputRequestedRegion   [virtual]
 

It is difficult to compute in advance the input image region required to compute the requested output region. Thus the safest thing to do is to request for the whole input image.

For the deformation field, the input requested region set to be the same as that of the output requested region.

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

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GenerateOutputInformation   [virtual]
 

WarpImageFilter produces an image which is a different size than its input image. As such, it needs to provide an implemenation for GenerateOutputInformation() which set the output information according the OutputSpacing, OutputOrigin and the deformation field's LargestPossibleRegion.

Reimplemented from itk::ProcessObject.

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual const char* itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GetClassName   const [virtual]
 

Run-time type information (and related methods)

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

template<class TInputImage, class TOutputImage, class TDeformationField>
DeformationFieldType* itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GetDeformationField void   
 

Get a pointer the deformation field.

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual PixelType itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GetEdgePaddingValue   [virtual]
 

Get the edge padding value

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual InterpolatorType* itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GetInterpolator   [virtual]
 

Get a pointer to the interpolator function.

template<class TInputImage, class TOutputImage, class TDeformationField>
const double* itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GetOutputOrigin   [inline]
 

Get the output image origin.

Definition at line 154 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
const double* itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::GetOutputSpacing   [inline]
 

Get the output image spacing.

Definition at line 147 of file itkWarpImageFilter.h.

template<class TInputImage, class TOutputImage, class TDeformationField>
itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::itkStaticConstMacro ImageDimension   ,
unsigned    int,
TOutputImage::ImageDimension   
 

Determine the image dimension.

template<class TInputImage, class TOutputImage, class TDeformationField>
Pointer itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::New   [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage, class TOutputImage, class TDeformationField>
void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::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 TDeformationField>
void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::SetDeformationField DeformationFieldType   field
 

Set the deformation field.

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::SetEdgePaddingValue PixelType    _arg [virtual]
 

Set the edge padding value

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::SetInterpolator InterpolatorType   _arg [virtual]
 

Set the interpolator function.

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::SetOutputOrigin const double    values[ImageDimension] [virtual]
 

Set the output image origin.

template<class TInputImage, class TOutputImage, class TDeformationField>
virtual void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::SetOutputSpacing const double    values[ImageDimension] [virtual]
 

Set the output image spacing.

template<class TInputImage, class TOutputImage, class TDeformationField>
void itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::ThreadedGenerateData const OutputImageRegionType   outputRegionForThread,
int    threadId
[protected, virtual]
 

WarpImageFilter is implemented as a multi-threaded filter. As such, it needs to provide and implementation for ThreadedGenerateData().

Reimplemented from itk::ImageSource< TOutputImage >.


The documentation for this class was generated from the following file:
Generated at Fri May 21 01:49:10 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000