[Insight-users] brightness - contrast - gamma

Luis Ibanez luis.ibanez at kitware.com
Mon, 01 Mar 2004 22:24:02 -0500


Hi Martin,

The concepts of

     - "Brightness",
     - "Contrast"
     - "Gamma correction"

are mostly associated to visualization.


Gamma for example is a correction for non-linearities between
the emision of CRT screens and the perception of the human visual
system. Since ITK is an image analysis toolkit and not a visualization
toolkit, you will find limited support for such features in ITK.


You can find the equivalent of contrast and brightness corrections
in the filters:


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

  - RescaleIntensityImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1RescaleIntensityImageFilter.html

  - IntensityWindowingImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1IntensityWindowingImageFilter.html


If you are really attached to the idea of implementing
Gamma correction, you could easily do this by modifying
the code of the RescaleIntensityImageFilter, that derives
from the UnaryFunctorImageFilter.
http://www.itk.org/Insight/Doxygen/html/classitk_1_1UnaryFunctorImageFilter.html

You simply program you Gamma function as a 'Functor' as
use it as the third template parameter of this filter.



If you are doing this only for visualization, you may
find more productive to combine ITK and VTK. Details on
how to do this are available in the tutorial sessions:

        http://www.itk.org/HTML/Tutorials.htm

in particular in

http://www.itk.org/CourseWare/Training/GettingStarted-II.pdf



Regards,


    Luis



----------------------------------
Martim Guilherme Schnack wrote:

> hi,
> 
> i'm writing a program that need to do some manipulations in images and
> i'm using itk
> but i didn't find a way to change the brightness/contrast/gamma of the
> image... 
> i really think that such simple functions are implemented in itk, but i
> can't find them
> 
> can any of you could tell me what i have to do?
> 
> thanks,
> 
> --martim
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>