[Insight-users] Finding intensity range for an image

Bing Jian bjian at cise.ufl.edu
Sun, 28 Mar 2004 16:10:49 -0500 (EST)


Google on "itk min max value" will give you following message.

[Insight-users] Re: Help in identifying the Min and
max intensity values
Luis Ibanez luis . ibanez at kitware . com
Fri, 26 Jul 2002 14:08:35 -0400

Previous message: [Insight-users] BSpline Interpolation
Next message: [Insight-users] MRIRegistration example has problems
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

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

Hi cspl,

In order to use the  itkMinimumMaximumImageFilter:
http://www.itk.org/Insight/Doxygen/html/classitk_1_1MinimumMaximumImageFilter.html

to compute the lowest and highest intensity values in an
image you have to call first the "Update()" method of the
filter.

The values returned by GetMinimum() and GetMaximum() are
only valid after calling Update(), before that they are
just initialized to the numeric min,max values of the
pixel type.


You may want to use the alternative "Calculator" class:

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

Which will not act as an image filter. In order to use this Calculator
class you must call first "Compute()" and then GetMinimum(),
and/or GetMaximum(). If you are interested in only one of them, you
can
use just "ComputeMinimum()" or "ComputeMaximum()" before calling
GetMinimum(), GetMaximum().

Hope that helps

    Luis




-- 
Best wishes,
Bing Jian
bjian at cise.ufl.edu


On Sun, 28 Mar 2004, Glenn Pierce wrote:

> Hi
>
> Does anyone know how I can acquire the maximum and mininum intensity
> values for an image in itk ?
>
> Basically this so I can auto scale the intensity range using
> SetColorWindow and SetColorLevel of vtkImageViewer for each image.
>
> Thanks
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>