#include <itkExtractImageFilter.h>
Inheritance diagram for itk::ExtractImageFilter:
[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< Self > | Pointer |
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 Methods | |
virtual const char * | GetClassName () const |
virtual void | GenerateOutputInformation () |
virtual void | CallCopyRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
itkStaticConstMacro (InputImageDimension, unsigned int, TInputImage::ImageDimension) | |
itkStaticConstMacro (OutputImageDimension, unsigned int, TOutputImage::ImageDimension) | |
void | SetExtractionRegion (InputImageRegionType extractRegion) |
virtual InputImageRegionType | GetExtractionRegion () |
Static Public Methods | |
Pointer | New () |
Protected Methods | |
ExtractImageFilter () | |
~ExtractImageFilter () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
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.
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 63 of file itkExtractImageFilter.h. |
|
Definition at line 94 of file itkExtractImageFilter.h. |
|
Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 81 of file itkExtractImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 77 of file itkExtractImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 73 of file itkExtractImageFilter.h. |
|
Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 83 of file itkExtractImageFilter.h. |
|
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. |
|
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. |
|
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. |
|
Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 82 of file itkExtractImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 62 of file itkExtractImageFilter.h. |
|
Standard class typedefs. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 60 of file itkExtractImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. Definition at line 61 of file itkExtractImageFilter.h. |
|
|
|
Definition at line 118 of file itkExtractImageFilter.h. |
|
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. This function object is used by the default implementation of GenerateInputRequestedRegion(). It can also be used in routines like ThreadedGenerateData() where a filter may need to map the the output region for a particular thread to an input region. The default copier uses a "dispatch pattern" to call one of three overloaded functions depending on whether the input and output images are the same dimension, the input is a higher dimension that the output, or the input is of a lower dimension than the output. The use of an overloaded function is required for proper compilation of the various cases. For the latter two cases, trivial implementations are used. If the input image is a higher dimension than the output, the output region information is copied into the first portion of the input region and the rest of the input region is set to zero. If the input region is a lower dimension than the output, the first portion of the output region is copied to the input region. If a filter needs a different default behavior, it can call the SetRegionCopier() method passing in a subclass of the ImageToImageDetail::RegionCopier function object. This would typically be done in the constructor of the filter. The ExtractImageFilter overrides this function object so that if the input image is a higher dimension than the output image, the filter can control "where" in the input image the output subimage is extracted (as opposed to mapping to first few dimensions of the input). Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
ExtractImageFilter produces 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.
Reimplemented from itk::ProcessObject. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. |
|
Run-time type information (and related methods). Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. |
|
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. |
|
ImageDimension enumeration Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
ImageDimension enumeration Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
Method for creation through the object factory. Reimplemented from itk::Object. Reimplemented in itk::CropImageFilter< TInputImage, TOutputImage >. |
|
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 >. |
|
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. |
|
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" Reimplemented from itk::ImageSource< TOutputImage >. |
|
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" Definition at line 132 of file itkExtractImageFilter.h. |
|
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" Definition at line 133 of file itkExtractImageFilter.h. |