Is there any chance you can share a dataset that exhibits this issue along with the specific tools and steps that lead to the problem? Maybe you could reproduce the issue using the DWI dataset that is available in Slicer’s SampleData module? Or maybe a scan of a phantom?
There are lots of ways to flip the image data, but correctly transforming the gradients can be tricky and maybe there’s an issue with the converter.
Thanks for the reply. I am attaching my .nrrd file that I have been using in Slicer.
Than I used the following command via Slicer to convert the .nrrd file to nifti. Looks like I cannot upload these types of files. Could I perhaps email them to you?
Thanks for sharing the data - I was able to load it and work with it but wasn’t able to replicate the flipping issue you reported.
The command line I tested (below) was pretty much the same as yours. I tried converting the nrrd you sent and when I loaded the resulting nii file there was no flipping. Then I also downloaded the nii file you provided and again I didn’t see any flipping compared to the nrrd.
Can you doublecheck that when you load the nii and nrrd you uploaded into Slicer they don’t match?
I was using the nightly build from May 29 2017 on a mac. If you were using the 4.6.2 version you might try a more recent nightly although I don’t think this code has changed much.
If you loaded and re-saved the nii file in other software then perhaps other things happened (nifti can be a tricky format which is why we try to avoid using it).
I am noticing that the nrrd file and the nifti file look the same on Slicer. However, when I load the nifti file in the fsl viewer, things look a bit different. It may just be a matter of differences in how Slicer and FSL present the data.
I had initially (not the files I sent you) converted the nrrd file from a type unsigned short to just a short and then converted the file to nifti. In that process, the nifti file was flipped compared to the nrrd file in Slicer. When I left out the conversion to short from unsigned short, I did not see the flipping issue (the files I sent you).
Thanks for doublechecking Emily - there are a lot of issue with coordinates
that can pop up when going between packages and formats. This wiki page
might help but also check the display options for other software (some use
"neurological" convention while Slicer strictly uses "radiological"
convention for display).