This happens because we do not do any interpolation during the reslicing.
Here is what is going on, on the XTK side:
Before:
- Parse NII (pixels)
- Create a 3D array containing all the pixels
- Display ii
-> orientation is messed up because we do not take it into account. We only slice 3D array through X, Y and Z axis.
Now:
- Parse NII (pixels and orientation)
- Create a 3D array containing all the pixels
- Rotate 3D array
- Extract pure Sagittal, Coronal and Axial slices from the rotated array containing the data
-> orientation is correct up because we do take it into account. But the slice we extract might present some artifacts because when we generate the slices, we do not do any interpolation.
We want to add the interpolation soon.
A good place to start is at line 861: https://github.com/xtk/X/blob/master/io/parser.js
It might be tricky though...
We also what to add the ability to switch between "oriented volume" and "acquired volume" easily.
I think that will be faster to implement and a good trade-off for now.
Thanks