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

David Doria daviddoria at gmail.com
Mon Sep 19 08:20:14 EDT 2011


On Mon, Sep 19, 2011 at 6:04 AM, HansAusBremen <hansausbremen at gmx.net> wrote:
> Thanks for help so far.
> But i got another question. As i wrote, i got a .raw-File, with 3 Dimensions
> for a voxel-representation which i read in with vtkImageReader.
>
> Is there a method or class to get the value of each voxel? Because i want to
> use this value to calculate the avarage of all voxels. As i know this value
> is only a gray value.
> Can i get value from vtkImageReader or shall i use a mapper first?

You can loop over the voxels of an ImageData like this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/IterateImageData

David



More information about the vtkusers mailing list