[vtkusers] vtkImageSlice and vtkImageReslice Mapper

Sahithya Wintrich s.prakash at csuohio.edu
Fri Nov 2 17:39:12 EDT 2012


Hello,

I am new to VTK and visualization in general. I am trying to extract a 2D
slice from a 3D volume. The classes I use are as follows:

vtkImageReader - reads the stack of 2D CT images
vtkVolumeTextureMapper2D - Maps the volume

in order to get a slice defined by a vtkPlane with origin and normal
corresponding to the slice of interest, I use:

    mapper = vtkImageResliceMapper::New();
    mapper->SetInputConnection(
reader->GetOuputPort());
    mapper->SetSlicePlane(plane);

    slice = vtkImageSlice::New();
    slice->SetMapper(mapper);

    renderer->AddViewProp(slice);

I understand that the vtkImageSlice is a 3D prop and I tried using
suggestions to change the position and focal point of the camera. However,
this is still displayed in a 3D space. I need to display this as a 2D slice
with a correct view (for oblique slices as well) and prevent the user from
rotating the slice.

Any help would be greatly appreciated!

Sahithya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121102/14906978/attachment.htm>


More information about the vtkusers mailing list