[vtk-developers] volume rendering input

Lisa Sobierajski Avila lisa.avila at kitware.com
Fri Jul 28 15:18:27 EDT 2000


Hi everyone,

After realizing that there is no limit to the amount of times you can track 
down the same bug, I have changed the input in vtkVolumeMapper to be 
vtkImageData* rather than vtkStructuredPoints* (some similar changes had to 
occur in the gradient encoder and various other places the input was passed 
/ stored). Since vtkStructuredPoints is a subclass of vtkImageData this 
does not have any real API change - but if you do happen to have your own 
subclass of vtkVolumeMapper or vtkEncodedGradientEstimator, you should NOT 
cast the input to be a vtkStructuredPoints and when you update your input 
you should be careful to update the whole extent.

The "bug" that I ran into was this: you have vtkImageData data that you 
pass as the input into two different volume mappers (ray casting and 
texture mapping). You are sharing the data, and of course you'd like to 
share the gradient information as well so you set the gradient encoder of 
the two mapper to be the same object. But - your normals will recomputed 
every time. This is because the vtkImageData goes through a 
vtkImageToStructuredPoints filter - in VTK 2.4 this would have been the 
same filter producing the same output, but there were some serious problems 
with that so now it is two different filters producing two different 
outputs. Hence, the normals recompute every time you switch between the two 
mappers.

Lisa





More information about the vtk-developers mailing list