Class HistogramMatchingImageFilter

java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.HistogramMatchingImageFilter

public class HistogramMatchingImageFilter extends ImageFilter
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
  • 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

      protected static long getCPtr(HistogramMatchingImageFilter obj)
    • swigRelease

      protected static long swigRelease(HistogramMatchingImageFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      virtual itk::simple::HistogramMatchingImageFilter::~HistogramMatchingImageFilter() Destructor
      Overrides:
      delete in class ImageFilter
    • 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

      public String getName()
      std::string itk::simple::HistogramMatchingImageFilter::GetName() const Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::HistogramMatchingImageFilter::ToString() const Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Image execute(Image image, Image referenceImage)
      Image itk::simple::HistogramMatchingImageFilter::Execute(const Image &image, const Image &referenceImage) Execute the filter on the input image