[Insight-developers] OrientImageFilter seen as harmful

Williams, Norman K norman-k-williams at uiowa.edu
Wed Jul 13 12:41:00 EDT 2011


The problem is that the OrientImageFilter decides what orientation an image is in by examining the Direction Cosines, to determine which canonical orientation the Direction Cosines most closely approximate.  Then it permutes and flips axes, moving voxels around in index space.  It assigns new direction cosines which are always canonical.

And by canonical, I mean each Direction Cosine comprises a single 1.0 value and two 0.0 values, and they are orthogonal to each other.

This means that if there was a tilted acquisition in a scanner, and it was reported in the direction cosines, OrientImageFilter will throw away the tilt and pick the direction cosines parallel to the world coordinate axes closes to the tilted direction cosines.

The big move as we go forward with ITK is to only work in Index Space when we're absolutely sure it's the right thing to do; if not, computation should be done in world coordinates.
That way you can perform an operation on two images aquired in different orientations — even oblique or tilted orientations — and get correct results.

Now it might be possible to have a 'correct' OrientImageFilter, that does the same axes permutation and performs a proper transformation on the direction cosines, but it makes my brain hurt to imagine the math involved.  And even then, you'd have shuffled up your voxels in memory, and still have the problem of working in index space on images that don't coincide in world coordinate space.

On 7/13/11 8:00 AM, "Benoit Scherrer" <benoitscherrer at gmail.com<mailto:benoitscherrer at gmail.com>> wrote:


> On the other hand, as one of the people who worked on OrientImageFilter
> back in the day, I don't think anyone should be using OrientImageFilter
> and it should be deprecated, because it destroys information. It only does
> the right thing if all of the direction cosines are aligned with one of
> the world coordinate axes.

I don't really understand this point, why it destroys information.
With file format such as nii or nrrd, which supports the orientation pretty
well, it should be ok, isn't it?
Or is there a problem for double oblique images?

Thanks
Benoit




________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110713/b825eaf9/attachment.htm>


More information about the Insight-developers mailing list