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

itk::HistogramMatchingImageFilter< TInputImage, TOutputImage > Class Template Reference
[Intensity Image FiltersMultithreaded Filters]

Normalize the grayscale values between two image by histogram matching. More...

#include <itkHistogramMatchingImageFilter.h>

Inheritance diagram for itk::HistogramMatchingImageFilter:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef HistogramMatchingImageFilter Self
typedef ImageToImageFilter<
TInputImage, TOutputImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef TOutputImage::RegionType OutputImageRegionType
typedef Superclass::InputImageType InputImageType
typedef Superclass::InputImagePointer InputImagePointer
typedef Superclass::InputImageConstPointer InputImageConstPointer
typedef Superclass::OutputImageType OutputImageType
typedef Superclass::OutputImagePointer OutputImagePointer
typedef InputImageType::PixelType InputPixelType
typedef OutputImageType::PixelType OutputPixelType
typedef Statistics::Histogram<
InputPixelType, 1 > 
HistogramType
typedef HistogramType::Pointer HistogramPointer

Public Methods

virtual const char * GetClassName () const
 itkStaticConstMacro (ImageDimension, unsigned int, TInputImage::ImageDimension)
virtual void GenerateInputRequestedRegion ()
void SetSourceImage (const InputImageType *source)
const InputImageTypeGetSourceImage (void)
void SetReferenceImage (const InputImageType *reference)
const InputImageTypeGetReferenceImage (void)
virtual void SetNumberOfHistogramLevels (unsigned long _arg)
virtual unsigned long GetNumberOfHistogramLevels ()
virtual void SetNumberOfMatchPoints (unsigned long _arg)
virtual unsigned long GetNumberOfMatchPoints ()
virtual void SetThresholdAtMeanIntensity (bool _arg)
virtual bool GetThresholdAtMeanIntensity ()
virtual void ThresholdAtMeanIntensityOn ()
virtual void ThresholdAtMeanIntensityOff ()

Static Public Methods

Pointer New ()

Protected Methods

 HistogramMatchingImageFilter ()
 ~HistogramMatchingImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const
void BeforeThreadedGenerateData ()
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, int threadId)
void ComputeMinMaxMean (const InputImageType *image, double &minValue, double &maxValue, double &meanValue)
void ConstructHistogram (const InputImageType *image, HistogramType *histogram, double minValue, double maxValue)

Detailed Description

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

Normalize the grayscale values between two image by histogram matching.

HistogramMatchingImageFilter normalizes the grayscale values of a source image based on the grayscale values of a reference image. This filter uses a histogram matching technique where the histograms of the two images are matched only at a specified number of quantile values.

This filter was orginally designed to normalize MR images of the same MR protocol and same body part. The algorithm works best if background pixels are excluded from both the source and reference histograms. A simple background exclusion method is to exclude all pixels whose grayscale values are smaller than the mean grayscale value. ThresholdAtMeanIntensityOn() switches on this simple background exclusion method.

The source image can be set via either SetInput() or SetSourceImage(). The reference image can be set via SetReferenceImage().

SetNumberOfHistogramLevels() sets the number of bins used when creating histograms of the source and reference images. SetNumberOfMatchPoints() governs the number of quantile values to be matched.

This filter assumes that both the source and reference are of the same type and that the input and output image type have the same number of dimension and have scalar pixel types.

Definition at line 60 of file itkHistogramMatchingImageFilter.h.


Member Typedef Documentation

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

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

Definition at line 68 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef HistogramType::Pointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::HistogramPointer
 

Definition at line 96 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Statistics::Histogram<InputPixelType, 1> itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::HistogramType
 

Histogram related typedefs.

Definition at line 95 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::InputImageConstPointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::InputImageConstPointer
 

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

Definition at line 86 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::InputImagePointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::InputImagePointer
 

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

Definition at line 85 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::InputImageType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::InputImageType
 

Inherited typedefs.

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

Definition at line 84 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef InputImageType::PixelType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::InputPixelType
 

Pixel related typedefs.

Definition at line 91 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::OutputImagePointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::OutputImagePointer
 

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 88 of file itkHistogramMatchingImageFilter.h.

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

Typedef to describe the output image region type.

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

Definition at line 81 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef Superclass::OutputImageType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::OutputImageType
 

Some convenient typedefs.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 87 of file itkHistogramMatchingImageFilter.h.

template<class TInputImage, class TOutputImage>
typedef OutputImageType::PixelType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::OutputPixelType
 

Definition at line 92 of file itkHistogramMatchingImageFilter.h.

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

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

Definition at line 67 of file itkHistogramMatchingImageFilter.h.

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

