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

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

Reduce the size of an image by an integer factor in each dimension. More...

#include <itkShrinkImageFilter.h>

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

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef ShrinkImageFilter Self
typedef ImageToImageFilter<
TInputImage, TOutputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TOutputImage OutputImageType
typedef TInputImage InputImageType
typedef OutputImageType::Pointer OutputImagePointer
typedef InputImageType::Pointer InputImagePointer
typedef InputImageType::ConstPointer InputImageConstPointer
typedef TOutputImage::RegionType OutputImageRegionType

Public Member Functions

virtual const char * GetClassName () const
 itkStaticConstMacro (ImageDimension, unsigned int, TInputImage::ImageDimension)
const unsigned int * GetShrinkFactors () const
virtual void GenerateOutputInformation ()
virtual void GenerateInputRequestedRegion ()
void SetShrinkFactors (unsigned int factors[])
void SetShrinkFactors (unsigned int factor)
void SetShrinkFactor (unsigned int i, unsigned int factor)

Static Public Member Functions

Pointer New ()

Protected Member Functions

 ShrinkImageFilter ()
 ~ShrinkImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId)

Detailed Description

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

Reduce the size of an image by an integer factor in each dimension.

ShrinkImageFilter reduces the size of an image by an integer factor in each dimension. The algorithm implemented is a simple subsample. The output image size in each dimension is given by:

outputSize[j] = max( floor(inputSize[j]/shrinkFactor[j]), 1 );

Since this filter produces an image which is a different resolution and with different pixel spacing than its input image, it needs to override several of the methods defined in ProcessObject in order to properly manage the pipeline execution model. In particular, this filter overrides ProcessObject::GenerateInputRequestedRegion() and ProcessObject::GenerateOutputInformation().

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

Definition at line 52 of file itkShrinkImageFilter.h.


Member Typedef Documentation

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

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

Definition at line 60 of file itkShrinkImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef InputImageType::ConstPointer itk::ShrinkImageFilter< TInputImage, TOutputImage >::InputImageConstPointer
 

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

Definition at line 73 of file itkShrinkImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef InputImageType::Pointer itk::ShrinkImageFilter< TInputImage, TOutputImage >::InputImagePointer
 

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

Definition at line 72 of file itkShrinkImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef TInputImage itk::ShrinkImageFilter< TInputImage, TOutputImage >::InputImageType
 

Some convenient typedefs.

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

Definition at line 70 of file itkShrinkImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef OutputImageType::Pointer itk::ShrinkImageFilter< TInputImage, TOutputImage >::OutputImagePointer
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 71 of file itkShrinkImageFilter.h.

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

Typedef to describe the output image region type.

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

Definition at line 76 of file itkShrinkImageFilter.h.

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

template<class TInputImage, class TOutputImage>
typedef TOutputImage itk::ShrinkImageFilter< TInputImage, TOutputImage >::OutputImageType
 

Typedef to images

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 69 of file itkShrinkImageFilter.h.

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

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

Definition at line 59 of file itkShrinkImageFilter.h.

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

Standard class typedefs.

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

Definition at line 57 of file itkShrinkImageFilter.h.

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

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

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

Definition at line 58 of file itkShrinkImageFilter.h.


Constructor & Destructor Documentation

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

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

Definition at line 114 of file itkShrinkImageFilter.h.

References itk::ShrinkImageFilter< TInputImage, TOutputImage >::OutputImageRegionType, and itk::ShrinkImageFilter< TInputImage, TOutputImage >::Self.


Member Function Documentation

template<class TInputImage, class TOutputImage>
virtual void itk::ShrinkImageFilter< TInputImage, TOutputImage >::GenerateInputRequestedRegion  )  [virtual]
 

ShrinkImageFilter needs a larger input requested region than the output requested region. As such, ShrinkImageFilter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.

See also:
ProcessObject::GenerateInputRequestedRegion()

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

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

ShrinkImageFilter produces an image which is a different resolution and with a different pixel spacing than its input image. As such, ShrinkImageFilter 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.

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

Run-time type information (and related methods).

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

template<class TInputImage, class TOutputImage>
const unsigned int* itk::ShrinkImageFilter< TInputImage, TOutputImage >::GetShrinkFactors  )  const [inline]
 

Get the shrink factors. Definition at line 93 of file itkShrinkImageFilter.h.

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

ImageDimension enumeration.

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

Method for creation through the object factory.

Reimplemented from itk::Object.

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

template<class TInputImage, class TOutputImage>
void itk::ShrinkImageFilter< TInputImage, TOutputImage >::SetShrinkFactor unsigned int  i,
unsigned int  factor
[inline]
 

Set the shrink factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions. Definition at line 86 of file itkShrinkImageFilter.h.

template<class TInputImage, class TOutputImage>
void itk::ShrinkImageFilter< TInputImage, TOutputImage >::SetShrinkFactors unsigned int  factor  ) 
 

Set the shrink factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions.

template<class TInputImage, class TOutputImage>
void itk::ShrinkImageFilter< TInputImage, TOutputImage >::SetShrinkFactors unsigned int  factors[]  ) 
 

Set the shrink factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions.

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

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


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