A dataset that has a mirrored axis is not rendered correctly after reinit, because the direction matrix is ignored.
The reinit function should take into account if the matrix contains a mirroring.
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | • hettich | T19632 Reinit behavior in mirrored datasets | ||
Invalid | kislinsk | T22114 re-init does not work with images with flipped axes |
Event Timeline
The question is HOW:
*change rendering somehow,
*change index2world-matrix,
*change window titles to XYZ instead of AxialCoronalSagittal,
*do a global reinit instead,
*just inform the user, or
*forgettaboutit?
My branch "bug-19632-FindInvertedAxis" is useless, because I had the stupid idea that this problem would be easily solved by correct math.
Trouble is, in a universe with 3 macroscopic space type dimensions (like ours) any odd number of sign changes inverts chirality, so we cannot know which axes are inverted given only the indexToWorldMatrix.
To cite freesurfers documentation:
"First of all, determining and setting the orientation is hard. Don't fool yourself into thinking otherwise. Second, don't think you are going to learn all you need to know from this documentation."
Have phun playing with space:, space direction: and space origin:.
Maybe we'll use it for unit tests.
Guys, did you try my fix for T22114?
I believe that fixes the reinit with all sorts of images, with flipped, permuted and rotated axes.