[vtkusers] Problem with vtkImageResliceMapper and vtkCutter

ochampao ochampao at hotmail.com
Wed Jul 18 05:52:56 EDT 2018

Hello vtkUsers,

My application uses a vtkImageStack for overlaying slices of medical images
from multiple volumes. Briefly the pipeline is: vtkDICOMImageReader ->
vtkImageResliceMapper -> vtkImageSlice -> vtkImageStack.

On these 2D views, I am also overlaying cross-sections of polygonal volumes
(e.g. from a vtkSphereSource) extracted using a vtkCutter instance. The cut
function is set to the vtkImageResliceMapper's slice plane, i.e.
cutter->SetCutFunction(resliceMapper->GetSlicePlane()); The slice plane is
updated when the camera focus changes and the output of the cutter is
updated automatically accordingly.

This works well but in some cases the extracted cross-section seems to
disappear for some slice planes. In particular, when the camera is such that
we are slicing through the volume along the z-axis, there is no problem. If
the camera is set such that we are slicing along the x, or y-axis then the
problem appears. For some slice planes, the actor representing the
cross-section disappears, as if it is hidden by the image slice. Setting the
opacity to 0.5 of the vtkImageSlice and the vtkImageStack does not however
make the missing cross-sections visible. 

I suspect that this happens because the slicing plane is slightly further
away from camera focus. By looking at the source code of
vtkImageResliceMapper, when JumpToNearestSlice is on, the plane should be
aligned with a slice.

Why is this behaviour happening, and how can this be fixed? 

Any suggestions are welcome. 


Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html

More information about the vtkusers mailing list