Orfeo Toolbox  4.2
Public Member Functions | List of all members
itk::ImageToImageFilterDetail::ImageRegionCopier< D1, D2 > Class Template Reference

A Function object used to dispatching to a routine to copy a region (start index and size). More...

#include <itkImageToImageFilterDetail.h>

+ Inheritance diagram for itk::ImageToImageFilterDetail::ImageRegionCopier< D1, D2 >:

Public Member Functions

virtual ~ImageRegionCopier ()
 
virtual void operator() (ImageRegion< D1 > &destRegion, const ImageRegion< D2 > &srcRegion) const
 

Detailed Description

template<unsigned int D1, unsigned int D2>
class itk::ImageToImageFilterDetail::ImageRegionCopier< D1, D2 >

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 316 of file itkImageToImageFilterDetail.h.

Constructor & Destructor Documentation

template<unsigned int D1, unsigned int D2>
virtual itk::ImageToImageFilterDetail::ImageRegionCopier< D1, D2 >::~ImageRegionCopier ( )
inlinevirtual

Definition at line 328 of file itkImageToImageFilterDetail.h.

Member Function Documentation

template<unsigned int D1, unsigned int D2>
virtual void itk::ImageToImageFilterDetail::ImageRegionCopier< D1, D2 >::operator() ( ImageRegion< D1 > &  destRegion,
const ImageRegion< D2 > &  srcRegion 
) const
inlinevirtual

The documentation for this class was generated from the following file:

Generated at Sat Aug 30 2014 18:15:29 for Orfeo Toolbox with doxygen 1.8.3.1