GDCMSCANNER(1)

πŸ’… GDCMSCANNER β€” the DICOM scanner that eats

okay bestie so the manual name here is literally DICOM Manipulation, and this page is about gdcmscanner, and i need you to understand: this tool is that girl. she walks a whole directory of DICOM files and pulls values out of a DICOM File-Set fast. no cap. πŸŽ€


✨ NAME ✨

gdcmscanner β€” scan a directory containing DICOM files. that's it. that's the job. πŸ’–


🌸 SYNOPSIS 🌸

gdcmscanner [options] directory

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so gdcmscanner is a command line tool β€” an iconic one β€” built to quickly extract value from a set of DICOM attributes in a DICOM File-Set. she's efficient, she's fast, she's not here for your nonsense. πŸ‘‘


πŸ’œ PARAMETERS πŸ’œ

the actual meaty bits you're feeding her:

  • -d, --dir β€” the DICOM directory. like, where the files live. your girl needs a location.
  • -t, --tag %d,%d β€” the DICOM tag(s) to look for. formatted %d,%d, iykyk.
  • -k, --keyword %s β€” the DICOM keyword(s) to look for. %s style, name-based instead of number-based, obsessed.
  • -P, --private-tag %d,%d,%s β€” the DICOM private tag(s) to look for, and yeah it takes that extra third %s piece because private tags are extra like that.

πŸŽ€ OPTIONS πŸŽ€

the vibe knobs:

  • -p, --print β€” print output. yes bestie we want to see it.
  • -r, --recursive β€” recursively descend the directory. go deeper. go off.
  • --strict β€” use the strict parser β€” faster, but less tolerant with bogus DICOM files. so like, if your files are messy she will NOT be forgiving. πŸ’€
  • --table β€” use Table output. cute little table. very demure.

🌈 general options 🌈

the housekeeping squad:

  • -h, --help β€” print this help text and exit.
  • -v, --version β€” print version information and exit.
  • -V, --verbose β€” verbose mode (warning+error).
  • -W, --warning β€” warning mode, print warning information.
  • -E, --error β€” error mode, print error information.
  • -D, --debug β€” debug mode, print debug information.

πŸ”₯ TYPICAL USAGE πŸ”₯


πŸ“ SIMPLE USAGE πŸ“

so you wanna display all the values for Patient Name (0010,0010) in the directory named gdcmData? simply do:

$ gdcmscanner -t 10,10 -d gdcmData -p

and for a private tag, simply do:

$ gdcmscanner -P "0029,60,SIEMENS MEDCOM HEADER2" -d gdcmData -p

look at her go. slay. πŸ’…


⭐ TABLE USAGE ⭐

you want it as CSV (see dicom3tools/dctable) with all the values for SOP Instance / Study Instance / Series Instance UID(s) in the directory named gdcmData? simply do:

$ gdcmscanner -k SOPInstanceUID -k StudyInstanceUID -k SeriesInstanceUID -d gdcmData -p --table

three -k flags, three keywords, one gorgeous table. 🫢


🧚 COMPLEX USAGE 🧚

okay real talk β€” because gdcmscanner does not support progress, you have to wait until all the files are traversed before you see any results. which is, ngl, quite cumbersome. on UNIX you can work around it with the following trick:

$ find gdcmData -type d -exec gdcmscanner -t 10,10 -d {} -p ';'

so all directories are locally traversed (no child directory is recursively traversed), which means results come out much faster. main character workaround energy. 😭✨


πŸ’€ SEE ALSO πŸ’€

dctable(1), gdcmdump(1), gdcmraw(1) β€” go give them a look, bestie.


πŸ‘‘ AUTHOR πŸ‘‘

Mathieu Malaterre β€” Main developer


Copyright Β© 2006, 2011 Mathieu Malaterre


ok that's the whole page, every flag, every example, every word, no skips. πŸŽ€

and finally, the cute lil sign-off at the bottom of the page says: this is from GDCM 3.0.24, dated 12/25/2025 β€” so like, merry christmas from the GDCM girlies, mwah πŸ’–πŸ¦‹πŸŒˆ