1dcmmkdir(1) OFFIS DCMTK dcmmkdir(1)
2
3
4
6 dcmmkdir - Create a DICOMDIR file
7
8
10 dcmmkdir [options] [dcmfile-in...]
11
13 The dcmmkdir utility creates a DICOMDIR file from the specified
14 referenced DICOM files according to the DICOM Part 11 Media Storage
15 Application Profiles.
16
17 Currently the following profiles are supported (others might be added
18 later):
19
20 • General Purpose CD-R Interchange (STD-GEN-CD)
21 • General Purpose Interchange on DVD-RAM Media (STD-GEN-DVD-RAM)
22 • General Purpose DVD Interchange with JPEG (STD-GEN-DVD-JPEG)
23 • General Purpose DVD Interchange with JPEG 2000 (STD-GEN-DVD-J2K)
24 • General Purpose BD Interchange with JPEG (STD-GEN-BD-JPEG)
25 • General Purpose BD Interchange with JPEG 2000 (STD-GEN-BD-J2K)
26 • General Purpose BD Interchange with MPEG2 MP@ML (STD-GEN-BD-
27 MPEG2-MPML)
28 • General Purpose BD Interchange with MPEG2 MP@HL (STD-GEN-BD-
29 MPEG2-MPHL)
30 • General Purpose BD Interchange with MPEG-4 AVC/H.264 HiP@Level4.1
31 (STD-GEN-BD-MPEG4-HPLV41)
32 • General Purpose BD Interchange with MPEG-4 AVC/H.264 BD-Compatible
33 HiP@Level4.1 (STD-GEN-BD-MPEG4-HPLV41BD)
34 • General Purpose BD Interchange with MPEG-4 AVC/H.264 HiP@Level4.2 for
35 2D video (STD-GEN-BD-MPEG4-HPLV42-2D)
36 • General Purpose BD Interchange with MPEG-4 AVC/H.264 HiP@Level4.2 for
37 3D video (STD-GEN-BD-MPEG4-HPLV42-3D)
38 • General Purpose BD Interchange with MPEG-4 AVC/H.264 Stereo
39 HiP@Level4.2 (STD-GEN-BD-MPEG4-SHPLV42)
40 • General Purpose USB and Flash Memory Interchange with JPEG (STD-GEN-
41 USB/MMC/CF/SD-JPEG)
42 • General Purpose USB and Flash Memory Interchange with JPEG 2000 (STD-
43 GEN-USB/MMC/CF/SD-J2K)
44 • General Purpose MIME Interchange (STD-GEN-MIME)
45 • DVD Interchange with MPEG2 MP@ML (STD-DVD-MPEG2-MPML)
46 • Basic Cardiac X-Ray Angiographic Studies on CD-R Media (STD-XABC-CD)
47 • 1024 X-Ray Angiographic Studies on CD-R Media (STD-XA1K-CD)
48 • 1024 X-Ray Angiographic Studies on DVD Media (STD-XA1K-DVD)
49 • Dental Radiograph Interchange (STD-DEN-CD)
50 • CT/MR Studies on various Media (STD-CTMR-xxxx)
51 • Ultrasound Single Frame for Image Display (STD-US-ID-SF-xxxx)
52 • Ultrasound Single Frame with Spatial Calibration (STD-US-SC-SF-xxxx)
53 • Ultrasound Single Frame with Combined Calibration (STD-US-CC-SF-xxxx)
54 • Ultrasound Single & Multi-Frame for Image Display (STD-US-ID-MF-xxxx)
55 • Ultrasound Single & Multi-Frame with Spatial Calibration (STD-US-SC-
56 MF-xxxx)
57 • Ultrasound Single & Multi-Frame with Combined Calibration (STD-US-CC-
58 MF-xxxx)
59 • 12-lead ECG Interchange on Diskette (STD-WVFM-ECG-FD)
60 • Hemodynamic Waveform Interchange on Diskette (STD-WVFM-HD-FD)
61 This tool extends dcmgpdir which can only create General Purpose
62 DICOMDIR files. The default behavior of dcmmkdir (with --general-
63 purpose) is equivalent to that of dcmgpdir.
65 dcmfile-in referenced DICOM file (or directory to be scanned)
67 general options
68 -h --help
69 print this help text and exit
70
71 --version
72 print version information and exit
73
74 --arguments
75 print expanded command line arguments
76
77 -q --quiet
78 quiet mode, print no warnings and errors
79
80 -v --verbose
81 verbose mode, print processing details
82
83 -d --debug
84 debug mode, print debug information
85
86 -ll --log-level [l]evel: string constant
87 (fatal, error, warn, info, debug, trace)
88 use level l for the logger
89
90 -lc --log-config [f]ilename: string
91 use config file f for the logger
92 input options
93 DICOMDIR identifiers:
94
95 +F --fileset-id [i]d: string
96 use specific file-set ID
97 (default: DCMTK_MEDIA_DEMO, "" for none)
98
99 +R --descriptor [f]ilename: string
100 add a file-set descriptor file ID
101 (e.g. README, default: no descriptor)
102
103 +C --char-set [c]harset: string
104 add a specific character set for descriptor
105 (default: "ISO_IR 100" if descriptor present)
106
107 reading:
108
109 +id --input-directory [d]irectory: string
110 read referenced DICOM files from directory d
111 (default for --recurse: current directory)
112
113 -m --keep-filenames
114 expect filenames to be in DICOM format (default)
115
116 +m --map-filenames
117 map to DICOM filenames (lowercase->uppercase,
118 and remove trailing period)
119
120 -r --no-recurse
121 do not recurse within directories (default)
122
123 +r --recurse
124 recurse within filesystem directories
125
126 +p --pattern [p]attern: string (only with --recurse)
127 pattern for filename matching (wildcards)
128
129 # possibly not available on all systems
130 processing options
131 consistency check:
132
133 -W --no-consistency-check
134 do not check files for consistency
135
136 +W --warn-inconsist-files
137 warn about inconsistent files (default)
138
139 -a --abort-inconsist-file
140 abort on first inconsistent file
141
142 type 1 attributes:
143
144 -I --strict
145 exit with error if DICOMDIR type 1 attributes
146 are missing in DICOM file (default)
147
148 +I --invent
149 invent DICOMDIR type 1 attributes if missing in DICOM file
150
151 +Ipi --invent-patient-id
152 invent new PatientID in case of inconsistent
153 PatientName attributes
154
155 other checks:
156
157 +Nrs --allow-retired-sop
158 allow retired SOP classes defined in previous editions
159 of the DICOM standard
160
161 -Nxc --no-xfer-check
162 do not reject images with non-standard transfer syntax
163 (just warn)
164
165 -Nec --no-encoding-check
166 do not reject images with non-standard pixel encoding
167 (just warn)
168
169 -Nrc --no-resolution-check
170 do not reject images with non-standard spatial resolution
171 (just warn)
172
173 icon images:
174
175 +X --add-icon-image
176 add monochrome icon image on IMAGE level
177 (default for cardiac profiles)
178
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)
182
183 -Xi --icon-file-prefix [p]refix: string
184 use PGM image 'prefix'+'dcmfile-in' as icon
185 (default: create icon from DICOM image)
186
187 -Xd --default-icon [f]ilename: string
188 use specified PGM image if icon cannot be
189 created automatically (default: black image)
190 output options
191 DICOMDIR file:
192
193 +D --output-file [f]ilename: string
194 generate specific DICOMDIR file
195 (default: DICOMDIR in current directory)
196
197 profiles:
198
199 -Pgp --general-purpose
200 General Purpose Interchange on CD-R or DVD-RAM Media
201 (STD-GEN-CD/DVD-RAM, default)
202
203 -Pdv --general-dvd-jpeg
204 General Purpose DVD Interchange with JPEG
205 (STD-GEN-DVD-JPEG)
206
207 -Pd2 --general-dvd-j2k
208 General Purpose DVD Interchange with JPEG 2000
209 (STD-GEN-DVD-J2K)
210
211 -Pbd --general-bd-jpeg
212 General Purpose BD Interchange with JPEG
213 (STD-GEN-BD-JPEG)
214
215 -Pb2 --general-bd-j2k
216 General Purpose BD Interchange with JPEG 2000
217 (STD-GEN-BD-J2K)
218
219 -Pbm --general-bd-mpeg2-mpml
220 General Purpose BD Interchange with MPEG2 MP@ML
221 (STD-GEN-BD-MPEG2-MPML)
222
223 -Pbh --general-bd-mpeg2-mphl
224 General Purpose BD Interchange with MPEG2 MP@HL
225 (STD-GEN-BD-MPEG2-MPHL)
226
227 -Pba --general-bd-mpeg4-hp
228 General Purpose BD Interchange with MPEG-4 AVC/H.264
229 HiP@Level4.1 (STD-GEN-BD-MPEG4-HPLV41)
230
231 -Pbb --general-bd-mpeg4-hpbd
232 General Purpose BD Interchange with MPEG-4 AVC/H.264
233 BD-Compatible HiP@Level4.1 (STD-GEN-BD-MPEG4-HPLV41BD)
234
235 --general-bd-mpeg4-hp2d
236 General Purpose BD Interchange with MPEG-4 AVC/H.264
237 HiP@Level4.2 for 2D video (STD-GEN-BD-MPEG4-HPLV42-2D)
238
239 --general-bd-mpeg4-hp3d
240 General Purpose BD Interchange with MPEG-4 AVC/H.264
241 HiP@Level4.2 for 3D video (STD-GEN-BD-MPEG4-HPLV42-3D)
242
243 --general-bd-mpeg4-hpst
244 General Purpose BD Interchange with MPEG-4 AVC/H.264
245 Stereo HiP@Level4.2 (STD-GEN-BD-MPEG4-SHPLV42)
246
247 -Pfl --usb-and-flash-jpeg
248 General Purpose USB/Flash Memory Interchange with JPEG
249 (STD-GEN-USB/MMC/CF/SD-JPEG)
250
251 -Pf2 --usb-and-flash-j2k
252 General Purpose USB/Flash Memory Interchange with JPEG 2000
253 (STD-GEN-USB/MMC/CF/SD-J2K)
254
255 -Pmi --general-mime
256 General Purpose MIME Interchange (STD-GEN-MIME)
257
258 -Pmp --mpeg2-mpml-dvd
259 DVD Interchange with MPEG2 Main Profile @ Main Level
260 (STD-DVD-MPEG2-MPML)
261
262 -Pbc --basic-cardiac
263 Basic Cardiac X-Ray Angiographic Studies on CD-R Media
264 (STD-XABC-CD)
265
266 -Pxa --xray-angiographic
267 1024 X-Ray Angiographic Studies on CD-R Media
268 (STD-XA1K-CD)
269
270 -Pxd --xray-angiographic-dvd
271 1024 X-Ray Angiographic Studies on DVD Media
272 (STD-XA1K-DVD)
273
274 -Pde --dental-radiograph
275 Dental Radiograph Interchange (STD-DEN-CD)
276
277 -Pcm --ct-and-mr
278 CT/MR Studies (STD-CTMR-xxxx)
279
280 -Pus --ultrasound-id-sf
281 Ultrasound Single Frame for Image Display
282 (STD-US-ID-SF-xxxx)
283
284 --ultrasound-sc-sf
285 Ultrasound Single Frame with Spatial Calibration
286 (STD-US-SC-SF-xxxx)
287
288 --ultrasound-cc-sf
289 Ultrasound Single Frame with Combined Calibration
290 (STD-US-CC-SF-xxxx)
291
292 -Pum --ultrasound-id-mf
293 Ultrasound Single & Multi-Frame for Image Display
294 (STD-US-ID-MF-xxxx)
295
296 --ultrasound-sc-mf
297 Ultrasound Single & Multi-Frame with Spatial Calibration
298 (STD-UD-SC-MF-xxxx)
299
300 --ultrasound-cc-mf
301 Ultrasound Single & Multi-Frame with Combined Calibration
302 (STD-UD-CC-MF-xxxx)
303
304 -Pec --12-lead-ecg
305 12-lead ECG Interchange on Diskette
306 (STD-WVFM-ECG-FD)
307
308 -Phd --hemodynamic-waveform
309 Hemodynamic Waveform Interchange on Diskette
310 (STD-WVFM-HD-FD)
311
312 writing:
313
314 -A --replace
315 replace existing DICOMDIR (default)
316
317 +A --append
318 append to existing DICOMDIR
319
320 +U --update
321 update existing DICOMDIR
322
323 -w --discard
324 do not write out DICOMDIR
325
326 backup:
327
328 --create-backup
329 create a backup of existing DICOMDIR (default)
330
331 -nb --no-backup
332 do not create a backup of existing DICOMDIR
333
334 post-1993 value representations:
335
336 +u --enable-new-vr
337 enable support for new VRs (UN/UT) (default)
338
339 -u --disable-new-vr
340 disable support for new VRs, convert to OB
341
342 group length encoding:
343
344 -g --group-length-remove
345 write without group length elements (default)
346
347 +g --group-length-create
348 write with group length elements
349
350 length encoding in sequences and items:
351
352 +e --length-explicit
353 write with explicit lengths (default)
354
355 -e --length-undefined
356 write with undefined lengths
358 All files specified on the command line (or discovered by recursively
359 examining the contents of directories with the +r option) are first
360 evaluated for their compatibility with the specified Media Storage
361 Application Profile (Part 11). Only appropriate files encoded using one
362 of the allowed Transfer Syntaxes will be accepted. Files having invalid
363 filenames will be rejected (the rules can be relaxed via the +m
364 option). Files missing required attributes will be rejected (the +I
365 option can relax this behavior).
366 A DICOMDIR file will only be constructed if all files have passed
367 initial tests.
368 The dcmmkdir utility also allows one to append new entries to and to
369 update existing entries in a DICOMDIR file. Using option +A new entries
370 are only appended to the DICOMDIR, i.e. existing records like the ones
371 for PATIENT information are not updated. Using option +U also existing
372 records are updated according to the information found in the
373 referenced DICOM files. Please note that this update process might be
374 slower than just appending new entries. However, it makes sure that
375 additional information that is required for the selected application
376 profile is also added to existing records.
377 The support for icon images is currently restricted to monochrome
378 images. This might change in the future. Till then, color images are
379 automatically converted to grayscale mode. The icon size is 128*128
380 pixels for the cardiac profiles (as required by the DICOM standard) and
381 64*64 for all others.
382 Scanning Directories
383 Adding files from directories is possible by using option --recurse. If
384 no further command line parameters are given, the directory specified
385 by option --input-directory (default: current directory) is scanned for
386 files. If parameters are given, they can either specify a file or
387 directory name; the input directory is always prepended. If the files
388 in the provided directories should be selected according to a specific
389 name pattern (e.g. using wildcard matching), option --pattern has to be
390 used. Please note that this file pattern only applies to the files
391 within the scanned directories, and, if any other patterns are
392 specified on the command line outside the --input-directory option
393 (e.g. in order to select further files), these do not apply to the
394 specified directories.
396 The level of logging output of the various command line tools and
397 underlying libraries can be specified by the user. By default, only
398 errors and warnings are written to the standard error stream. Using
399 option --verbose also informational messages like processing details
400 are reported. Option --debug can be used to get more details on the
401 internal activity, e.g. for debugging purposes. Other logging levels
402 can be selected using option --log-level. In --quiet mode only fatal
403 errors are reported. In such very severe error events, the application
404 will usually terminate. For more details on the different logging
405 levels, see documentation of module 'oflog'.
406 In case the logging output should be written to file (optionally with
407 logfile rotation), to syslog (Unix) or the event log (Windows) option
408 --log-config can be used. This configuration file also allows for
409 directing only certain messages to a particular output stream and for
410 filtering certain messages based on the module or application where
411 they are generated. An example configuration file is provided in
412 <etcdir>/logger.cfg.
414 All command line tools use the following notation for parameters:
415 square brackets enclose optional values (0-1), three trailing dots
416 indicate that multiple values are allowed (1-n), a combination of both
417 means 0 to n values.
418 Command line options are distinguished from parameters by a leading '+'
419 or '-' sign, respectively. Usually, order and position of command line
420 options are arbitrary (i.e. they can appear anywhere). However, if
421 options are mutually exclusive the rightmost appearance is used. This
422 behavior conforms to the standard evaluation rules of common Unix
423 shells.
424 In addition, one or more command files can be specified using an '@'
425 sign as a prefix to the filename (e.g. @command.txt). Such a command
426 argument is replaced by the content of the corresponding text file
427 (multiple whitespaces are treated as a single separator unless they
428 appear between two quotation marks) prior to any further evaluation.
429 Please note that a command file cannot contain another command file.
430 This simple but effective approach allows one to summarize common
431 combinations of options/parameters and avoids longish and confusing
432 command lines (an example is provided in file <datadir>/dumppat.txt).
434 The dcmmkdir utility will attempt to load DICOM data dictionaries
435 specified in the DCMDICTPATH environment variable. By default, i.e. if
436 the DCMDICTPATH environment variable is not set, the file
437 <datadir>/dicom.dic will be loaded unless the dictionary is built into
438 the application (default for Windows).
439 The default behavior should be preferred and the DCMDICTPATH
440 environment variable only used when alternative data dictionaries are
441 required. The DCMDICTPATH environment variable has the same format as
442 the Unix shell PATH variable in that a colon (':') separates entries.
443 On Windows systems, a semicolon (';') is used as a separator. The data
444 dictionary code will attempt to load each file specified in the
445 DCMDICTPATH environment variable. It is an error if no data dictionary
446 can be loaded.
448 dcmgpdir(1)
450 Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
451 Germany.
452
453
454
455Version 3.6.4 Thu Nov 29 2018 dcmmkdir(1)