[vtkusers] Volume rendering with multiple scalars in one vtkImageData

Lisa Avila lisa.avila at kitware.com
Thu Jun 30 12:52:52 EDT 2005


Hi Charles,

You should be able to render vtkImageData with multiple components in the 
scalars using vtkFixedPointVolumeRayCastMapper. If you are rendering these 
as non-independent components (2 or 4 component) then you can also use 
vtkVolumeTextureMapper3D. The other volume rendering classes will not work 
correctly with anything but 1 component unsigned char or unsigned short.

When rendering multiple components independently, you do need to specify 
parameters per component in the vtkVolumeProperty. It should not crash if 
you do not, but it may not produce an image.

The volume mappers for vtkImageData currently render only the scalars in 
the point data. The unstructured grid volume mappers will render any point 
or cell data which can be specified by the user. Eventually this interface 
will migrate to the structured volume rendering as well.

You should be able to extract a single component from multi component 
scalars and render this. Perhaps these are not being assigned to the 
scalars in the point data, but instead are just some other field?


Lisa





At 05:49 PM 6/29/2005, Charles Boivin wrote:
>Greetings,
>
>I have been doing some volume rendering using a vtkImageData as input
>for a while now... but I've always only had a single scalar in the
>vtkImageData until now. I have now the need to have multiple scalars
>in a single vtkImageData structure, and this seems to make my code
>crash (i.e. if I pass a vtkImageData with 2 scalars to the volume
>rendering classes, it crashes; if there is only one scalar, it works
>perfectly).
>
>1) Is this supposed to work, i.e. is this an indication of a problem
>elsewhere in my code?
>
>2) If it is possible, is there a way to choose which scalar will be
>used by the volume rendering classes?
>
>I've even tried to 'extract' a single array and put that into its own
>vtkImageData and feed that to the volume rendering classes -- even
>tough it seems that this should work properly, it does not.
>
>Thank you in advance for your answers,
>
>Charles Boivin
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list