We're reviewing NIFTI images in the 2D viewer. The CDN version of XTK displays them upside down, so I checked out the code from Github. The master branch on Github shows the images in the correct orientation, but demonstrates a strange banding or striping artifact. Poking around commits, I found that commit 332b822... Fix compilation for the changes in parserFSM and parserTRK.
works correctly, i.e. correct orientation, no banding, but the HEAD of master does not.
Unfortunately, I don't understand XTK quite enough to fix the problem.
Any ideas?
Image with stripe artifact from HEAD of master
Second broken image
Correct image from 332b822
This happens because we do not do any interpolation during the reslicing.
Here is what is going on, on the XTK side:
Before:
-> orientation is messed up because we do not take it into account. We only slice 3D array through X, Y and Z axis.
Now:
-> 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