Problems with EXTRACT_SLICE [message #11419] |
Mon, 06 April 1998 00:00 |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Hi Everyone!
This is pretty esoteric, and may only interest those involved with
medical imaging or other applications that use 3D volume arrays.
In-a-Nutshell:
EXTRACT_SLICE produces incorrect orientations when the rotations
involve any rotations near 90 degrees (resulting in an
exchange-of-axes).
We work with medical images here, and often have to "reslice" a
3D volume array at a new orientation. I have written a routine
that borrows most of the code from EXTRACT_SLICE, and also allows
you to account for the thickness of the slices.
In EXTRACT_SLICE you pass the X_rot, Y_rot and Z_rot angles and
you are supposed to get an image oriented relative to those angles.
To illustrate the problem, say you pass a 90-degree angle for Y_rot,
to produce an imaging plane orthogonal to the original images. Since,
as the documentation for EXTRACT_SLICE tells you, the Z_rot angle is
applied first, and *then* the Y_rot, the Z angle ends up being applied
relative to the X axis, not Z! This is because the Y rotation results
in an exchange of axes between X and Z.
What I have done is to limit the number of exchange-of-axis rotations
to one (reasonable given our application), and apply any such
rotation FIRST, so any subsequent rotations are applied to their
correct axes.
Has anyone else encountered this problem? I would be interested
in your solutions!
Thanks!
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|