[vtkusers] vtkImageReslice of volume initialized using vtkImagePlaneWidget data

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


That method (vtkImagePlaneWidget->GetResliceOutput()) would be useful for
extracting the initial slice; for subsequent slices I don't want to render
each plane location in order to extract the corresponding slice with
GetResliceOutput, I'd prefer to use vtkImageReslice.

Miguel

2012/3/14 Darshan Pai <darshanpai at gmail.com>

> Why dont you just retrieve the Reslice using .. GetResliceOutput()
>
> On Wed, Mar 14, 2012 at 2:17 AM, Miguel Sotaquirá <msotaquira at gmail.com>wrote:
>
>> 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
>>
>> _______________________________________________
>> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120314/3bd8917f/attachment.htm>


More information about the vtkusers mailing list