[vtkusers] Scale Image Values to [0,1]

Dženan Zukić dzenanz at gmail.com
Fri Sep 16 09:40:58 EDT 2011


Below is the classic way of getting max. Same for min, and they can both be
computed in one pass.

typedef itk::MinimumMaximumImageCalculator< InternalImageType >
 CalculatorType;
CalculatorType::Pointer calculatorI = CalculatorType::New();
calculatorI->SetImage( someImage);
calculatorI->ComputeMaximum();
maxValue = calculatorI->GetMaximum();

On Fri, Sep 16, 2011 at 11:29, HansAusBremen <hansausbremen at gmx.net> wrote:

> Thank you David and Jothy.
>
> I have another question: I just realized I would prefer the values of my
> Image to be mapped to integers from 0 to number of values. I also had the
> idea of using a histogram to get all the possible values. Do you think this
> would be the fastest way or is there another better alternative?
>
> Hans
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Scale-Image-Values-to-0-1-tp4808465p4810086.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110916/dd6a5672/attachment.htm>


More information about the vtkusers mailing list