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

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

Decrease the image size by cropping the image to the selected region bounds. More...

#include <itkExtractImageFilter.h>

Inheritance diagram for itk::ExtractImageFilter< TInputImage, TOutputImage >:

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

Collaboration graph
[legend]
List of all members.

[NOHEADER]

void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId)
InputImageRegionType m_ExtractionRegion
OutputImageRegionType m_OutputImageRegion

Public Types

typedef ExtractImageFilter Self
typedef ImageToImageFilter<
TInputImage, TOutputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TOutputImage::RegionType OutputImageRegionType
typedef TInputImage::RegionType InputImageRegionType
typedef TOutputImage::PixelType OutputImagePixelType
typedef TInputImage::PixelType InputImagePixelType
typedef TOutputImage::IndexType OutputImageIndexType
typedef TInputImage::IndexType InputImageIndexType
typedef TOutputImage::SizeType OutputImageSizeType
typedef TInputImage::SizeType InputImageSizeType
typedef ImageToImageFilterDetail::ExtractImageFilterRegionCopier<
itkGetStaticConstMacro(InputImageDimension),
itkGetStaticConstMacro(OutputImageDimension) 
ExtractImageFilterRegionCopierType )

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (InputImageDimension, unsigned int, TInputImage::ImageDimension)
 itkStaticConstMacro (OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
void SetExtractionRegion (InputImageRegionType extractRegion)
virtual InputImageRegionType GetExtractionRegion ()

Static Public Member Functions

Pointer New ()

Protected Member Functions

 ExtractImageFilter ()
 ~ExtractImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const
virtual void GenerateOutputInformation ()
virtual void CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)

Detailed Description

template<class TInputImage, class TOutputImage>
class itk::ExtractImageFilter< TInputImage, TOutputImage >

Decrease the image size by cropping the image to the selected region bounds.

ExtractImageFilter changes the image boundary of an image by removing pixels outside the target region. The target region must be specified.

ExtractImageFilter also collapses dimensions so that the input image may have more dimensions than the output image (i.e. 4-D input image to a 3-D output image). To specify what dimensions to collapse, the ExtractionRegion must be specified. For any dimension dim where ExtractionRegion.Size[dim] = 0, that dimension is collapsed. The index to collapse on is specified by ExtractionRegion.Index[dim]. For example, we have a image 4D = a 4x4x4x4 image, and we want to get a 3D image, 3D = a 4x4x4 image, specified as [x,y,z,2] from 4D (i.e. the 3rd "time" slice from 4D). The ExtractionRegion.Size = [4,4,4,0] and ExtractionRegion.Index = [0,0,0,2].

The number of dimension in ExtractionRegion.Size and Index must = InputImageDimension. The number of non-zero dimensions in ExtractionRegion.Size must = OutputImageDimension.

This filter is implemented as a multithreaded filter. It provides a ThreadedGenerateData() method for its implementation.

Definition at line 55 of file itkExtractImageFilter.h.


Member Typedef Documentation

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

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 63 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef ImageToImageFilterDetail::ExtractImageFilterRegionCopier<itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) itk::ExtractImageFilter< TInputImage, TOutputImage >::ExtractImageFilterRegionCopierType)
 

Definition at line 94 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage::IndexType itk::ExtractImageFilter< TInputImage, TOutputImage >::InputImageIndexType
 

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 81 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage::PixelType itk::ExtractImageFilter< TInputImage, TOutputImage >::InputImagePixelType
 

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 77 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage::RegionType itk::ExtractImageFilter< TInputImage, TOutputImage >::InputImageRegionType
 

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 73 of file itkExtractImageFilter.h.

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

template<class TInputImage, class TOutputImage>
typedef TInputImage::SizeType itk::ExtractImageFilter< TInputImage, TOutputImage >::InputImageSizeType
 

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 83 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TOutputImage::IndexType itk::ExtractImageFilter< TInputImage, TOutputImage >::OutputImageIndexType
 

Typedef to describe the output and input image index and size types.

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 80 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TOutputImage::PixelType itk::ExtractImageFilter< TInputImage, TOutputImage >::OutputImagePixelType
 

Typedef to describe the type of pixel.

Reimplemented from itk::ImageSource< TOutputImage >.

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 76 of file itkExtractImageFilter.h.

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

