Package org.itk.simple
Class HistogramMatchingImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.HistogramMatchingImageFilter
Normalize the grayscale values for a source image by matching the
shape of the source image histogram to a reference histogram.
HistogramMatchingImageFilter normalizes the grayscale values of a source image based on the
grayscale values of either a reference image or a reference histogram.
This filter uses a histogram matching technique where the histograms
of the are matched only at a specified number of quantile values.
This filter was originally 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. With ThresholdAtMeanIntensityOn() , The reference histogram returned from this filter will expand the
first and last bin bounds to include the minimum and maximum intensity
values of the entire reference image, but only intensity values
greater than the mean will be used to populate the histogram.
The source image can be set via either SetInput() or SetSourceImage().
The reference object used is selected with can be set via
SetReferenceImage() or SetReferenceHistogram().
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.
REFERENCE
Laszlo G. Nyul, Jayaram K. Udupa, and Xuan Zhang, "New Variants of a
Method of MRI Scale Standardization", IEEE Transactions on Medical
Imaging, 19(2):143-150, 2000.
See:
itk::simple::HistogramMatching for the procedural interface
itk::HistogramMatchingImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkHistogramMatchingImageFilter.h
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::HistogramMatchingImageFilter::HistogramMatchingImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
HistogramMatchingImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::HistogramMatchingImageFilter::~HistogramMatchingImageFilter() DestructorImage itk::simple::HistogramMatchingImageFilter::Execute(const Image &image, const Image &referenceImage) Execute the filter on the input imageprotected void
finalize()
protected static long
getName()
std::string itk::simple::HistogramMatchingImageFilter::GetName() const Name of this classlong
uint32_t itk::simple::HistogramMatchingImageFilter::GetNumberOfHistogramLevels() const Set/Get the number of histogram levels used.long
uint32_t itk::simple::HistogramMatchingImageFilter::GetNumberOfMatchPoints() const Set/Get the number of match points used.boolean
bool itk::simple::HistogramMatchingImageFilter::GetThresholdAtMeanIntensity() const Set/Get the threshold at mean intensity flag.void
setNumberOfHistogramLevels
(long NumberOfHistogramLevels) Self& itk::simple::HistogramMatchingImageFilter::SetNumberOfHistogramLevels(uint32_t NumberOfHistogramLevels) Set/Get the number of histogram levels used.void
setNumberOfMatchPoints
(long NumberOfMatchPoints) Self& itk::simple::HistogramMatchingImageFilter::SetNumberOfMatchPoints(uint32_t NumberOfMatchPoints) Set/Get the number of match points used.void
setThresholdAtMeanIntensity
(boolean ThresholdAtMeanIntensity) Self& itk::simple::HistogramMatchingImageFilter::SetThresholdAtMeanIntensity(bool ThresholdAtMeanIntensity) Set/Get the threshold at mean intensity flag.protected static long
void
Self& itk::simple::HistogramMatchingImageFilter::ThresholdAtMeanIntensityOff()void
Self& itk::simple::HistogramMatchingImageFilter::ThresholdAtMeanIntensityOn() Set the value of ThresholdAtMeanIntensity to true or false respectfully.toString()
std::string itk::simple::HistogramMatchingImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
-
Constructor Details
-
HistogramMatchingImageFilter
protected HistogramMatchingImageFilter(long cPtr, boolean cMemoryOwn) -
HistogramMatchingImageFilter
public HistogramMatchingImageFilter()itk::simple::HistogramMatchingImageFilter::HistogramMatchingImageFilter() Default Constructor that takes no arguments and initializes default parameters
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::HistogramMatchingImageFilter::~HistogramMatchingImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setNumberOfHistogramLevels
public void setNumberOfHistogramLevels(long NumberOfHistogramLevels) Self& itk::simple::HistogramMatchingImageFilter::SetNumberOfHistogramLevels(uint32_t NumberOfHistogramLevels) Set/Get the number of histogram levels used. -
getNumberOfHistogramLevels
public long getNumberOfHistogramLevels()uint32_t itk::simple::HistogramMatchingImageFilter::GetNumberOfHistogramLevels() const Set/Get the number of histogram levels used. -
setNumberOfMatchPoints
public void setNumberOfMatchPoints(long NumberOfMatchPoints) Self& itk::simple::HistogramMatchingImageFilter::SetNumberOfMatchPoints(uint32_t NumberOfMatchPoints) Set/Get the number of match points used. -
getNumberOfMatchPoints
public long getNumberOfMatchPoints()uint32_t itk::simple::HistogramMatchingImageFilter::GetNumberOfMatchPoints() const Set/Get the number of match points used. -
setThresholdAtMeanIntensity
public void setThresholdAtMeanIntensity(boolean ThresholdAtMeanIntensity) Self& itk::simple::HistogramMatchingImageFilter::SetThresholdAtMeanIntensity(bool ThresholdAtMeanIntensity) 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. -
thresholdAtMeanIntensityOn
public void thresholdAtMeanIntensityOn()Self& itk::simple::HistogramMatchingImageFilter::ThresholdAtMeanIntensityOn() Set the value of ThresholdAtMeanIntensity to true or false respectfully. -
thresholdAtMeanIntensityOff
public void thresholdAtMeanIntensityOff()Self& itk::simple::HistogramMatchingImageFilter::ThresholdAtMeanIntensityOff() -
getThresholdAtMeanIntensity
public boolean getThresholdAtMeanIntensity()bool itk::simple::HistogramMatchingImageFilter::GetThresholdAtMeanIntensity() const 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. -
getName
std::string itk::simple::HistogramMatchingImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::HistogramMatchingImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::HistogramMatchingImageFilter::Execute(const Image &image, const Image &referenceImage) Execute the filter on the input image
-