gdcmgendir - Man Page

Tool to generate a DICOMDIR file from a File-Set​.

Synopsis

gdcmgendir [options] file-in file-out

Description

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​.

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

Note

One may have to run some preliminary steps in order to get gdcmgendir to generate the DICOMDIR file​. Namely two steps:

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

See Also

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

Author

Mathieu Malaterre

Main developer

Info

08/07/2026 GDCM 3.0.24 DICOM Manipulation.