---
name: "dcm2nii"
section: "1"
platform: "linux"
package: "mricron"
version: "0.20140804.1~dfsg.1-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dcm2nii"
---

# dcm2nii(1)

convert DICOM or PAR/REC image into the NIfTI format

## NAME

dcm2nii - convert DICOM or PAR/REC image into the NIfTI format

## SYNOPSIS

**dcm2nii** \<options\> \<sourcenames\>

## OPTIONS

- **-a** Anonymize \[remove identifying information\]: Y,N = Y

  - **-b** load settings from specified inifile, e.g. '-b /etc/mricron.ini'

  - **-c** Collapse input folders: Y,N = N

  - **-d** Date in filename \[filename.dcm -\> 20061230122032.nii\]: Y,N = Y

  - **-e** events (series/acq) in filename \[filename.dcm -\> s002a003.nii\]: Y,N = Y

  - **-f** Source filename \[e.g. filename.par -\> filename.nii\]: Y,N = Y

  - **-g** gzip output, filename.nii.gz \[ignored if '-n n'\]: Y,N = Y

  - **-i** ID in filename \[filename.dcm -\> johndoe.nii\]: Y,N = Y

  - **-n** output .nii file \[if no, create .hdr/.img pair\]: Y,N = Y

  - **-o** Output Directory, e.g. '/tmp' (if unspecified, source directory is used)

  - **-p** Protocol in filename \[filename.dcm -\> TFE\_T1.nii\]: Y,N = Y

  - **-r** Reorient image to nearest orthogonal: Y,N

  - **-s** SPM2/Analyze not SPM5/NIfTI \[ignored if '-n y'\]: Y,N = N

  - **-v** Convert every image in the directory: Y,N = Y

  - **-x** Reorient and crop 3D NIfTI images: Y,N = N

  You can also set defaults by editing /home/michael/.dcm2nii/dcm2nii.ini

## EXAMPLES

dcm2nii -a y /home/joe/Documents/dcm/IM\_0116

## AUTHOR

**dcm2nii** was written by Chris Rorden.

This manual page was written by Michael Hanke \<michael.hanke@gmail.com\>, for the Debian project (but may be used by others).

## SEE ALSO

[**mricron**(1)](/mricron/1.md)

- **MRIcron Homepage:** http://www.cabiatl.com/mricro/mricron/
