Page MenuHomePhabricator

Reinit behavior in mirrored datasets
Closed, ResolvedPublic

Description

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.

Event Timeline

User hettich has pushed new remote branch:

bug-19632-FindInvertedAxis
hettich triaged this task as Normal priority.Aug 4 2016, 2:38 AM

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."

meta-geometry-human-readable-nrrd-file for us nerrds and geeks.
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.

Most probably fixed by the overall Geometry fixes by Miklos.