Typedef to describe the output and input image region types.

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 72 of file itkExtractImageFilter.h.

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

template<class TInputImage, class TOutputImage>
typedef TOutputImage::SizeType itk::ExtractImageFilter< TInputImage, TOutputImage >::OutputImageSizeType
 

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 82 of file itkExtractImageFilter.h.

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

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 62 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef ExtractImageFilter itk::ExtractImageFilter< TInputImage, TOutputImage >::Self
 

Standard class typedefs.

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 60 of file itkExtractImageFilter.h.

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

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

Definition at line 61 of file itkExtractImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImage, class TOutputImage>
itk::ExtractImageFilter< TInputImage, TOutputImage >::ExtractImageFilter  )  [protected]
 

template<class TInputImage, class TOutputImage>
itk::ExtractImageFilter< TInputImage, TOutputImage >::~ExtractImageFilter  )  [inline, protected]
 

Definition at line 107 of file itkExtractImageFilter.h.

References itk::ExtractImageFilter< TInputImage, TOutputImage >::InputImageRegionType, and itk::ExtractImageFilter< TInputImage, TOutputImage >::OutputImageRegionType.


Member Function Documentation

template<class TInputImage, class TOutputImage>
virtual void itk::ExtractImageFilter< TInputImage, TOutputImage >::CallCopyOutputRegionToInputRegion InputImageRegionType destRegion,
const OutputImageRegionType srcRegion
[protected, virtual]
 

This function calls the actual region copier to do the mapping from output image space to input image space. It uses a Function object used for dispatching to various routines to copy an output region (start index and size) to an input region. For most filters, this is a trivial copy because most filters require the input dimension to match the output dimension. However, some filters like itk::ExtractImageFilter can support output images of a lower dimension that the input.

See also:
ImageToImageFilter::CallCopyRegion()

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

template<class TInputImage, class TOutputImage>
virtual void itk::ExtractImageFilter< TInputImage, TOutputImage >::GenerateOutputInformation  )  [protected, virtual]
 

ExtractImageFilter can produce an image which is a different resolution than its input image. As such, ExtractImageFilter 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.

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

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

Run-time type information (and related methods).

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

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
virtual InputImageRegionType itk::ExtractImageFilter< TInputImage, TOutputImage >::GetExtractionRegion  )  [virtual]
 

Set/Get the output image region. If any of the ExtractionRegion.Size = 0 for any particular dimension dim, we have to collapse dimension dim. This means the output image will have 'c' dimensions less than the input image, where c = # of ExtractionRegion.Size = 0.

template<class TInputImage, class TOutputImage>
itk::ExtractImageFilter< TInputImage, TOutputImage >::itkStaticConstMacro OutputImageDimension  ,
unsigned  int,
TOutputImage::ImageDimension 
 

ImageDimension enumeration

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

template<class TInputImage, class TOutputImage>
itk::ExtractImageFilter< TInputImage, TOutputImage >::itkStaticConstMacro InputImageDimension  ,
unsigned  int,
TInputImage::ImageDimension 
 

ImageDimension enumeration

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

template<class TInputImage, class TOutputImage>
Pointer itk::ExtractImageFilter< TInputImage, TOutputImage >::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
void itk::ExtractImageFilter< TInputImage, TOutputImage >::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 >.

Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >.

template<class TInputImage, class TOutputImage>
void itk::ExtractImageFilter< TInputImage, TOutputImage >::SetExtractionRegion InputImageRegionType  extractRegion  ) 
 

Set/Get the output image region. If any of the ExtractionRegion.Size = 0 for any particular dimension dim, we have to collapse dimension dim. This means the output image will have 'c' dimensions less than the input image, where c = # of ExtractionRegion.Size = 0.

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

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


Member Data Documentation

template<class TInputImage, class TOutputImage>
InputImageRegionType itk::ExtractImageFilter< TInputImage, TOutputImage >::m_ExtractionRegion [protected]
 

ExtractImageFilter 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()
Definition at line 144 of file itkExtractImageFilter.h.

template<class TInputImage, class TOutputImage>
OutputImageRegionType itk::ExtractImageFilter< TInputImage, TOutputImage >::m_OutputImageRegion [protected]
 

ExtractImageFilter 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()
Definition at line 145 of file itkExtractImageFilter.h.


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