[vtkusers] Reorienting the reslice plane with vtkResliceImageViewer

Colin Horne colin at cdfh.org.uk
Tue Oct 11 19:07:15 EDT 2016


Hi all,

I'm using the vtkResliceImageViewer class to display a 3D volume in oblique
mode, essentially as is done in the FourPaneViewer example program.The
reslice cursor widget lets me reorient a given reslice plane with the
mouse, but I would also like to set its orientation via the API. To this
end, I have tried:

viewer->GetResliceCursor()->SetYAxis(yaxis);
viewer->GetResliceCursor()->Modified();
viewer->Render();

where 'viewer' is an instance of vtkResliceImageViewer and 'yaxis' has type
double[3].

Unfortunately, however, the code has no effect on the orientation of the
slice. Indeed, after the call to Render(), calling GetYAxis() reveals that
the changes have been overwritten.

I'm afraid that I'm entirely new to VTK, and so am perhaps missing
something embarrassingly obvious. I would be very grateful for any
suggestions. I should mention that I'm hoping there might be a solution
that is compatible with the existing vtkResliceCursorWidget (i.e., rather
than using vtkResliceImage directly), as I still need to allow reorienting
via the mouse.

Many thanks!

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161012/2c8ae409/attachment.html>


More information about the vtkusers mailing list