[vtkusers] vtkImageReslice of volume initialized using vtkImagePlaneWidget data
Darshan Pai
darshanpai at gmail.com
Wed Mar 14 17:01:42 EDT 2012
Correction
GetElement(0,3) , GetElement(1,3) , GetElement(2,3)
On Wed, Mar 14, 2012 at 4:48 PM, Darshan Pai <darshanpai at gmail.com> wrote:
> I understand . I see what you mean .
> Though I haven't tried it for the oblique reslice , but maybe this
> procedure can work with your requirement .
> So I assume that you do have the resliceaxes which you initially acquired
> from the Widget.
>
> To get the other slices you only have to move along the normal of the
> slice . So everytime you translate along the normal , you change the
> resliceaxis values . For translation you will need to add (or subtract)
> the value from
> GetElement(3,0) , GetElement(3,1) , GetElement(3,2) by the amount you
> moved along the normal . Note that as you translate you should be aware of
> the spacing between slices .
>
> Maybe someone else can comment .
>
>
> On Wed, Mar 14, 2012 at 5:02 AM, Miguel Sotaquirá <msotaquira at gmail.com>wrote:
>
>> 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/f52f6f07/attachment.htm>
More information about the vtkusers
mailing list