[vtkusers] Question regarding vtkImageReslice

Willi Huber surfersparadise85-vtk at yahoo.com
Wed Jan 30 13:24:12 EST 2013


Hello David,

thanks a lot.
Im just a little bit wondering how it happens that there are differnet entries in the DirectionCosines and the upper left 3x3 part of the 4x4 ResliceAxes matrix.

But anyhow I want to ask sth different. I am currently working with the ImageReslice of the ImagePlaneWidget which are both displayed in different RenderWindows. ImageReslice is going there through ImageActor.
I wanted to do some picking. I set up the vtkPointPicker and on LeftButtonDown I asked the Picker through picker.Pick(x, y, 0, ren) to give me the x, y value of the picked point. Within the ImagePlaneWidget an other position is shown as in my own Picker. It is not a shared one. I tried to adopt the other picking examples but no chance.

Upon what depends the calculation of the picked position? And how can I get it right? I had a look into the vtkImagePlaneWidget which shows everythin through an vtkActor the displays a texture that is placed on the planesource and gets its input from the maptocolor. This way is to cumbersome for my opinion.

Best,
Willi



>________________________________
> Von: David Gobbi <david.gobbi at gmail.com>
>An: Willi Huber <surfersparadise85-vtk at yahoo.com> 
>CC: "vtkusers at vtk.org" <vtkusers at vtk.org> 
>Gesendet: 0:36 Mittwoch, 30.Januar 2013
>Betreff: Re: [vtkusers] Question regarding vtkImageReslice
> 
>SetResliceAxesDirectionCosines just sets the first three columns of
>the ResliceAxes matrix.  It leaves the fourth column of the matrix
>untouched.  So it is only useful if you want to set the rotation part
>of the matrix while leaving the translation part unchanged.
>
>SetOutputDimensionality(2) means that the output will always have
>Origin[2] = 0.0 and Extent[4]=Extent[5]=0.  In other words, the Z
>coordinate for every point in the output will be zero.  That is all
>that this method does.  When you call this method, your output will
>always be two dimensional even if your input is three dimensional.
>
>So if you use SetOutputDimensionality(2), then the ResliceAxes matrix
>defines a coordinate transformation that will be applied to the plane
>Z=0 in order to generate an oblique plane that slices through your
>input data.  A good way to think about it is that the 1st and 2nd
>columns of the matrix are the basis vectors of the oblique plane, the
>3rd column is the normal of the oblique plane, and the 4th column is
>the "origin" of the oblique plane.  If you call SetOutputOrigin(0,0,0)
>then the 4th column of the reslice matrix will precisely define the 3D
>point at the corner of your oblique plane.
>
>- David
>
>
>On Tue, Jan 29, 2013 at 2:02 PM, Willi Huber
><surfersparadise85-vtk at yahoo.com> wrote:
>> Hello,
>>
>> I would like to know the relationship of the ResliceAxes and
>> ResliceAxesDirectionCosines.
>> For my understanding the upper left 3x3 matrix of ResliceAxes consists of
>> the entries of ResliceAxesDirectionCosines which is true for example in
>> vtkImagePlaneWidget whereas the top 3x1 entries in the upper right determine
>> a kind of translation.
>> But for Examples/ImageProcessing/Python/ImageSlicing.py this ain't true.
>> Here the OutputDimensionality is set to 2 in contrast to 3 in
>> ImagePlaneWidget. I know this is done to extract the slice. Can someone
>> explain me how OutputDimensionality, ResliceAxes and
>> ResliceAxesDirectionCosines are related to each other?
>>
>> Best,
>> Willi
>>
>> _______________________________________________
>> 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/20130130/434de8b8/attachment.htm>


More information about the vtkusers mailing list