DCM2NIIX(1)

πŸ’– DCM2NIIX πŸ’– (that's the dcm2niix manual, section 1, bestie)

okay so you found the manpage for dcm2niix and you're like "what is this" β€” don't worry, I got you. lowkey this is one of the most useful tools in the whole neuroimaging universe and I'm obsessed with it. it's a command-line utility, it's from the dcm2niix project, and it's giving "small tool, massive main character energy." πŸŽ€


✨ NAME ✨

dcm2niix β€” the DICOM to NifTI converter. that's it, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

dcm2niix [options] <sourcedir>

literally just: give it some options, give it a directory, and it goes to work. πŸ¦‹


🧚 DESCRIPTION 🧚

okay so picture this: almost every medical imaging device out there saves your images in some variation of the extremely popular DICOM format. which, slay for them, but the scientific tools you actually want to use? they're all expecting medical images in the NIfTI format, which is comparatively simpler. like, way simpler. dramatic difference honestly.

dcm2niix exists to do exactly that conversion β€” DICOM β†’ NIfTI β€” and it does it through a simple command-line interface. no drama, no fuss, just conversion. ate. πŸ’–

bestie, real talk for a sec: dcm2niix was developed for research purposes only and should not be considered a clinical tool. that's not me being dramatic, that's the manpage being dramatic. πŸ™ˆ

πŸ‘‘ OPTIONS πŸ‘‘

every flag, every value, every default, all of it, no skips, we're doing this properly ✨

  • -1..-9 β€” gz compression level (1=fastest..9=smallest, default 6). so like, -1 is zoomies mode and -9 is tiny-file mode, and the default is sitting pretty at 6. 🌈
  • -b <y/i/n> β€” Save additional BIDS metadata to a side-car .json file (default y). and the i"nput-only option reads DICOMs but saves neither BIDS nor NIfTI. so if you just want it to look at the files, that's your girl. πŸ‘€
  • -ba <y/n> β€” anonymize BIDS (default y). If no, side-car may report patient name, age and weight. ⚠️ so like, y is the polite default, and n is you choosing chaos. your call, but know what you're choosing.
  • -f <format> β€” Format string for the output filename(s). The following specifiers are supported:
    • %a, antenna (coil) name
    • %b, basename (filename of 1st DICOM file)
    • %c, comments
    • %d, description
    • %e, echo number
    • %f, folder name
    • %i, patient ID
    • %j, series instance UID
    • %k, study instance UID
    • %m, manufacturer
    • %n, patient name
    • %o, media object instance UID
    • %p, protocol
    • %r, instance number (of 1st DICOM file)
    • %s, series number
    • %t, time
    • %u, acquisition number
    • %v, vendor
    • %x, study ID
    • %z, sequence name

The default format string is "%p_%e_%4s". πŸ’œ

  • -g <y/n/o/i> β€” Generate defaults file (default n). If y, create default file on completion. If n, default will not be written. If o, only reset and write defaults. If i, the values of the defaults file are ignored : reset defaults], default n)
  • -h β€” Show help. the classic. when in doubt, -h it out. 🫢
  • -i <y/n> β€” Ignore derived, localizer and 2D images (default n). like, sometimes you just don't want the little scout images tagging along. valid.
  • -l <y/n/o> β€” Losslessly scale 16-bit integers to use maximal dynamic range (default o). If y, then intensity rescaled to use full 16-bit range. If n, data not scaled uint16 will be saved as int16. If o, original data and datatype preserved. so o is the "don't touch my data" option and honestly iconic for it. 🌸
  • -m <y/n/2> β€” Merge slices from the same series regardless of study time, echo, coil, orientation, etc. (default 2). If 2, automatic based on image modality. ngl this one is powerful and it knows it.
  • -n <number> β€” Only convert this series CRC number. Provide a negative number for listing of series CRC numbers in input folder. so negative number = window shopping, positive number = actually buying. πŸ›οΈ
  • -o <path> β€” Output directory where the converted files should be saved. If unspecified, the files are saved within the specified source directory. πŸ“
  • -p <y/n> β€” Use Philips precise float (rather than display) scaling.
  • -r <y/n> β€” Rename instead of convert DICOMs. Useful for organizing images. no conversion, just a little glow-up for your filenames. ✨
  • -s <y/n> β€” Convert a single file only. one file, one job, focused queen. πŸ’…
  • -t <y/n> β€” Save patient details as text notes. πŸ“
  • -u β€” Update check: attempts to see if newer version is available. the "is there a new me" button, we love a self-aware tool.
  • -v <2/y/n> β€” Enable verbose output. n for succinct, y for verbose, 2 for high verbosity. so 2 is basically the tool telling you its whole life story and honestly? sometimes you need that. 😭
  • -x <y/n/i> β€” Crop images. This will attempt to remove excess neck from 3D acquisitions. If i, images are neither cropped nor rotated to canonical space. bye bye neck, we don't need you 🫢
  • -z <y/i/n> β€” Desired compression method. The yes option uses the external program pigz if available. The i option compresses the image using the slower built-in compression routines. so y is fast-friend-energy and i is doing-it-myself-energy. 🐒
  • --big-endian <y/n/o> β€” Byte order (default o). Optimal is machine native. ⭐
  • --progress β€” Slicer format progress information (y/n, default n).
  • --ignore_trigger_times β€” Disregard values in 0018,1060 and 0020,9153.
  • --terse β€” Omit filename post-fixes (can cause overwrites). ⚠️ okay so this one is short and sweet but also like… overwrites, bestie. be aware, be so aware.
  • --version β€” Report version and terminate. just wants to tell you who it is and then leave. respect. πŸ’€
  • --xml β€” Slicer format features.

πŸ’• LICENSING πŸ’•

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. The dcm2niix project is distributed under the BSD 2-Clause License. so like, go forth, share it, just keep the receipts. πŸŽ€


πŸ¦‹ Author πŸ¦‹

This manual was developed by Ghislain Antony Vaillant and is maintained by the community. community-maintained?? we love to see it, actual group project energy. 🫢

2021 The dcm2niix contributors


okay that's the whole thing and you understood all of it, I'm so proud of you. πŸ’–

version 1.0, dated Jul 28, 2026 β€” that's the version-of-this-page and its little birthday, so if you're citing it, that's what you cite. mwah, go convert something. πŸ’…βœ¨

πŸ“¦ where this page comes from