left handed image data direction matrix
See original GitHub issueThe ImageData code says the direction matrix needs to be orthonormal, but does it also need to be right handed?
I ran into this because the VolumeMapper rendering is not right when a left handed direction matrix.
This can be reproduced by running the example like this
npm run example -- VolumeMapper
And then pasting this in the browser developer console:
source.getOutputData().getDirection()[8] *= -1
And when you rotate around you get images like this:

I get the same kind of issue when loading my own data with left handed direction matrices.
This is an issue because sometimes medical image acquisitions are naturally left handed. For example a person could be put in a CT scanner either foot-first of head-first. While the patient space (e.g. LPS or RAS) is right handed, the direction matrix may not be if you leave the slices in the order they were acquired. As I recall, ITK reshuffles the slices in memory in this case so that the direction matrix is right handed, but I would prefer to avoid that if possible.
It’s not clear if this is a bug in the VolumeMapper or if vtkjs is meant to require right handed direction matrices (in which case it should be documented).
Related to: https://github.com/Kitware/vtk-js/issues/499
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (6 by maintainers)

Top Related StackOverflow Question
Looks to be fixed. Thanks!
I think I am looking into this issue right now 😃 At least it seems similar and involves an inverted axis. I’ll let you know what I find.