[vtkusers] get an arbitary oblique slice through volume with vtkImageReslice
Orlinn
MeinDatenLaufwerk at googlemail.com
Tue Oct 13 03:13:38 EDT 2009
hallo David,
with vtkImagePlaneWidget you can show the three plane (axial, coronar,
sagittal). I want these three planes and an oblique, so that i can work with
four renderer in the window.
i will try to implement your version maybe it will solve my problem
thank you
David Feng-2 wrote:
>
> Sorry, I got vtkImageReslice and vtkProbeFilter merged together in my
> head.
>
> To clarify/correct, you need to supply the orientation of the plane
> (ResliceAxesDirectionCosines) and a point that passes through the plane
> (ResliceAxesOrigin). Also, as the documentation says, make sure you set
> the output dimensionality to 2. The orientation is a 3x3 rotation
> matrix. That matrix looks like this:
>
> x1 y1 n1
> x2 y2 n2
> x3 y3 n3
>
> n is the plane's normal, x and y are vectors orthogonal to n that lie on
> the plane. You can make one of these yourself by creating a
> vtkTransform, applying any rotations you want, and computing the new
> basis:
>
> M * [1; 0; 0; 1] = x
> M * [0; 1; 0; 1] = y
> M * [0; 0; 1; 1] = z
>
> For example:
>
> vtkTransform* t = vtkTransform::New();
> t.RotateX(90);
> double x[4] = {1,0,0,1};
> M.MultiplyPoint(x,x);
>
> This will store in x the new x vector in the rotated space, in this
> instance rotate 90 degrees about the x axis.
>
> Why doesn't the vtkImagePlaneWidget do what you want? It is an
> interactive, arbitrarily orientable, scalable, and window/level-able
> slice plane. It even uses vtkImageReslice internally, if I'm not
> mistaken, so unless I'm missing something there's no need to rewrite it
> yourself.
>
> David
>
> Martin Schmitz wrote:
>> hallo David,
>>
>> thank you for the answer,
>>
>> in the doucumentation of the class vtkImageReslice says :" /Extraction
>> of slices from an image volume. The most convenient way to do this is
>> to use SetResliceAxesDirectionCosines() to specify the orientation of
>> the slice. The direction cosines give the x, y, and z axes for the
>> output volume./"
>> So i have to use the right transformation matrix to rotate or move the
>> plane, i don't know if i need the class vtkPlane, what i need is a
>> class of vtkTransform. I tried with the class vtkImagePlaneWidget but
>> it was not that what i need.
>>
>> thank you
>>
>>
>> 2009/10/12 David Feng <dfeng at cs.unc.edu <mailto:dfeng at cs.unc.edu>>
>>
>> The vtkImagePlaneWidget class will let you interactively
>> rotate/scale/etc a slice plane through a volume and show you the
>> results as you go. I think you just need to click on the
>> boundaries of the image to start the different manipulations. You
>> can get the sliced values out from the widget via
>> GetResliceOutput(), or something similar. I think you can set the
>> position of the plane programmatically as well.
>> If you want to get dirty with vtkImageReslice, I believe what
>> you'll need to do is make a vtkPlane and connect it via
>> SetInputInformation(). The ResliceAxesDirectionCosines allow you
>> transform the plane (or whatever reslice structure you use) into a
>> different coordinate space (patient space to world space, for
>> example). In your case, it's probably easier to manipulate the
>> vtkPlane directly.
>>
>> David
>>
>>
>> Orlinn wrote:
>>
>> Hallo everybody,
>>
>> i want to get an arbitary oblique slice through my volume
>> data. I found
>> example which show how to get the axial, coronar and sagittal
>> slice. I know
>> that i can use the methode "SetResliceAxesDirectionCosines"
>> but i don't know
>> how to set the parameters to get an arbitary oblique slice
>> throught the
>> volume. can anybody help please? i have no idea how to solve
>> my problem
>>
>> sorry for my english
>>
>> thank you
>>
>>
>>
>>
>
> _______________________________________________
> 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
>
>
--
View this message in context: http://www.nabble.com/get-an-arbitary-oblique-slice-through-volume-with-vtkImageReslice-tp25857482p25868188.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list