Conversion between mif and nifti format

Dear experts,

I am new to MRtrix3 and have been following the BATMAN tutorial to familiarize myself with the software. Due to a known issue with the dwifslpreproc command in MRtrix3 v3.0.7, I decided to perform topup and eddy correction using FSL commands directly. As a result, I needed to convert data from MIF format to NIfTI format before running FSL processing, and then convert it back to MIF format afterward. I performed the conversions using the following code and would appreciate your confirmation that this approach is correct:

## Convert mif into nifti to perform eddy in FSL
mrconvert -export_grad_fsl dwi.bvec dwi.bval -json_export dwi.json dwi.mif dwi.nii.gz
## Convert nifti into mif for further analysis in MRtrix3
## dwi_correct is the data after eddy correction
mrconvert -json_import dwi.json -fslgrad dwi_correct.eddy_rotated_bvecs dwi.bval 
   dwi_correct.nii.gz dwi_correct.mif    

Thank you!

Welcome @younghoo !

That usage looks correct.

Though personally, whenever I generate NIfTIs for the purpose of interacting with FSL, I always specify -strides -1,+2,+3,+4 (for a 4D image), just so that those data already conform to FSL’s internal coordinate convention as closely as possible. Interaction between spatial encoding and orientation-based metadata is a nightmare

I’ve been having an argument with myself recently about whether all metadata content from the input image should be propagated to the output image. For instance, data on the timing of acquisition of each slice is no longer faithful to the image data contained within if there has been motion correction and interpolation of data across slices. But it’s getting quite esoteric at this point, and there’s likely no harm in such metadata persisting.

Regards
Rob