ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkHistogramMatchingImageFilter.h>
Normalize the grayscale values between two images 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 63 of file itkHistogramMatchingImageFilter.h.
typedef SmartPointer< const Self > itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::ConstPointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 71 of file itkHistogramMatchingImageFilter.h.
typedef vnl_vector< double > itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GradientArrayType [private] |
Definition at line 226 of file itkHistogramMatchingImageFilter.h.
typedef HistogramType::Pointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::HistogramPointer |
Definition at line 102 of file itkHistogramMatchingImageFilter.h.
typedef Statistics::Histogram< THistogramMeasurement > itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::HistogramType |
Histogram related typedefs.
Definition at line 101 of file itkHistogramMatchingImageFilter.h.
typedef Superclass::InputImageConstPointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::InputImageConstPointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 92 of file itkHistogramMatchingImageFilter.h.
typedef Superclass::InputImagePointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::InputImagePointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 91 of file itkHistogramMatchingImageFilter.h.
typedef Superclass::InputImageType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::InputImageType |
Inherited typedefs.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 90 of file itkHistogramMatchingImageFilter.h.
typedef InputImageType::PixelType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::InputPixelType |
Pixel related typedefs.
Definition at line 97 of file itkHistogramMatchingImageFilter.h.
typedef Superclass::OutputImagePointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::OutputImagePointer |
Reimplemented from itk::ImageSource< TOutputImage >.
Definition at line 94 of file itkHistogramMatchingImageFilter.h.
typedef TOutputImage::RegionType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::OutputImageRegionType |
Typedef to describe the output image region type.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 87 of file itkHistogramMatchingImageFilter.h.
typedef Superclass::OutputImageType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::OutputImageType |
Some convenient typedefs.
Reimplemented from itk::ImageSource< TOutputImage >.
Definition at line 93 of file itkHistogramMatchingImageFilter.h.
typedef OutputImageType::PixelType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::OutputPixelType |
Definition at line 98 of file itkHistogramMatchingImageFilter.h.
typedef SmartPointer< Self > itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::Pointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 70 of file itkHistogramMatchingImageFilter.h.
typedef HistogramMatchingImageFilter itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::Self |
Standard class typedefs.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 68 of file itkHistogramMatchingImageFilter.h.
typedef ImageToImageFilter< TInputImage, TOutputImage > itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::Superclass |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 69 of file itkHistogramMatchingImageFilter.h.
typedef vnl_matrix< double > itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::TableType [private] |
Definition at line 223 of file itkHistogramMatchingImageFilter.h.
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::HistogramMatchingImageFilter | ( | ) | [protected] |
End concept checking
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::~HistogramMatchingImageFilter | ( | ) | [inline, protected] |
End concept checking
Definition at line 168 of file itkHistogramMatchingImageFilter.h.
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::HistogramMatchingImageFilter | ( | const Self & | ) | [private] |
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::AfterThreadedGenerateData | ( | void | ) | [protected, virtual] |
If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). 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 >.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::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 >.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::ComputeMinMaxMean | ( | const InputImageType * | image, |
THistogramMeasurement & | minValue, | ||
THistogramMeasurement & | maxValue, | ||
THistogramMeasurement & | meanValue | ||
) | [protected] |
Compute min, max and mean of an image.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::ConstructHistogram | ( | const InputImageType * | image, |
HistogramType * | histogram, | ||
const THistogramMeasurement | minValue, | ||
const THistogramMeasurement | maxValue | ||
) | [protected] |
Construct a histogram from an image.
virtual::itk::LightObject::Pointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::CreateAnother | ( | void | ) | const [virtual] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GenerateInputRequestedRegion | ( | ) | [virtual] |
This filter requires all of the input to be in the buffer.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
virtual const char* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
virtual SizeValueType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetNumberOfHistogramLevels | ( | ) | const [virtual] |
Set/Get the number of histogram levels used.
virtual SizeValueType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetNumberOfMatchPoints | ( | ) | const [virtual] |
Set/Get the number of match points used.
virtual HistogramType* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetOutputHistogram | ( | ) | [virtual] |
Methods to get the histograms of the source, reference, and output. Objects are only valid after Update() has been called on this filter.
virtual HistogramType* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetReferenceHistogram | ( | ) | [virtual] |
Methods to get the histograms of the source, reference, and output. Objects are only valid after Update() has been called on this filter.
const InputImageType* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetReferenceImage | ( | void | ) |
virtual HistogramType* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetSourceHistogram | ( | ) | [virtual] |
Methods to get the histograms of the source, reference, and output. Objects are only valid after Update() has been called on this filter.
const InputImageType* itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetSourceImage | ( | void | ) | [inline] |
Set/Get the source image.
Definition at line 107 of file itkHistogramMatchingImageFilter.h.
virtual bool itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::GetThresholdAtMeanIntensity | ( | ) | const [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.
static Pointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::operator= | ( | const Self & | ) | [private] |
PushBackInput(), PushFronInput() in the public section force the input to be the type expected by an ImageToImageFilter. However, these methods end of "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, virtual] |
End concept checking
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::SetNumberOfHistogramLevels | ( | SizeValueType | _arg | ) | [virtual] |
Set/Get the number of histogram levels used.
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::SetNumberOfMatchPoints | ( | SizeValueType | _arg | ) | [virtual] |
Set/Get the number of match points used.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::SetReferenceImage | ( | const InputImageType * | reference | ) |
Set/Get the reference image.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::SetSourceImage | ( | const InputImageType * | source | ) | [inline] |
Set/Get the source image.
Definition at line 105 of file itkHistogramMatchingImageFilter.h.
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::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.
void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::ThreadedGenerateData | ( | const OutputImageRegionType & | outputRegionForThread, |
ThreadIdType | 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).
Reimplemented from itk::ImageSource< TOutputImage >.
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::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.
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::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.
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::typedef | ( | Concept::Convertible< int, InputPixelType > | ) |
Begin concept checking This class requires IntConvertibleToInputCheck in the form of ( Concept::Convertible< int, InputPixelType > )
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::typedef | ( | Concept::SameDimension< ImageDimension, OutputImageDimension > | ) |
This class requires SameDimensionCheck in the form of ( Concept::SameDimension< ImageDimension, OutputImageDimension > )
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::typedef | ( | Concept::Convertible< double, InputPixelType > | ) |
This class requires DoubleConvertibleToInputCheck in the form of ( Concept::Convertible< double, InputPixelType > )
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::typedef | ( | Concept::Convertible< double, OutputPixelType > | ) |
This class requires DoubleConvertibleToOutputCheck in the form of ( Concept::Convertible< double, OutputPixelType > )
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::typedef | ( | Concept::Convertible< InputPixelType, double > | ) |
This class requires InputConvertibleToDoubleCheck in the form of ( Concept::Convertible< InputPixelType, double > )
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::typedef | ( | Concept::Convertible< OutputPixelType, double > | ) |
This class requires OutputConvertibleToDoubleCheck in the form of ( Concept::Convertible< OutputPixelType, double > )
itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::typedef | ( | Concept::SameType< InputPixelType, OutputPixelType > | ) |
This class requires SameTypeCheck in the form of ( Concept::SameType< InputPixelType, OutputPixelType > )
virtual void itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::VerifyInputInformation | ( | ) | [inline, protected, virtual] |
Override VeriyInputInformation() since this filter does not expect the input images to occupy the same physical space.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 184 of file itkHistogramMatchingImageFilter.h.
const unsigned int itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::ImageDimension = TInputImage::ImageDimension [static] |
ImageDimension enumeration.
Definition at line 81 of file itkHistogramMatchingImageFilter.h.
GradientArrayType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_Gradients [private] |
Definition at line 227 of file itkHistogramMatchingImageFilter.h.
double itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_LowerGradient [private] |
Definition at line 228 of file itkHistogramMatchingImageFilter.h.
SizeValueType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_NumberOfHistogramLevels [private] |
Definition at line 201 of file itkHistogramMatchingImageFilter.h.
SizeValueType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_NumberOfMatchPoints [private] |
Definition at line 202 of file itkHistogramMatchingImageFilter.h.
HistogramPointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_OutputHistogram [private] |
Definition at line 221 of file itkHistogramMatchingImageFilter.h.
OutputPixelType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_OutputIntensityThreshold [private] |
Definition at line 207 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_OutputMaxValue [private] |
Definition at line 216 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_OutputMeanValue [private] |
Definition at line 217 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_OutputMinValue [private] |
Definition at line 215 of file itkHistogramMatchingImageFilter.h.
TableType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_QuantileTable [private] |
Definition at line 224 of file itkHistogramMatchingImageFilter.h.
HistogramPointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_ReferenceHistogram [private] |
Definition at line 220 of file itkHistogramMatchingImageFilter.h.
InputPixelType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_ReferenceIntensityThreshold [private] |
Definition at line 206 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_ReferenceMaxValue [private] |
Definition at line 213 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_ReferenceMeanValue [private] |
Definition at line 214 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_ReferenceMinValue [private] |
Definition at line 212 of file itkHistogramMatchingImageFilter.h.
HistogramPointer itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_SourceHistogram [private] |
Definition at line 219 of file itkHistogramMatchingImageFilter.h.
InputPixelType itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_SourceIntensityThreshold [private] |
Definition at line 205 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_SourceMaxValue [private] |
Definition at line 210 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_SourceMeanValue [private] |
Definition at line 211 of file itkHistogramMatchingImageFilter.h.
THistogramMeasurement itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_SourceMinValue [private] |
Definition at line 209 of file itkHistogramMatchingImageFilter.h.
bool itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_ThresholdAtMeanIntensity [private] |
Definition at line 203 of file itkHistogramMatchingImageFilter.h.
double itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::m_UpperGradient [private] |
Definition at line 229 of file itkHistogramMatchingImageFilter.h.
const unsigned int itk::HistogramMatchingImageFilter< TInputImage, TOutputImage, THistogramMeasurement >::OutputImageDimension = TOutputImage::ImageDimension [static] |
ImageDimension enumeration.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 83 of file itkHistogramMatchingImageFilter.h.