[vtkusers] Scaling and Volume Mapper Samples

Kevin H. Hobbs hobbsk at ohiou.edu
Wed Nov 26 10:36:06 EST 2008


I've been having a horrible time with image volume rendering, and I
think I just figured out why. 

I was not taking sampling distance and the opacity unit distance into
account. I've taken calculus, and differential equations. My bread and
butter is running simulations with ODEs. I should know better.

If I scale a volume and I want the volume rendering to look the same,
then I must also scale the what I set for
vtkVolumeProperty::SetScalarOpacityUnitDistance and
vtkFixedPointVolumeRayCastMapper::SetSampleDistance.

If I cut out a piece of a volume and I want the volume rendering to look
the same as it did in the whole volume, then I must leave what I set for
vtkVolumeProperty::SetScalarOpacityUnitDistance alone, and scale what I
set for vtkFixedPointVolumeRayCastMapper::SetSampleDistance.

If I don't set vtkFixedPointVolumeRayCastMapper::SetSampleDistance at
all the mapper will sometimes sample so sparsely that it will miss thin
structures or even miss most of the volume. If I want every pixel to be
represented in the volume rendering, then I have to set the sampling
distance shorter than the pixel size.

I had no trouble with volume rendering unstructured data because there's
no sample distance. The exact distance each ray takes to pass through
each intersected cell is known and color and opacity are integrated over
that distance.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081126/f083f7bf/attachment.pgp>


More information about the vtkusers mailing list