mriconvert: MRIConvert & 16 bit data

Roman Fleysher roman.fleysher at einstein.yu.edu
Sun Mar 15 20:23:34 PDT 2015


Could solution be subtracting 32767 from the data, setting intercept to -32767 in the NIFTI header and still using signed int16 during conversion? Since the range of signed and unsigned int16 is the same, it should be possible to manipulate slope and intercept in the NIFTI header to produce signed int16.


Roman


________________________________________
From: mriconvert-bounces at lists.uoregon.edu [mriconvert-bounces at lists.uoregon.edu] on behalf of Jolinda Smith [jolinda at uoregon.edu]
Sent: Friday, March 13, 2015 5:42 PM
To: mriconvert at lists.uoregon.edu
Subject: mriconvert: MRIConvert & 16 bit data

Hello everyone,

MRIConvert has been updated to export unsigned 16 bit data for the "FSL/nifti" output. I'll include some long wordy explanations at the end of this but wanted to get straight to the point. The new version is 2.0.8. Version 2.0.7 is still up, and works fine for most users. This is a big enough change that we are leaving both versions up until we hear back from users that the new version does not cause problems.

WHO NEEDS TO USE THIS:
Anyone using the FSL/NIFTI output type in MRIConvert who has data with a max intensity > 32767. This can happen with the CMRR multiband sequences for syngo baseline VD11D or higher. It may happen for other sequences as well, but most MR data is 4095 or less.

WHERE DO I GET IT:
http://lcni.uoregon.edu/downloads/mriconvert
"dmg" for mac version, "zip" for windows, "tar.gz" for linux.
The mac version will NOT work on OS 10.0.6.


WHAT IS DIFFERENT:
FSL/NIFTI output is the same as before, but data from the multiband sequence will now have a header that identifies the data type as "unsigned 16 bit" instead of "signed 16 bit". Also, this version should support unicode.

IS THERE AN ALTERNATIVE:
dcm2nii will convert the data to floating point if the max pixel intensity is > 32767.


I LOVE TO READ ABOUT FILE FORMATS AND BITS AND STUFF, TELL ME MORE!
When I first added NIFTI output to MRIConvert, I took the most straightforward approach: copying the data over without modification, and using the appropriate data type as indicated in the DICOM file. MR data is almost always unsigned 16 bit, with 12 bits of data stored. The extra 4 bits can be used to store something else, like an overlay. This is seldom used, however.

Unfortunately, FSL initially wanted the data to be in a slightly different order, and supported only signed data types. As long as all of your data is positive and you use only 15 or fewer bits (in other words, your data is less than 2^15, or 32767), there is no difference between signed and unsigned 16 bit data types. So MRIConvert just changed the NIFTI header to say "16 bit signed" rather than unsigned and called it a day, since the maximum data value was 2^12 = 4095. dcm2nii was smarter about it, actually checking the maximum value in the DICOM file and converting the data to floating point if any data is greater than 32,767.

This was all fine until we started using the multiband sequence from CMRR in Minnesota and updated the Skyra. Starting with syngo baseline VD11D, this sequence uses all 16 bits. This is a problem, because now anything from 32,767 - 65,536 will get called a negative number if you just change the header to "16 bit signed" without rescaling the data. So we can't do that anymore!

My first hope was that we could just start using the NIFTI output instead of FSL/NIFTI, because FSL supposedly supports all NIFTI files now. Unfortunately I found that's not true, at least for the TOPUP tool. The data still needs to be reordered (but feel free to try the NIFTI output and find a way to make it work, if you like). But 16 bit unsigned data *seems* to be okay now. It has not been fully tested, so keep a close eye on things and let me know if there are problems.

--
Jolinda Smith, Ph.D.
MR Physicist
Lewis Center for Neuroimaging
University of Oregon
Eugene, OR USA
_______________________________________________
mriconvert mailing list
mriconvert at lists.uoregon.edu
https://lists-prod.uoregon.edu/mailman/listinfo/mriconvert



More information about the mriconvert mailing list