[vtkusers] vtkImageReslice of volume initialized using vtkImagePlaneWidget data

Miguel Sotaquirá msotaquira at gmail.com
Wed Mar 14 02:17:01 EDT 2012


Hello everybody,

I have a 3D volume and I want to extract a set of 2D  radial oblique
slices. In order to do so I need to define my initial slice, in terms of
origin, normal and axes; this initial slice is obtained manually (using the
same approach described in Examples/GUI/Qt/FourPaneViewer/ of vtk's devel
version) from vtkImagePlaneWidget->GetResliceAxes(), which gives me
a vtkMatrix4x4 "matrix" containing the origin and axes that define this
slice (plane). I want to use this information to obtain an oblique slice
from the 3D volume using this pipeline:

   vtkSmartPointer<vtkImageReslice> reslicer
= vtkSmartPointer<vtkImageReslice>::New();
   reslicer->SetInputConnection( this->reader->GetOutputPort() );
    // The input being the 3D volume
   reslicer->SetOutputDimensionality(2);
   reslicer->SetOutputSpacing...
   ...
   ...
   reslicer->SetResliceAxes(matrix);

Where "matrix" in the last line of code is obtained
 with vtkImagePlaneWidget->GetResliceAxes(). I'm having troubles with this
last line, since the 2D slice obtained does not contain any data (all
black) and I think it is because "matrix" and my 3D volume do not share the
same coordinate space.

How to obtain the correct slice orientation within my 3D volume, using the
world coordinates of the reslice matrix extracted from vtkImagePlaneWidget?

Thanks for your suggestions,
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120314/fe46021d/attachment.htm>


More information about the vtkusers mailing list