[Insight-users] itk::Image vs. itk::OrientedImage
Daniel Betz
dbetz at stud.hs-bremen.de
Thu Oct 9 09:36:33 EDT 2008
Hello,
I have an itk::Image with orientation like this:
origin:[-125, -124.1, 79.3]
spacing:[0.9375, 0.9375, 3]
direction:
1 0 0
0 1 0
0 0 -1
Now I take a valid pixel index:
Pixel Index: [134, 112, 11]
and ask with itk::Image::TransformIndexToPhysicalPoint() for the coordinates
in physical space and get:
Physical Point: [0.625, -19.1, 112.3]
This is not a physical point inside my image, because the direction of the
z-axis is negativ. So the z-component 112.3 is outside of my image, because
the image starts at origin 79.3 (z-axis).
Reading the source code I determined, that
itk::Image::TransformIndexToPhysicalPoint()
does not take direction into account.
But there is the class itk::OrientedImage which handles the orientation
correctly.
My question is, why is SetDirection() in itk::Image available, since the
Transform Methods will not use it anyway. Why has itk::Image only a
"fake orientation" and why I need itk::OrientedImage for a
"real orientation" ?
The design decission to handle it that way is not visible for
me.
In the Doxygen documentation of itk::Image is written, that some functions are
implemented differently in itk::OrientedImage. I think that is not enough and
it should be documented more explicitly that I can set the direction in an
itk::Image even though it will not taken into account by the transform
methods.
Sincerly
Daniel Betz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081009/e6012cb8/attachment.pgp>
More information about the Insight-users
mailing list