[Insight-users] itk::Image vs. itk::OrientedImage
Luis Ibanez
luis.ibanez at kitware.com
Thu Oct 16 08:25:55 EDT 2008
Daniel,
If you are using the CVS HEAD version of ITK,
you can also turn ON the following CMake flag:
ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE
This will make the itk::Image behavior to be the
same as the itk::OrientedImage.
You will have to go to the "Advanced" variables
in CMake, to see this flag.
This option will be available in the upcoming
release of ITK 3.10.
Regards,
Luis
-------------------
Daniel Betz wrote:
> 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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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