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

itk::InPlaceImageFilter< TInputImage > Class Template Reference
[Image Filters]

Base class for filters that take an image as input and overwrite that image as the output. More...

#include <itkInPlaceImageFilter.h>

Inheritance diagram for itk::InPlaceImageFilter< TInputImage >:

Inheritance graph
[legend]
Collaboration diagram for itk::InPlaceImageFilter< TInputImage >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef InPlaceImageFilter Self
typedef ImageToImageFilter<
TInputImage, TInputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef Superclass::OutputImageRegionType OutputImageRegionType
typedef TInputImage InputImageType
typedef InputImageType::Pointer InputImagePointer
typedef InputImageType::ConstPointer InputImageConstPointer
typedef InputImageType::RegionType InputImageRegionType
typedef InputImageType::PixelType InputImagePixelType

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (InputImageDimension, unsigned int, TInputImage::ImageDimension)
 itkStaticConstMacro (OutputImageDimension, unsigned int, TInputImage::ImageDimension)

Protected Member Functions

 InPlaceImageFilter ()
 ~InPlaceImageFilter ()
virtual void PrintSelf (std::ostream &os, Indent indent) const
virtual void AllocateOutputs ()
virtual void ReleaseInputs ()

Detailed Description

template<class TInputImage>
class itk::InPlaceImageFilter< TInputImage >

Base class for filters that take an image as input and overwrite that image as the output.

InPlaceImageFilter is the base class for all process objects whose output image data is constructed by overwriting the input image data. In other words, the output bulk data is the same block of memory as the input bulk data. This filter provides the mechanisms for in place image processing while maintaining general pipeline mechanics. InPlaceImageFilters use less memory than standard ImageToImageFilters because the input buffer is reused as the output buffer. However, this benefit does not come without a cost. Since the filter overwrites its input, the ownership of the bulk data is transitioned from the input data object to the output data object. When a data object has multiple consumers with one of the consumers being an in place filter, the in place filter effectively destroys the bulk data for the data object. Upstream filters will then have to re-execute to regenerate the data object's bulk data for the remaining consumers.

Since an InPlaceImageFilter reuses the input bulk data memory for the output bulk data memory, the input image type must match the output image type. Therefore, this class is only templated on the input image type.

Definition at line 55 of file itkInPlaceImageFilter.h.


Member Typedef Documentation

template<class TInputImage>
typedef SmartPointer<const Self> itk::InPlaceImageFilter< TInputImage >::ConstPointer
 

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 62 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef InputImageType::ConstPointer itk::InPlaceImageFilter< TInputImage >::InputImageConstPointer
 

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

Definition at line 74 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef InputImageType::PixelType itk::InPlaceImageFilter< TInputImage >::InputImagePixelType
 

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 76 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef InputImageType::Pointer itk::InPlaceImageFilter< TInputImage >::InputImagePointer
 

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 73 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef InputImageType::RegionType itk::InPlaceImageFilter< TInputImage >::InputImageRegionType
 

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 75 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef TInputImage itk::InPlaceImageFilter< TInputImage >::InputImageType
 

Some convenient typedefs.

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

Definition at line 72 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef Superclass::OutputImageRegionType itk::InPlaceImageFilter< TInputImage >::OutputImageRegionType
 

Superclass typedefs.

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 69 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef SmartPointer<Self> itk::InPlaceImageFilter< TInputImage >::Pointer
 

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 61 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef InPlaceImageFilter itk::InPlaceImageFilter< TInputImage >::Self
 

Standard class typedefs.

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 59 of file itkInPlaceImageFilter.h.

template<class TInputImage>
typedef ImageToImageFilter<TInputImage, TInputImage> itk::InPlaceImageFilter< TInputImage >::Superclass
 

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

Definition at line 60 of file itkInPlaceImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImage>
itk::InPlaceImageFilter< TInputImage >::InPlaceImageFilter  )  [protected]
 

template<class TInputImage>
itk::InPlaceImageFilter< TInputImage >::~InPlaceImageFilter  )  [protected]
 


Member Function Documentation

template<class TInputImage>
virtual void itk::InPlaceImageFilter< TInputImage >::AllocateOutputs  )  [protected, virtual]
 

The GenerateData method normally allocates the buffers for all of the outputs of a filter. Since InPlaceImageFilter's use an overwritten version of input for its output, the output buffer should not be allocated. Instead, we graft the input to the filter to the output. If an InPlaceFilter has multiple outputs, then it would need to override this method to graft one of its outputs and allocate the remaining. If a filter is threaded (i.e. it provides an implementation of ThreadedGenerateData()), this method is called automatically. If an InPlaceFilter is not threaded (i.e. it provides an implementation of GenerateData()), then this method (or equivalent) must be called in GenerateData().

Reimplemented from itk::ImageSource< TInputImage >.

template<class TInputImage>
virtual const char* itk::InPlaceImageFilter< TInputImage >::GetClassName  )  const [virtual]
 

Run-time type information (and related methods).

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

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

ImageDimension constants

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

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

ImageDimension constants

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

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

Reimplemented in itk::ShiftScaleInPlaceImageFilter< TInputImage >.

template<class TInputImage>
virtual void itk::InPlaceImageFilter< TInputImage >::ReleaseInputs  )  [protected, virtual]
 

InPlaceImageFilter will transfer ownership of the input bulk data to the output object. Once the output object owns the bulk data (done in AllocateOutputs()), the input object must release its hold on the bulk data. ProcessObject::ReleaseInputs() only releases the input bulk data when the user has set the ReleaseDataFlag. InPlaceImageFilter::ReleaseInputs() also releases the input that it has overwritten.

See also:
ProcessObject::ReleaseInputs()

Reimplemented from itk::ProcessObject.


The documentation for this class was generated from the following file:
Generated at Sat Mar 31 02:57:14 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000