ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageToImageFilterDetail.h>
Public Member Functions | |
virtual void | operator() (ImageRegion< D1 > &destRegion, const ImageRegion< D2 > &srcRegion) const |
virtual | ~ImageRegionCopier () |
A Function object used to dispatching to a routine to copy a region (start index and size).
Function object used for dispatching to various routines to copy a region (start index and size). Most filters use this function object as trivial copy because they require the input image dimension to match the output image 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 ImageToImageFilter::GenerateInputRequestedRegion(). It can also be used in routines like ImageSource::ThreadedGenerateData() where a filter may need to map the the output region for a particular thread to an input region.
This copier uses a "dispatch pattern" to call one of three overloaded functions depending on whether the source and destination dimensions are the same, the source is of a higher dimension than the destination, or the source is of a lower dimension than the destination. 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 source dimension is a lower dimension than the destination, the output region information is copied into the first portion of the destination region and the rest of the input region is set to zero. If the source region is a higher dimension than the destination, the first portion of the source region is copied to the destination region.
If a filter needs a different behavior is will need to override the CallCopyOutputRegionToInputRegion() method or the CallCopyInputRegionToOutputRegion() method and delegate to the appropriate RegionCopier class.
Definition at line 321 of file itkImageToImageFilterDetail.h.
virtual itk::ImageToImageFilterDetail::ImageRegionCopier< D1, D2 >::~ImageRegionCopier | ( | ) | [inline, virtual] |
Definition at line 333 of file itkImageToImageFilterDetail.h.
virtual void itk::ImageToImageFilterDetail::ImageRegionCopier< D1, D2 >::operator() | ( | ImageRegion< D1 > & | destRegion, |
const ImageRegion< D2 > & | srcRegion | ||
) | const [inline, virtual] |
Definition at line 324 of file itkImageToImageFilterDetail.h.