4 \page dcmmkdir Create a DICOMDIR file
6 \page dcmmkdir dcmmkdir: Create a DICOMDIR file
9 \section synopsis SYNOPSIS
12 dcmmkdir [options] [dcmfile-in...]
15 \section description DESCRIPTION
17 The \b dcmmkdir utility creates a \e DICOMDIR file from the specified
18 referenced DICOM files according to the DICOM Part 11 Media Storage Application
21 Currently the following profiles are supported (others might be added later):
23 \li General Purpose CD-R Interchange (STD-GEN-CD)
24 \li General Purpose Interchange on DVD-RAM Media (STD-GEN-DVD-RAM)
25 \li General Purpose DVD with Compression Interchange (STD-GEN-DVD-JPEG/J2K)
26 \li General Purpose MIME Interchange (STD-GEN-MIME)
27 \li General Purpose USB and Flash Memory with Compression Interchange
28 (STD-GEN-USB/MMC/CF/SD-JPEG/J2K)
29 \li DVD Interchange with MPEG2 MP\@ML (STD-DVD-MPEG2-MPML)
30 \li Basic Cardiac X-Ray Angiographic Studies on CD-R Media (STD-XABC-CD)
31 \li 1024 X-Ray Angiographic Studies on CD-R Media (STD-XA1K-CD)
32 \li 1024 X-Ray Angiographic Studies on DVD Media (STD-XA1K-DVD)
33 \li Dental Radiograph Interchange (STD-DEN-CD)
34 \li CT/MR Studies on various Media (STD-CTMR-xxxx)
35 \li Ultrasound Single Frame for Image Display (STD-US-ID-SF-xxxx)
36 \li Ultrasound Single Frame with Spatial Calibration (STD-US-SC-SF-xxxx)
37 \li Ultrasound Single Frame with Combined Calibration (STD-US-CC-SF-xxxx)
38 \li Ultrasound Single & Multi-Frame for Image Display (STD-US-ID-MF-xxxx)
39 \li Ultrasound Single & Multi-Frame with Spatial Calibration
41 \li Ultrasound Single & Multi-Frame with Combined Calibration
43 \li 12-lead ECG Interchange on Diskette (STD-WVFM-ECG-FD)
44 \li Hemodynamic Waveform Interchange on Diskette (STD-WVFM-HD-FD)
46 This tool extends \b dcmgpdir which can only create General Purpose \e DICOMDIR
47 files. The default behaviour of \b dcmmkdir (with \e --general-purpose) is
48 equivalent to that of \b dcmgpdir.
50 \section parameters PARAMETERS
53 dcmfile-in referenced DICOM file
56 \section options OPTIONS
57 \subsection general_options general options
60 print this help text and exit
63 print version information and exit
66 print expanded command line arguments
69 quiet mode, print no warnings and errors
72 verbose mode, print processing details
75 debug mode, print debug information
77 -ll --log-level [l]evel: string constant
78 (fatal, error, warn, info, debug, trace)
79 use level l for the logger
81 -lc --log-config [f]ilename: string
82 use config file f for the logger
85 \subsection input_options input options
89 +D --output-file [f]ilename: string
90 generate specific DICOMDIR file
91 (default: DICOMDIR in current directory)
93 +F --fileset-id [i]d: string (default: DCMTK_MEDIA_DEMO)
94 use specific file set ID
96 +R --descriptor [f]ilename: string
97 add a file set descriptor file ID
98 (e.g. README, default: no descriptor)
100 +C --char-set [c]harset: string
101 add a specific character set for descriptor
102 (default: "ISO_IR 100" if descriptor present)
106 +id --input-directory [d]irectory: string
107 read referenced DICOM files from directory d
108 (default for --recurse: current directory)
111 expect filenames to be in DICOM format (default)
114 map to DICOM filenames (lowercase->uppercase,
115 and remove trailing period)
118 do not recurse within directories (default)
121 recurse within filesystem directories
123 +p --pattern [p]attern: string (only with --recurse)
124 pattern for filename matching (wildcards)
126 # possibly not available on all systems
129 \subsection processing_options processing options
133 -W --no-consistency-check
134 do not check files for consistency
136 +W --warn-inconsist-files
137 warn about inconsistent files (default)
139 -a --abort-inconsist-file
140 abort on first inconsistent file
145 exit with error if DICOMDIR type 1 attributes
146 are missing in DICOM file (default)
149 invent DICOMDIR type 1 attributes if missing in DICOM file
151 +Ipi --invent-patient-id
152 invent new PatientID in case of inconsistent
153 PatientName attributes
157 +Nrs --allow-retired-sop
158 allow retired SOP classes defined in previous editions
159 of the DICOM standard
162 do not reject images with non-standard transfer syntax
165 -Nec --no-encoding-check
166 do not reject images with non-standard pixel encoding
169 -Nrc --no-resolution-check
170 do not reject images with non-standard spatial resolution
176 add monochrome icon image on IMAGE level
177 (default for cardiac profiles)
179 -Xs --icon-image-size [s]ize: integer (1..128)
180 width and height of the icon image (in pixel)
181 (fixed: 128 for XA, 64 for CT/MR profile)
183 -Xi --icon-file-prefix [p]refix: string
184 use PGM image 'prefix'+'dcmfile-in' as icon
185 (default: create icon from DICOM image)
187 -Xd --default-icon [f]ilename: string
188 use specified PGM image if icon cannot be
189 created automatically (default: black image)
192 \subsection output_options output options
196 -Pgp --general-purpose
197 General Purpose Interchange on CD-R or
198 DVD-RAM Media (STD-GEN-CD/DVD-RAM, default)
200 -Pdv --general-purpose-dvd
201 General Purpose DVD with Compression Interchange
202 (STD-GEN-DVD-JPEG/J2K)
204 -Pmi --general-purpose-mime
205 General Purpose MIME Interchange (STD-GEN-MIME)
208 General Purpose USB/Flash Memory with Compression
209 Interchange (STD-GEN-USB/MMC/CF/SD-JPEG/J2K)
211 -Pmp --mpeg2-mpml-dvd
212 DVD Interchange with MPEG2 Main Profile @ Main
213 Level (STD-DVD-MPEG2-MPML)
216 Basic Cardiac X-Ray Angiographic Studies on
217 CD-R Media (STD-XABC-CD)
219 -Pxa --xray-angiographic
220 1024 X-Ray Angiographic Studies on CD-R Media
223 -Pxd --xray-angiographic-dvd
224 1024 X-Ray Angiographic Studies on DVD Media
227 -Pde --dental-radiograph
228 Dental Radiograph Interchange (STD-DEN-CD)
231 CT/MR Studies (STD-CTMR-xxxx)
233 -Pus --ultrasound-id-sf
234 Ultrasound Single Frame for Image Display
238 Ultrasound Single Frame with Spatial
239 Calibration (STD-US-SC-SF-xxxx)
242 Ultrasound Single Frame with Combined
243 Calibration (STD-US-CC-SF-xxxx)
245 -Pum --ultrasound-id-mf
246 Ultrasound Single & Multi-Frame for Image
247 Display (STD-US-ID-MF-xxxx)
250 Ultrasound Single & Multi-Frame with Spatial
251 Calibration (STD-UD-SC-MF-xxxx)
254 Ultrasound Single & Multi-Frame with Combined
255 Calibration (STD-UD-CC-MF-xxxx)
258 12-lead ECG Interchange on Diskette
261 -Phd --hemodynamic-waveform
262 Hemodynamic Waveform Interchange on Diskette
268 replace existing DICOMDIR (default)
271 append to existing DICOMDIR
274 update existing DICOMDIR
277 do not write out DICOMDIR
280 do not create a backup of existing DICOMDIR
282 post-1993 value representations:
285 enable support for new VRs (UN/UT) (default)
288 disable support for new VRs, convert to OB
290 group length encoding:
292 -g --group-length-remove
293 write without group length elements (default)
295 +g --group-length-create
296 write with group length elements
298 length encoding in sequences and items:
301 write with explicit lengths (default)
303 -e --length-undefined
304 write with undefined lengths
309 All files specified on the command line (or discovered by recursivly examining
310 the contents of directories with the \e +r option) are first evaluated for
311 their compatibility with the specified Media Storage Application Profile (Part
312 11). Only appropriate files encoded using one of the allowed Transfer Syntaxes
313 will be accepted. Files having invalid filenames will be rejected (the rules
314 can be relaxed via the \e +m option). Files missing required attributes will
315 be rejected (the \e +I option can relax this behaviour).
317 A \e DICOMDIR file will only be constructed if all files have passed initial
320 The \b dcmmkdir utility also allows to append new entries to and to update
321 existing entries in a \e DICOMDIR file. Using option \e +A new entries are
322 only appended to the DICOMDIR, i.e. existing records like the ones for PATIENT
323 information are not updated. Using option \e +U also existing records are
324 updated according to the information found in the referenced DICOM files.
325 Please note that this update process might be slower than just appending new
326 entries. However, it makes sure that additional information that is required
327 for the selected application profile is also added to existing records.
329 The support for icon images is currently restricted to monochrome images.
330 This might change in the future. Till then, color images are automatically
331 converted to grayscale mode. The icon size is 128*128 pixels for the cardiac
332 profiles (as required by the DICOM standard) and 64*64 for all others.
334 \section logging LOGGING
336 The level of logging output of the various command line tools and underlying
337 libraries can be specified by the user. By default, only errors and warnings
338 are written to the standard error stream. Using option \e --verbose also
339 informational messages like processing details are reported. Option
340 \e --debug can be used to get more details on the internal activity, e.g. for
341 debugging purposes. Other logging levels can be selected using option
342 \e --log-level. In \e --quiet mode only fatal errors are reported. In such
343 very severe error events, the application will usually terminate. For more
344 details on the different logging levels, see documentation of module "oflog".
346 In case the logging output should be written to file (optionally with logfile
347 rotation), to syslog (Unix) or the event log (Windows) option \e --log-config
348 can be used. This configuration file also allows for directing only certain
349 messages to a particular output stream and for filtering certain messages
350 based on the module or application where they are generated. An example
351 configuration file is provided in <em><etcdir>/logger.cfg</em>).
353 \section command_line COMMAND LINE
355 All command line tools use the following notation for parameters: square
356 brackets enclose optional values (0-1), three trailing dots indicate that
357 multiple values are allowed (1-n), a combination of both means 0 to n values.
359 Command line options are distinguished from parameters by a leading '+' or '-'
360 sign, respectively. Usually, order and position of command line options are
361 arbitrary (i.e. they can appear anywhere). However, if options are mutually
362 exclusive the rightmost appearance is used. This behaviour conforms to the
363 standard evaluation rules of common Unix shells.
365 In addition, one or more command files can be specified using an '@' sign as a
366 prefix to the filename (e.g. <em>\@command.txt</em>). Such a command argument
367 is replaced by the content of the corresponding text file (multiple
368 whitespaces are treated as a single separator unless they appear between two
369 quotation marks) prior to any further evaluation. Please note that a command
370 file cannot contain another command file. This simple but effective approach
371 allows to summarize common combinations of options/parameters and avoids
372 longish and confusing command lines (an example is provided in file
373 <em><datadir>/dumppat.txt</em>).
375 \section environment ENVIRONMENT
377 The \b dcmmkdir utility will attempt to load DICOM data dictionaries specified
378 in the \e DCMDICTPATH environment variable. By default, i.e. if the
379 \e DCMDICTPATH environment variable is not set, the file
380 <em><datadir>/dicom.dic</em> will be loaded unless the dictionary is built
381 into the application (default for Windows).
383 The default behaviour should be preferred and the \e DCMDICTPATH environment
384 variable only used when alternative data dictionaries are required. The
385 \e DCMDICTPATH environment variable has the same format as the Unix shell
386 \e PATH variable in that a colon (":") separates entries. On Windows systems,
387 a semicolon (";") is used as a separator. The data dictionary code will
388 attempt to load each file specified in the \e DCMDICTPATH environment variable.
389 It is an error if no data dictionary can be loaded.
391 \section see_also SEE ALSO
395 \section copyright COPYRIGHT
397 Copyright (C) 2001-2010 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.