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

David Doria daviddoria at gmail.com
Thu Sep 15 18:04:49 EDT 2011


On Thu, Sep 15, 2011 at 5:54 PM, HansAusBremen <hansausbremen at gmx.net>wrote:

> Hi David,
>
> thanks for the fast response.
>
> I would need the maximum and minimum values of my image to compute the
> scale.
> How do i get those?
>
> Before scaling i would have to put my minimum value to 0. Substract the
> minimum from all values. How do you do that in vtk?
>
> Hans


The subtraction could be done with the Shift part of the
vtkShiftScaleFilter.

This seems to do the trick for getting min/max values:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageValueRange

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110915/901a7925/attachment.htm>


More information about the vtkusers mailing list