Casting and Intensity Mapping Filters


    itk-RescaleIntensityImage

    This filter linearly rescales the pixel values, so that the minimum and maximum input values are mapped to minimum and maximum user-defined values. This is used to force the range of an image to fit a particular scale.

    Usage: itk-RescaleIntensityImage inputImageFile dimension outputImageFile minimum_value maximum_value
    Below is a set of sample output files, next to their parent input file. The minimum and maximum values are respectively: 0-50,50-100,100-150,150-255, with the following set of commands:
    itk-RescaleIntensityImage lafarge3col.tif rescale0-50.tif 2 0 50
    itk-RescaleIntensityImage lafarge3col.tif rescale50-100.tif 2 50 100
    itk-RescaleIntensityImage lafarge3col.tif rescale100-150.tif 2 100 150
    itk-RescaleIntensityImage lafarge3col.tif rescale150-255.tif 2 150 255

original data original data original data original data original data

    itk-ShiftScaleImage

    This filter applies a linear transformation to the intensities of the input image. This transformation is defined by 2 user input values:
    outputPixel = inputPixel*(scale_value) + shift_value;

    Usage: itk-ShiftScaleImage inputImageFile outputImageFile dimension scale_value shift_value
    Below is a series of filtered images where the shift is varied, using the following commands:
    itk-ShiftScaleImage lafarge3col.tif shift1.tif 2 50 1.1
    itk-ShiftScaleImage lafarge3col.tif shift2.tif 2 30 1.1
    itk-ShiftScaleImage lafarge3col.tif shift3.tif 2 -50 1.1

original data original data original data original data

    itk-NormalizeImage

    The linear transformation applied by this filter such that the statistical distribution of gray levels in the output image have zero mean and a variance of one:
    outputPixel = (inputPixel-mean)/sqrt(variance)

    Usage: itk-NormalizeImage inputImageFile outputImageFile dimension

    itk-SigmoidImage

    This filter maps a range of input pixel intensities to a different range, by making a smooth, continuous transition in the borders of the range. This is used mostly for focusing attention on a particular set of values. There are 4 different parameters to select the intensity range:
    OutputPixel_Intensity = (Max - Min)/(1 + exp(-(InputPixel_Intensity-Beta)/Alpha)) + Min
    Alpha defines the width of the intensity range. Beta defines the center of the intensity range.

    Usage: itk-SigmoidImage inputImageFile outputImageFile dimension sigmoidAlpha sigmoidBeta outputMinimum outputMaximum
    Below is a series of pictures of an image filtered with varying values of beta = 120,170,220, using the following commands:
    itk-SigmoidImage lafarge3col.tif sig170.tif 2 10 170 10 240
    itk-SigmoidImage lafarge3col.tif sig120.tif 2 10 120 10 240
    itk-SigmoidImage lafarge3col.tif sig220.tif 2 10 220 10 240

original data original data original data original data


Last updated November 18, 2005