MR Image format conversion

DICOM to NIfTI

You can convert DICOM datasets to NIfTI using either dcm2niix or Freesurfer’s mri_convert.

dcm2niix

Standalone converter (see Github repo).

Usage: dcm2niix /path/to/dicom/dir, see dcm2niix -h for other options.

Mac OS installation
  1. Install Homebrew

  2. Run brew install dcm2niix.

Linux installation
  1. Follow the Build instructions in the Project README.

mri_convert

Part of Freesurfer, so Freesurfer needs to be installed on the platform on which the conversion is performed.

This is a multi-format converter, it will figure out that you want a NIfTI file from the .nii or .nii.gz extension of the output path you give it.

Usage:

  • mri_convert /path/to/dicom/dir /path/to/file.nii.gz.
  • If you have multiple series in a directory and want to convert just one series to a single NIfTI file, use one file in the series as the input path. The converter will parse all other files in the directory, figure out which belong to the same series and perform the conversion: mri_convert /path/to/dicom/dir/series1_slice15.IMA /path/to/series1.nii.gz.
  • See mri_convert -h for more options.