[vtkusers] Overlaying a slice on top of a vtk volume
David Gobbi
david.gobbi at gmail.com
Mon Feb 8 17:20:49 EST 2010
As long as an orthogonal slice is okay (i.e. along the x, y, or z
direction), just use vtkImageActor and use the SetDisplayExtent method
of the image actor to set the slice that you want to display.
ImageActor expects RGB (or RGBA) data, so you will have to pass the
image through vtkImageMapToColors (with an appropriate vtkLookupTable)
before putting it into the image actor.
You will probably also have to add a vtkPlane to the VolumeMapper as a
clipping plane, so that you can clip away the part of the volume that
would otherwise be in front of the image. The clipping plane must be
set to coincide with the image slice shown on the image actor.
David
On Mon, Feb 8, 2010 at 2:56 PM, Anja Ende <anja.ende at googlemail.com> wrote:
> Hello everyone,
>
> I am going a simple volume rendering with vtkVolume and it seems to
> all work ok. One thing I want to do is overlay a slice on top of this
> rendered volume. For doing the volume rendering, I used David Gobbi's
> Medical4.cxx example and it works quite well.
>
> So, I want to create a small animation where I render the volume and
> render some particular slice (vtkImageData) on top of it. What would
> be the best way to go about doing this?
>
> Cheers,
>
> Anja
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK 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