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 filenamefile-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 π
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 π ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- opensuse-leap 16.0: gdcm-applications 3.0.24-bp160.2.1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms