[Insight-developers] new RescaleIntensityImageFilter
Miller, James V (Research)
millerjv@crd.ge.com
Tue, 7 May 2002 09:13:54 -0400
Luis,
I haven't looked at your code yet but you could have also done what
Bill did in the NormalizeImageFilter. The NormalizeImageFilter uses
a mini-pipeline and manages the mini-pipeline to move statistics calculated
on one filter in the mini-pipeline to Set*() methods in another filter
in the mini-pipeline.
The MinMaxCalculator should be moved into BasicFilters.
-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
Sent: Tuesday, May 07, 2002 12:37 AM
To: Insight Developers
Subject: [Insight-developers] new RescaleIntensityImageFilter
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
_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers