Fix for determining axes corresponding to given orientations
In extreme cases when the volume was rotated around one or two world axes
by exactly 45 degrees, the same axis could be mapped to different orientations
and some other axes were not mapped to any orientations. This resulted in a
incorrectly composed transformation matrix, and the application crashed because
of an ITK exception that was thrown because the inverse matrix could not be
calculated.
This commit changes the way of mapping axes to each orientation. It ensures
that always different axes are mapped to different orientations.
Signed-off-by: Miklos Espak <m.espak@ucl.ac.uk>