interfaces.slicer.filtering.histogrammatching

HistogramMatching

Link to code

Wraps command **HistogramMatching **

title: Histogram Matching

category: Filtering

description: 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.

The filter was orginally designed to normalize MR images of the sameMR 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. ThresholdAtMeanIntensity switches on this simple background exclusion method.

Number of match points governs the number of quantile values to be matched.

The 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.

version: 0.1.0.$Revision: 19608 $(alpha)

documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/HistogramMatching

contributor: Bill Lorensen (GE)

acknowledgements: This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.

Inputs:

[Mandatory]

[Optional]
args: (a string)
        Additional parameters to the command
        flag: %s
environ: (a dictionary with keys which are a value of type 'str' and
         with values which are a value of type 'str', nipype default value:
         {})
        Environment variables
ignore_exception: (a boolean, nipype default value: False)
        Print an error message instead of throwing an exception in case the
        interface fails to run
inputVolume: (an existing file name)
        Input volume to be filtered
        flag: %s, position: -3
numberOfHistogramLevels: (an integer (int or long))
        The number of hisogram levels to use
        flag: --numberOfHistogramLevels %d
numberOfMatchPoints: (an integer (int or long))
        The number of match points to use
        flag: --numberOfMatchPoints %d
outputVolume: (a boolean or a file name)
        Output volume. This is the input volume with intensities matched to
        the reference volume.
        flag: %s, position: -1
referenceVolume: (an existing file name)
        Input volume whose histogram will be matched
        flag: %s, position: -2
terminal_output: ('stream' or 'allatonce' or 'file' or 'none')
        Control terminal output: `stream` - displays to terminal immediately
        (default), `allatonce` - waits till command is finished to display
        output, `file` - writes output to file, `none` - output is ignored
threshold: (a boolean)
        If on, only pixels above the mean in each volume are thresholded.
        flag: --threshold

Outputs:

outputVolume: (an existing file name)
        Output volume. This is the input volume with intensities matched to
        the reference volume.