[vtkusers] Displaying Every Voxel in a 3D Image
Valerie Coffman
valerie.coffman at nist.gov
Wed Dec 3 16:55:39 EST 2008
Dear VTK Users and Developers,
I am writing about a problem with displaying *all* of the voxels in a 3D
image. A related problem was discussed in this thread:
http://public.kitware.com/pipermail/vtkusers/2002-July/061952.html
I am using a vtkImageData object with the
vtkFixedPointVolumeRayCastMapper. The problem is that an X by Y by Z
image is displayed as an X-1 by Y-1 by Z-1 image. Clearly, this is not
the behavior a user would expect. (I'm aware that with other mappers,
instead of placing the sample point at the lower left corner , the
voxels are centered around the sample points -- all voxels are
displayed, but the voxels on the boundaries are cut.) We and our users
expect to load a 3D image and display every voxel as an equally sized
box. In order to achieve this with the current VTK code, we have to
either pad our images on three sides or copy the
vtkFixedPointVolumeRayCastMapper code and modify a few of the
functions. Both of these options are messy hacks.
I understand the argument, made by Ken Martin in the thread I linked to
above, that images are defined between their sample points. However I
feel strongly that the user should be able to display every voxel in its
entirety without resorting to messy hacks. Does anyone have a
suggestion for a cleaner work around? One possible solution is to add
an option to the vtkFixedPointVolumeRayCastMapper that allows the users
to choose the bounds of the vtkVolume independently of the bounds of the
vtkImageData such that the bounds contain all of the voxels. Would the
vtk developers consider adding this functionality? I am willing to
submit the code.
Thank you,
Valerie
More information about the vtkusers
mailing list