Is there a standard orientation for Niftii files in BIDS?

Hi Neurostars,
I am about to move a dataset that contains *.nii.gz instead of *.dcm files. Usually, when I BIDSdify an dataset, I use the dcm2bids tool, which (I believe) creates a niftii files in standard orientations.

I am wondering if 1) there is a standardized orientation for niftii files and/or 2) if there is a similar tool than dcm2bids that could allow me to do so. Not sure if any of these is related: BIDS Apps

Thanks in advance,
Rodrigo

No, BIDS does not require data to be in any particular orientation. Tools that accept NIfTI should be prepared to deal with any orientation. Some metadata, such as PhaseEncodingDirection and SliceEncodingDirection would need to be modified if axes are rolled or flipped. (These metadata properly apply to the data array, not the RAS+ world coordinates.)

I do not know if dcm2bids does reorient to a canonical orientation. I believe dcm2niix specifically does not, to ensure the correctness of metadata.

A useful small BIDS app could be to reorient a dataset while preserving the correctness of orientation-dependent metadata, but I don’t know of one.

1 Like

bidsify calls dcm2niix. By default, dcm2niix will lossless permute 3D acquisitions to be as close as possible to RAS (the NIfTI identity matrix transform). You can disable this by providing the -x i option. For 2D acquisitions (e.g. DWI, T2* EPI scans) will only reverse the row order of the slices (DICOM assumes the first row is at the top of the screen, like we read English; NIfTI assumes the first row is at the bottom of the screen, like we draw a Cartesian graph). Importantly, dcm2niix always maintains the slices (j dimension) for 2D acquisitions, as changing this would impact many operations like slice timing correction.

2 Likes