[Insight-developers] FlipImageFilter, origin and direction cosines

Peter Cech pcech at vision.ee.ethz.ch
Thu Dec 14 11:23:04 EST 2006


Hello,

I was tracing a bug with incorrect origin after OrientImageFilter and
found some bugs in FlipImageFilter and PermuteAxesImageFilter. This
e-mail is about changes to FlipImageFilter.

I prepared a patch (bug #4207), but as I was updating the doxygen
documentation for the filter, I realized, that my changes might not be
correct either (1). So I'd like to ask some questions about intended
effects of FlipImageFilter.

The basic functionality of FlipImageFilter is to reverse the order of
pixels along given axes. The question is, what effect should it have on
the image in physical space? Should it be also flipped or not?

Currently, itkImage will be flipped in physical space as well (simply
because it ignores the direction cosines) and itkOrientedImage will stay
the same (direction cosines are negated along the flipped axes and
origin is adjusted). If it should match the itkImage behavior, it should
keep direction cosines and origin intact
(http://www.vision.ee.ethz.ch/~pcech/bugreports/ITK-20061214/itkFlipImageFilter-fix-v2.patch).

In principle both behaviors can be desirable in certain situations, so
maybe a flag to choose is a good idea?

What do you think?

Peter


(1) Besides a bug I made for the case FlipAboutOrigin == true.


More information about the Insight-developers mailing list