#include <itkHistogramMatchingImageFilter.h>
Inheritance diagram for itk::HistogramMatchingImageFilter:
Public Types | |
typedef HistogramMatchingImageFilter | Self |
typedef ImageToImageFilter< TInputImage, TOutputImage > | Superclass |
typedef SmartPointer< Self > | Pointer |
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 InputImageType * | GetSourceImage (void) |
void | SetReferenceImage (const InputImageType *reference) |
const InputImageType * | GetReferenceImage (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) |
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.
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 68 of file itkHistogramMatchingImageFilter.h. |
|
Definition at line 96 of file itkHistogramMatchingImageFilter.h. |
|
Histogram related typedefs. Definition at line 95 of file itkHistogramMatchingImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 86 of file itkHistogramMatchingImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 85 of file itkHistogramMatchingImageFilter.h. |
|
Inherited typedefs. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 84 of file itkHistogramMatchingImageFilter.h. |
|
Pixel related typedefs. Definition at line 91 of file itkHistogramMatchingImageFilter.h. |
|
Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 88 of file itkHistogramMatchingImageFilter.h. |
|
Typedef to describe the output image region type. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 81 of file itkHistogramMatchingImageFilter.h. |
|
Some convenient typedefs. Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 87 of file itkHistogramMatchingImageFilter.h. |
|
Definition at line 92 of file itkHistogramMatchingImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 67 of file itkHistogramMatchingImageFilter.h. |
|
Standard class typedefs. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 65 of file itkHistogramMatchingImageFilter.h. |
|
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. Definition at line 66 of file itkHistogramMatchingImageFilter.h. |
|
|
|
Definition at line 135 of file itkHistogramMatchingImageFilter.h. References HardConnectedComponentImageFilter::InputImageType, and HardConnectedComponentImageFilter::InputPixelType. |
|
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 >. |
|
Compute min, max and mean of an image. |
|
Construct a histogram from an image. |
|
This filter requires all of the input to be in the buffer. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
Run-time type information (and related methods). Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
Set/Get the number of histogram levels used. |
|
Set/Get the number of match points used. |
|
Set/Get the reference image. |
|
Set/Get the source image. Definition at line 101 of file itkHistogramMatchingImageFilter.h. References HardConnectedComponentImageFilter::InputImageType. |
|
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. |
|
ImageDimension enumeration. Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >. |
|
Method for creation through the object factory. Reimplemented from itk::Object. |
|
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 >. |
|
Set/Get the number of histogram levels used. |
|
Set/Get the number of match points used. |
|
Set/Get the reference image. |
|
Set/Get the source image. Definition at line 99 of file itkHistogramMatchingImageFilter.h. References HardConnectedComponentImageFilter::InputImageType. |
|
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. |
|
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).
Reimplemented from itk::ImageSource< TOutputImage >. |
|
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. |
|
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. |