# DTIPrep, Nrrd to Nifti conversion, and header info

**URL:** <https://discourse.slicer.org/t/dtiprep-nrrd-to-nifti-conversion-and-header-info/2396>\
**Category:** Support\
**Tags:** diffusion\
**Created:** [March 22, 2018, 3:35am UTC](https://discourse.slicer.org/t/dtiprep-nrrd-to-nifti-conversion-and-header-info/2396 "2018-03-22T03:35:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![micaceous](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@micaceous](https://discourse.slicer.org/u/micaceous)\
**Post date:** [March 22, 2018, 3:35am UTC](https://discourse.slicer.org/t/dtiprep-nrrd-to-nifti-conversion-and-header-info/2396/1 "2018-03-22T03:35:14Z")

</div>

I’ve been using Ubuntu 16.04 on Bash on Windows (but this problem has occurred within regular linux/ubuntu as well).

After running DTIPrep (through their own tool, not through Slicer module), cannot convert .nrrd to .nii.gz due to “unsupported source pixel type” / “unsigned\_short” (as has been discussed)

 ![Slicer_dwiconvert_error](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/a/4a39529dc1420e506035a255b00d2e4b1b818c2e.png)

I know that this error can be fixed with the -allowLossyConversion option, but another problem is that this slicer conversion output has wrong header info (flipped on anterior/posterior axis). In the past, I’ve fixed this by following the FSL instructions [here](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Orientation%20Explained), with the example code below:

fslorient -deleteorient filename.nii.gz  
[which is output from DWIConvert]  
fslorient -setsformcode 1 filename.nii.gz

However, this fixed header file causes problems for registrations of this diffusion data to T1 weighted data.

I’m wondering:

1. can this “unsupported source pixel type” be avoided in the DTIPrep output by running DTIPrep as a Slicer module? (in other words, does DTIPrep as a Slicer module create output that is already “short”?)

2. Is there any other option other than -allowLossyConversion to move from unsigned\_short to short?

3. or, is there a better way to fix the header of the output after Lossy conversion from nrrd to nifti?

Thanks so much!  
Micah
