questions > RE: dcm2niix reorients all images to RPI, origins are changed
Feb 20, 2019  09:02 PM | Chris Rorden
RE: dcm2niix reorients all images to RPI, origins are changed
Virginia-

 If you go to the dcm2niix Github page and build the developmental branch you will be able to get v1.0.20180220 (or you can just wait for the next stable release). This includes the new "-x i" option that will neither rotate nor crop 3D acquisitions. I would generally discourage the use of this option, as I think lossless rotation is useful and it makes the output more consistent. However, I have added this feature as it seems important to some. 

To clarify the situation, for most human brain studies the 2D EPI sequences (fMRI, DWI, ASL) are acquired in the axial plane. dcm2niix ALWAYS saves 2D series to disk with the same slice order as acquired, ensures slice timing routines work as expected. For 3D acquisitions like T1 MP-RAGE and T2 SPACE, dcm2niix will by default losslessly rotate the image data to match the NIfTI identity matrix (e.g. they are resliced to be axial). The residuals of this rotation are stored in the NIfTI header, so a resliced and unresliced image are identical when viewing with tools that aligned images based on the NIfTI header (MRIcroGL, SPM, FSLeyes etc). However, these 3D images tend to appear much more similar to the typically axially acquired 2D fMRI and DWI sequences when you use other tools like FSLview that do not reslice the data. 

If your transformation pipeline has issues with this, I would carefully inspect the pipeline. The image rotations are stored in both the S-Form and the Q-Form of the NIfTI header. If your pipeline is having problems with these differences, it may also not be accounting for slice angulation differences, differences in image origin and dreaded Left-Right mirror flips. The NIfTI S/Q-Forms often provide exceptionally accurate starting estimates for registration within a series, avoiding local-minima solutions for coregistrations conducted with poor starting estimates. For tools that are aware of the Q/SForm, the images are identical with the "-x i" versus the default solution.

Threaded View

TitleAuthorDate
Angela Zhang May 24, 2018
Chris Rorden May 24, 2018
Angela Zhang May 24, 2018
Chris Rorden May 24, 2018
Angela Zhang May 24, 2018
Virginia Flanagin Feb 20, 2019
RE: dcm2niix reorients all images to RPI, origins are changed
Chris Rorden Feb 20, 2019