Search code examples
xtk

Flip Nifti images (.nii)


I am loading CT scan nifti (.nii) images using XTK. I want to modify the default orientation of images and flip them, for example up/down or left/right before rendering (onShowtime). So, how can I get the default orientation and then how can I change it?

enter image description here

Currently, I am using xtk.js since there is a bug in xtk_edge.js possibly in .nii parser. (Uncaught RangeError: Invalid array length)


Solution

  • The lastest version of XTK should now be working fine. https://github.com/xtk/X/commit/3a28de0294a94b41c44007545ab3a37df556d315

    How did you generate this data? If you look at it in Slicer4 or Freeview, it looks the same way as in XTK. We want to look at the data in the Radiological convention. (http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm)

    The rotate method do not exist anymore but we might have to put it back at some point... We also want to add the possibility to switch between radiological/neurological conventions easily.

    Thanks