[Insight-users] Greyvalue intensity reversal

Luis Ibanez luis.ibanez@kitware.com
Fri, 13 Dec 2002 09:37:01 -0500


Hi Puja,

You can use the ShiftScale filter to do
intensity reversal:

http://www.itk.org/Insight/Doxygen/html/classitk_1_1ShiftScaleImageFilter.html

It applies a linear transformation
to the intensity level of the image.

You may want to specify -1 as the scale
and the maximum intensiy of your image as
the shift.

You can use the MinimumMaximumImageCalculator
in order to find the intensity range of the
input image.

http://www.itk.org/Insight/Doxygen/html/classitk_1_1MinimumMaximumImageCalculator.html

An example of the ShiftScale filter is available at

   Insight/Examples/Filtering/CastingImageFilters.cxx

Please let us know if you have any questions,

Thanks


Luis

-------------------------------



Puja Malik wrote:
> Hello,
> I was wondering if there is an ITK function available that will reverse 
> the greyvalues in an image such that black pixels can be changed to 
> white and vice versa.
> 
> Thanks for your help,
> Puja
> 
> -- 
> ---------------------------------------
> Puja Malik
> M. E. Müller Institute for Biomechanics
> University of Bern
> P. O. Box 30
> 3010 Bern
> Switzerland
> Phone: +41-31-632-8730
> Fax: +41-31-632-4951
> Email: Puja.Malik@memot.unibe.ch
> ---------------------------------------
> 
>