[vtkusers] voxel values in vtkImageData

Thomas Faust tf at thermoanalytics.com
Thu May 6 17:42:56 EDT 2004


Hi VTK users,

Lately I'm confronted with volume rendering. I decided to use VTK as graphical 
tool to render a huge mass of data. So far, I'm impressed by the power and 
usability of VTK.

My problem is the handling of vtkImageData in vtkVolumeMapper.
My model is created by a collection of values in 3 directions (x,y,z). These 
are stored in vtkImageData.
I expect a volume that extent 3 values(voxels) in each direction to be 3 
length units long. But it isn't (It's just 2). The reason for this is, that 
the vtkVolumeMapper interprets 3 points in one direction as 3 corner points 
(vertices) of voxels. So I end up with 2 voxels that are a mixture between my 
original values.

The problem is that a interpolation between these values is not a option, 
because two values that are even close together means totaly different 
things. (e.g. 0x40 is material A, 0x41 is material B)

How can I change one of the vtkVolumeMappers to interpret the values in 
vtkImageData to be voxel-based and not vertex-based?

Any comments are welcome and will be answered.
Thanks in advance



More information about the vtkusers mailing list