<font size="2"><font face="verdana,sans-serif"><div><div>Below is the classic way of getting max. Same for min, and they can both be computed in one pass.</div><div><br></div><div>typedef itk::MinimumMaximumImageCalculator< InternalImageType > CalculatorType;</div>
<div>CalculatorType::Pointer calculatorI = CalculatorType::New();</div><div>calculatorI->SetImage( someImage);</div><div>calculatorI->ComputeMaximum();</div><div>maxValue = calculatorI->GetMaximum();</div></div>
</font></font><br>
<div class="gmail_quote">On Fri, Sep 16, 2011 at 11:29, HansAusBremen <span dir="ltr"><<a href="mailto:hansausbremen@gmx.net">hansausbremen@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you David and Jothy.<br>
<br>
I have another question: I just realized I would prefer the values of my<br>
Image to be mapped to integers from 0 to number of values. I also had the<br>
idea of using a histogram to get all the possible values. Do you think this<br>
would be the fastest way or is there another better alternative?<br>
<br>
Hans<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Scale-Image-Values-to-0-1-tp4808465p4810086.html" target="_blank">http://vtk.1045678.n5.nabble.com/Scale-Image-Values-to-0-1-tp4808465p4810086.html</a><br>
</font><div><div></div><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>