[Insight-developers] new RescaleIntensityImageFilter

Luis Ibanez luis.ibanez@kitware.com
Tue, 07 May 2002 00:37:02 -0400


Hi,

a new filter  :   itkRescaleIntensityImageFilter has been checked in,


It responds to the need of applying a linear transform to the intensity
levels of the input image such that range of the intensity on the output
image will satisfy a given min and max values.

The similar computation could have been done by combining
the itkMinimumMaximumImageFilter and the itkShiftScaleImageFilter
but because the pipeline cannot propagate Update through float values
this two filters would have to be updated by other means (e.g. Events).

The Filter follows the style of the itkBinaryThresholdImageFilter that
Lydia checked in recently.  It takes advantages of the ivars on the
Functor for performing the computation.

The Functor is prepared on the "BeforeThreadedGenerateData()".
where MinMax ImageCalculator is used as a helper class.


A similar approach could be used for the itkNormalizeImageFilter
which is also applying a linear operation on intensity but with the aim
of normalizing the standard deviation of the intensities on the output
image.


The itkRescaleIntensityImageFilter is intended to be used for
preparing images to be displayed (e.g. make them fit in the range 0->255)
or to be saved in files (e.g. when writing to PNG files, the values are
usually "unsigned short" so images with negative values have to be
scaled in intensity).


The Filter is checked in in Code/BasicFilters but its test was checked
in Testing/Code/Algorithms because the filter uses the  class
itkMininumMaximumImageCalcultor which is in "Algorithms".
The Code/Algorithms directory is not included for "BasicFilter" tests.

Maybe the MinimumMaximumCalculator could be moved to
Code/Common.  It is a  pretty common class anyways....



      Luis