[Insight-users] Oblique section (extract 2D plane) filter for ITK

Zachary Pincus zpincus at stanford.edu
Fri Feb 24 04:04:34 EST 2006


It's possible to sit down and work out how to go from a "look vector"  
to the required Euler angles with some trig and patience and  
knowledge of what order the rotations are applied. But it's nasty, as  
is pretty much anything in 3D dealing with Euler angles.

Perhaps it would be better to just start with the "look vector" and  
derive the transform matrix directly from that? E.g. look at how  
gluLookAt does a similar task:

http://developer.apple.com/documentation/Darwin/Reference/ManPages/ 
man3/gluLookAt.3.html

Zach Pincus

Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine


On Feb 23, 2006, at 11:39 PM, Dan Mueller wrote:

> Hi all,
>
> I am wanting to use an 'oblique section' type filter within ITK.  
> That is, a filter that extracts a 2D plane from a 3D input image at  
> an artibitary angle to the i-j-k axes.
>
> I would like the user to specify the plane center point (in 3D  
> input space), plane size (in output pixel space), and a direction  
> to "look". The extracted 2D plane should be orthogonal to the given  
> direction. (I know oblique sectioning is typically a  
> "visualisation" task; however I'm planning to use it for a  
> segmentation task, so I feel this filter still fits into ITK...)
>
> I guess my first question is: does such a filter already exist  
> within ITK? I couldn't find one, although ResampleImageFilter has  
> similarities with what I am trying to do...
>
> It's relatively simple to create my desired filter: a centered 3D  
> rigid body itk::Transform is setup to map the output plane to the  
> input 3D image (the transform center is set as the plane center),  
> for each index in the ouput 2D image use the itk::Transform to map  
> the point into the 3D image, interpolate the value at the  
> continuous location.
>
> I have nearly managed to implement such a filter with an  
> itk::CenteredEuler3DTransform. Unfortunately, at present, rather  
> than specifying the "look" direction, the user specifies the 3  
> Euler angles. Can anyone help me or point me to some references  
> which show how to map this "look" direction to the Euler angles?
>
> For example: I have a 3D image, 100x100x100, 1x1x1 spacing (to keep  
> things simple). I want to extract the plane at point [50,50,50],  
> looking in the direction [1,1,1] from this point. I know (from  
> working it out in my head) the Euler angles corresponding to this  
> direction are [0,0.78539,0.78539] (that is a rotation of 45° around  
> the z-axis, followed by a rotation of 45° around the y-axis). My  
> question is, how can I programmatically map direction to Euler angles?
>
> Any thoughts, suggestions, or references would be greatly appreciated!
>
> Cheers
>
> Dan Mueller
> d.mueller[at]qut.edu.au
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list