[vtkusers] Blending two volumes

Lisa Avila lisa.avila at kitware.com
Thu Sep 11 13:47:38 EDT 2003


Hello Janne,

The current mappers in VTK do not render multi-component data.  You can 
render multiple volumes, but they cannot overlap. If you can find some way 
to put your two volumes into one then you may be able to set up a clever 
transfer function to show both of them (I've seen this done for example 
with CT and fMRI data, or CT and radiation dose) but this is not easy. 
Another idea would be to extract surfaces from the data set that you wish 
to display as "opaque green" - these surfaces can be intermixed with the 
volume rendering of the greyscale data.

The volume property has been generalized to support the rendering of 
multiple component data in the future. This functionality will likely be 
available for unstructured grid volume rendering within the next year.

You may want to check out VolView 2.0 (it should be announced on this list 
some time next week). It will be able to render two component data, 
allowing you to interactively adjust the weighting of the two components.

Lisa

At 08:41 AM 8/25/2003, Hämäläinen Janne wrote:
>Hi all,
>
>I have a following situation: I have two vtkImageData objects (tomographic
>medical data) that I want to display using volume rendering. I would want to
>blend them (as with vtkImageBlend), so that both objects would have
>different colors, e.g., so that I had a gray translucent data set and inside
>that an opaque green area.
>
>I have done the same thing for 2D slices extracted from the volume by
>mapping the original intensity levels of the images to colors with
>vtkImageMapToColors (using a different vtkLookupTable for both) and
>combining the results with vtkImageBlend. The results can be shown easily
>with 2D texture mapping. For 3D rendering this doesn't seem a possible way
>to do things. I can of course map the volumes to different colors and blend
>them, but volume rendering seems to assume that the mapped data has no
>colors, but instead a vtkColorTransferFunction is used to map the intensity
>levels. Different color transfers can be specified for each component of the
>input data, but I don't understand how this is interpreted. Is it simply
>that you can specify what component to use for volume rendering? And is
>there any way to use the original color components of the input vtkImageData
>in volume rendering to get the desired effect?
>
>I also tried rendering (ray casting) the two volumes to a same scene using a
>different color transfer for both, but the results weren't satisfactory. The
>volume that was rendered last (it is inside the other volume) is not veiled
>by the other translucent volume, but instead is shown as though it were
>outside it. The toggle IntermixIntersectingGeometry is on, although I would
>guess that it hasn't any effect on volumes, right?
>
>If anyone 1. knows a way to volume render colored image data (or knows that
>it is not possible), or 2. knows if there is a way to render multiple
>volumes to a same scene so that overlapping parts are blended, I would
>gladly accept any information,
>
>-Janne
>
>
>
>--
>Janne Hämäläinen
>Research Assistant
>Helsinki University Central Hospital
>X-ray Department
>
>email   janne.hamalainen at hus.fi
>
>
>_______________________________________________
>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