[vtk-developers] A new way to look at images

David Gobbi david.gobbi at gmail.com
Sat Jan 22 13:54:17 EST 2011


Hi Cartik,

Multiple datasets can be composited by adding multiple vtkImage
"actors" to the renderer.  The alpha channel of the images (or the
Opacity setting of the property) will control the blending.  Also,
because vtkImage is a vtkProp3D subclass, it has a vtkMatrix4x4 that
provides the data-to-world coordinate transformation.  So having a
separate vtkImage for each vtkImageData allows you to set a different
transform for each image.

One thing that I'm definitely going to have to do is look at the vtk
painters to see how to get them to play nicely with the new mappers.
There is a lot of potential to do customized filtering and compositing
at the rendering stage via GPU programming.

I'm open to suggestions for different ways of compositing the images.
The current scheme requires that users add the images to the render in
the correct order in order to have the compositing work properly, and
only alpha-compositing is supported.  I've though that it might be
nicer to have an "ImageLayer" ivar or something similar to control the
ordering, but I haven't yet convinced myself that this would be the
best way to go.

 - David


On Sat, Jan 22, 2011 at 10:19 AM, cartik sharma <cartik.sharma at gmail.com> wrote:
> Hi David,
> Interesting functionality and perspective. I like the way the mapper
> implicitly handles
> image reslicing and event callbacks.
> Could we implement this so we have the same mapper for reslicing of multiple
> datasets or would this imply creating one mapper for each dataset.
> Best regards,
> Cartik



More information about the vtk-developers mailing list