GDCMGENDIR(1)

πŸŽ€ GDCMGENDIR(1) πŸŽ€

okay so bestie, welcome to gdcmgendir from the DICOM Manipulation manual set β€” yes, that's the manual name, we're folding it in right here at the top so you're not confused ✨


✨ NAME ✨

gdcmgendir β€” the tool that generates a DICOMDIR file from a File-Set. that's it, that's the whole job πŸ’…

🌸 SYNOPSIS 🌸

gdcmgendir [options] file-in file-out

πŸ¦‹ DESCRIPTION πŸ¦‹

literally nothing here in the original, bestie β€” the section exists but it's empty, and we're not gonna invent stuff, so… moving on 🫢

πŸŽ€ PARAMETERS πŸŽ€

  • file-in β€” DICOM input filename
  • file-out β€” DICOM output filename

πŸ’– OPTIONS πŸ’–

🌈 Parameters

⭐ specific options

  • -i, --input β€” DICOM filename or directory
  • -o, --output β€” DICOM filename or directory
  • -r, --recursive β€” recursive.
  • --descriptor β€” descriptor.
  • --root-uid β€” Root UID.
ngl those last three one-word descriptions are exactly as terse as the original, so take them as given πŸ™ˆ

πŸ’œ general options

  • -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

🧚 environment variable

  • GDCM_ROOT_UID β€” Root UID

πŸ”₯ TYPICAL USAGE πŸ”₯

also empty in the source, no cap β€” the real tea is all down in NOTE πŸ‘‡

πŸ’€ NOTE πŸ’€

okay this is the part where you pay attention, bestie, because there's homework before gdcmgendir will actually spit out your DICOMDIR file. two steps, and yes you have to do them:

  • Batch renaming of the DICOM filename into something compatible with the ISO 9660 filename convention
  • Convert all DICOM file into the Explicit VR Little Endian Uncompressed (1.2.840.10008.1.2.1)

Step 1. can be solved in a numerous way. eg. on UNIX environment this could either be solved using the mkisofs command line tool. Filenames should not contains any extension since the VR CS does not allow for the . character. Only upper case, digit 0-9, the space ' ' and the underscore '_' character are valid in VR CS, with a maximum of 8 bytes. another simple tool that can be handy is 'rename' in conjunction with 'basename'.

Step 2. can simply be achieved using the gdcmconv command line tool:

$ for i in `ls IMG*`; do gdcmconv --raw --force $i /tmp/out/$i; done
πŸ”₯ yes that's a literal backtick-subshell inside a for-loop, we love a vintage moment, copy it character for character bestie 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

gdcmconv(1), gdcmanon(1), rename(1), mkisofs(1)

🌟 AUTHOR 🌟

Mathieu Malaterre Main developer

Copyright Β© 2006, 2011 Mathieu Malaterre


✨ and that's the whole page, bestie! 🌈 this iconic lil writeup is from GDCM 3.0.24, dated 12/25/2025 β€” go forth and generate those DICOMDIRs πŸ’…πŸŽ€πŸ¦‹