Standard class typedefs.

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

Definition at line 65 of file itkHistogramMatchingImageFilter.h.

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

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

Definition at line 66 of file itkHistogramMatchingImageFilter.h.


Constructor & Destructor Documentation

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

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

Definition at line 135 of file itkHistogramMatchingImageFilter.h.

References HardConnectedComponentImageFilter::InputImageType, and HardConnectedComponentImageFilter::InputPixelType.


Member Function Documentation

template<class TInputImage, class TOutputImage>
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData void    [protected, virtual]
 

If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage, class TOutputImage>
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::ComputeMinMaxMean const InputImageType   image,
double &    minValue,
double &    maxValue,
double &    meanValue
[protected]
 

Compute min, max and mean of an image.

template<class TInputImage, class TOutputImage>
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::ConstructHistogram const InputImageType   image,
HistogramType   histogram,
double    minValue,
double    maxValue
[protected]
 

Construct a histogram from an image.

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

This filter requires all of the input to be in the buffer.

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

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

Run-time type information (and related methods).

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

template<class TInputImage, class TOutputImage>
virtual unsigned long itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::GetNumberOfHistogramLevels   [virtual]
 

Set/Get the number of histogram levels used.

template<class TInputImage, class TOutputImage>
virtual unsigned long itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::GetNumberOfMatchPoints   [virtual]
 

Set/Get the number of match points used.

template<class TInputImage, class TOutputImage>
const InputImageType* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::GetReferenceImage void   
 

Set/Get the reference image.

template<class TInputImage, class TOutputImage>
const InputImageType* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::GetSourceImage void    [inline]
 

Set/Get the source image.

Definition at line 101 of file itkHistogramMatchingImageFilter.h.

References HardConnectedComponentImageFilter::InputImageType.

template<class TInputImage, class TOutputImage>
virtual bool itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::GetThresholdAtMeanIntensity   [virtual]
 

Set/Get the threshold at mean intensity flag. If true, only source (reference) pixels which are greater than the mean source (reference) intensity is used in the histogram matching. If false, all pixels are used.

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

ImageDimension enumeration.

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

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

Method for creation through the object factory.

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

template<class TInputImage, class TOutputImage>
void itk::HistogramMatchingImageFilter< 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>
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::SetNumberOfHistogramLevels unsigned long    _arg [virtual]
 

Set/Get the number of histogram levels used.

template<class TInputImage, class TOutputImage>
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::SetNumberOfMatchPoints unsigned long    _arg [virtual]
 

Set/Get the number of match points used.

template<class TInputImage, class TOutputImage>
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::SetReferenceImage const InputImageType   reference
 

Set/Get the reference image.

template<class TInputImage, class TOutputImage>
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::SetSourceImage const InputImageType   source [inline]
 

Set/Get the source image.

Definition at line 99 of file itkHistogramMatchingImageFilter.h.

References HardConnectedComponentImageFilter::InputImageType.

template<class TInputImage, class TOutputImage>
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::SetThresholdAtMeanIntensity bool    _arg [virtual]
 

Set/Get the threshold at mean intensity flag. If true, only source (reference) pixels which are greater than the mean source (reference) intensity is used in the histogram matching. If false, all pixels are used.

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

If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). This superclass will automatically split the output image into a number of pieces, spawn multiple threads, and call ThreadedGenerateData() in each thread. Prior to spawning threads, the BeforeThreadedGenerateData() method is called. After all the threads have completed, the AfterThreadedGenerateData() method is called. If an image processing filter cannot support threading, that filter should provide an implementation of the GenerateData() method instead of providing an implementation of ThreadedGenerateData(). If a filter provides a GenerateData() method as its implementation, then the filter is responsible for allocating the output data. If a filter provides a ThreadedGenerateData() method as its implementation, then the output memory will allocated automatically by this superclass. The ThreadedGenerateData() method should only produce the output specified by "outputThreadRegion" parameter. ThreadedGenerateData() cannot write to any other portion of the output image (as this is responsibility of a different thread).

See also:
GenerateData(), SplitRequestedRegion()

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage, class TOutputImage>
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::ThresholdAtMeanIntensityOff   [virtual]
 

Set/Get the threshold at mean intensity flag. If true, only source (reference) pixels which are greater than the mean source (reference) intensity is used in the histogram matching. If false, all pixels are used.

template<class TInputImage, class TOutputImage>
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage >::ThresholdAtMeanIntensityOn   [virtual]
 

Set/Get the threshold at mean intensity flag. If true, only source (reference) pixels which are greater than the mean source (reference) intensity is used in the histogram matching. If false, all pixels are used.


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:21:28 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000