[vtkusers] voxel values in vtkImageData

David Gobbi dgobbi at imaging.robarts.ca
Thu May 6 17:56:48 EDT 2004


Hi Thomas,

It looks like all you need to do is turn off interpolation:

volume->GetProperty()->SetInterpolationTypeToNearest();



On Thu, 6 May 2004, Thomas Faust wrote:

> 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
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list