[Insight-developers] Image Orientation

Paul Hughett hughett@mercur.uphs.upenn.edu
Fri, 16 Feb 2001 10:40:22 -0500


Steve Aylward:

> We need to maintain MR orientation info on one of our apps.

> Can we add the ability to specify image orientation to our base image
> class?  Dicom specifies orientation via a set of three vectors
> indicating x, y, and z directions in physical space - or we could pass a
> vnl_matrix to the image class.   It would be part of the existing image
> index to physical space transform.

If we decide to add this to the image class (a proposition on which
I'm still neutral), the right way would be to replace the current
origin and spacing with an AffineTransform object, which contains all
the desired information (including the inverse transform).  This would
require changes to the classes which currently use the origin and
spacing to determine the physical coordinates.  If we want to save a
little space, we could use a pointer to the AffineTransform; if the
pointer is zero, then an identity transform is assumed.  (But this
might cause more problems than it's worth.)

Paul Hughett