ITK  4.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Private Member Functions
itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram > Class Template Reference

Implements a generic moving histogram algorithm. More...

#include <itkMovingHistogramImageFilter.h>

Inheritance diagram for itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >:
Collaboration diagram for itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >:

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef TInputImage::IndexType IndexType
typedef TInputImage InputImageType
typedef KernelType::ConstIterator KernelIteratorType
typedef TKernel KernelType
typedef std::list< OffsetTypeOffsetListType
typedef std::map< OffsetType,
OffsetListType, typename
OffsetType::LexicographicCompare > 
OffsetMapType
typedef TInputImage::OffsetType OffsetType
typedef
Superclass::OutputImageRegionType 
OutputImageRegionType
typedef TOutputImage OutputImageType
typedef TOutputImage::PixelType OutputPixelType
typedef TInputImage::PixelType PixelType
typedef SmartPointer< SelfPointer
typedef KernelType::SizeType RadiusType
typedef TInputImage::RegionType RegionType
typedef MovingHistogramImageFilter Self
typedef TInputImage::SizeType SizeType
typedef
MovingHistogramImageFilterBase
< TInputImage, TOutputImage,
TKernel > 
Superclass

Public Member Functions

virtual void ConfigureHistogram (THistogram &)
virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const

Static Public Member Functions

static Pointer New ()

Static Public Attributes

static const unsigned int ImageDimension = TInputImage::ImageDimension

Protected Types

typedef THistogram HistogramType

Protected Member Functions

 MovingHistogramImageFilter ()
void PushHistogram (HistogramType &histogram, const OffsetListType *addedList, const OffsetListType *removedList, const RegionType &inputRegion, const RegionType &kernRegion, const InputImageType *inputImage, const IndexType currentIdx)
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
 ~MovingHistogramImageFilter ()

Private Member Functions

 MovingHistogramImageFilter (const Self &)
void operator= (const Self &)

Detailed Description

template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
class itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >

Implements a generic moving histogram algorithm.

This filter is a base class to implement efficiently many neighborhood filters. Instead of visiting all the neighbors of a pixel, the set of pixels in the neighborhood is updated when the filter is moving to a new pixel. The number of pixels read for each pixel can be very smaller than the number of pixels read by a basic algorithm.

This filter moves the neighborhood over all the pixels of the output requested region, and pass the pixel added and removed of the neighborhood to the an histogram class. This filter doesn't implement the histogram class - it must be implement and passed as template parameter. The histogram class is not necessary a real histogram. It can be implemented in many ways, and only has to provide the methods described below.

This filter takes 4 template parameters: the input and output image type, the structuring element (or kernel) type, and the histogram type. The input and output image must have the same number of dimension.

The histogram type is a class which has to implements six methods: + a default constructor which takes no parameter. + void AddPixel( const InputPixelType &p ) is called when a new pixel is added to the histogram. + void RemovePixel( const InputPixelType &p ) is called when a pixel is removed of the histogram. + void AddBoundary() is called when a pixel outside the image is added. No value is provided: it's the responsability to the histogram class to get it if needed. This method can be kept empty to ignore the boundary pixels. + void RemoveBoundary() is called to when a pixel outside the image is removed. No value is provided: it's the responsability to the histogram class to get it if needed. This method can be kept empty to ignore the boundary pixels. + AType GetValue() is called to set the value of the output image. AType must be the output pixel type, or a type castable to the output pixel type.

MovingHistogramImageFilter add the new pixels before removing the old ones, so, if AddBoundary() is implemented and/or the kernel is symetric, it is safe to consider that the histogram will never be empty.

One histogram is created for each thread by the method NewHistogram(). The NewHistogram() method can be overiden to pass some parameters to the histogram.

The neighborhood is defined by a structuring element, and must a itk::Neighborhood object or a subclass. The structuring element is assumed to be composed of binary values (zero or one). Only elements of the structuring element having values > 0 are candidates for affecting the center pixel.

See also:
MovingWindowMeanImageFilter, RankImageFilter, MaskedMovingHistogramImageFitler,
MovingHistogramMorphologicalGradientImageFilter
Author:
Gaetan Lehmann
Richard Beare

Definition at line 87 of file itkMovingHistogramImageFilter.h.


Member Typedef Documentation

template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef SmartPointer< const Self > itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::ConstPointer
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef THistogram itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::HistogramType [protected]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TInputImage::IndexType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::IndexType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TInputImage itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::InputImageType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef KernelType::ConstIterator itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::KernelIteratorType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TKernel itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::KernelType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef std::list< OffsetType > itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::OffsetListType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef std::map< OffsetType, OffsetListType, typename OffsetType::LexicographicCompare > itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::OffsetMapType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TInputImage::OffsetType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::OffsetType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef Superclass::OutputImageRegionType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::OutputImageRegionType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TOutputImage itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::OutputImageType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TOutputImage::PixelType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::OutputPixelType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TInputImage::PixelType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::PixelType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef SmartPointer< Self > itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::Pointer
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef KernelType::SizeType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::RadiusType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TInputImage::RegionType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::RegionType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef MovingHistogramImageFilter itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::Self
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef TInputImage::SizeType itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::SizeType
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
typedef MovingHistogramImageFilterBase< TInputImage, TOutputImage, TKernel > itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::Superclass

Constructor & Destructor Documentation

template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::MovingHistogramImageFilter ( ) [protected]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::~MovingHistogramImageFilter ( ) [inline, protected]

Definition at line 137 of file itkMovingHistogramImageFilter.h.

template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::MovingHistogramImageFilter ( const Self ) [private]

Member Function Documentation

template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
virtual void itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::ConfigureHistogram ( THistogram &  ) [inline, virtual]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
virtual::itk::LightObject::Pointer itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::CreateAnother ( void  ) const [virtual]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
virtual const char* itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::GetNameOfClass ( ) const [virtual]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
static Pointer itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::New ( ) [static]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
void itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::operator= ( const Self ) [private]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
void itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::PushHistogram ( HistogramType histogram,
const OffsetListType addedList,
const OffsetListType removedList,
const RegionType inputRegion,
const RegionType kernRegion,
const InputImageType inputImage,
const IndexType  currentIdx 
) [protected]
template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
void itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
ThreadIdType  threadId 
) [protected, virtual]

Multi-thread version GenerateData.

Reimplemented from itk::ImageSource< TOutputImage >.


Member Data Documentation

template<class TInputImage, class TOutputImage, class TKernel, class THistogram>
const unsigned int itk::MovingHistogramImageFilter< TInputImage, TOutputImage, TKernel, THistogram >::ImageDimension = TInputImage::ImageDimension [static]

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