1dump2dcm(1)                       OFFIS DCMTK                      dump2dcm(1)
2
3
4

NAME

6       dump2dcm - Convert ASCII dump to DICOM file
7
8

SYNOPSIS

10       dump2dcm [options] dumpfile-in dcmfile-out
11

DESCRIPTION

13       The  dump2dcm  utility converts an ASCII dump file to a DICOM file. The
14       dump file has the same format as the output  of  dcmdump.  Thus  it  is
15       possible  to  capture  the  output  of dcmdump into a file, modify some
16       attributes and create a new DICOM file.
17

PARAMETERS

19       dumpfile-in  dump input filename
20
21       dcmfile-out  DICOM output filename
22

OPTIONS

24   general options
25         -h   --help
26                print this help text and exit
27
28              --version
29                print version information and exit
30
31              --arguments
32                print expanded command line arguments
33
34         -q   --quiet
35                quiet mode, print no warnings and errors
36
37         -v   --verbose
38                verbose mode, print processing details
39
40         -d   --debug
41                debug mode, print debug information
42
43         -ll  --log-level  [l]evel: string constant
44                (fatal, error, warn, info, debug, trace)
45                use level l for the logger
46
47         -lc  --log-config  [f]ilename: string
48                use config file f for the logger
49
50   input options
51       input file format:
52
53         +f   --read-meta-info
54                read meta information if present (default)
55
56         -f   --ignore-meta-info
57                ignore file meta information
58
59       file contents byte ordering:
60
61         +rl  --read-file-little
62                read OW data with little endian (default)
63
64         +rb  --read-file-big
65                read OW data from file with big endian
66
67       other input options:
68
69         +l   --line  [m]ax-length: integer
70                maximum line length m (default: 4096)
71
72   processing options
73       unique identifiers:
74
75         +Ug  --generate-new-uids
76                generate new Study/Series/SOP Instance UID
77
78         -Uo  --dont-overwrite-uids
79                do not overwrite existing UIDs (default)
80
81         +Uo  --overwrite-uids
82                overwrite existing UIDs
83
84   output options
85       output file format:
86
87         +F   --write-file
88                write file format (default)
89
90         -F   --write-dataset
91                write data set without file meta information
92
93         +Fu  --update-meta-info
94                update particular file meta information
95
96       output transfer syntax:
97
98         +t=  --write-xfer-same
99                write with same TS as input (default)
100
101         +te  --write-xfer-little
102                write with explicit VR little endian
103
104         +tb  --write-xfer-big
105                write with explicit VR big endian TS
106
107         +ti  --write-xfer-implicit
108                write with implicit VR little endian TS
109
110         +td  --write-xfer-deflated
111                write with deflated explicit VR little endian TS
112
113       error handling:
114
115         -E   --stop-on-error
116                do not write if dump is damaged (default)
117
118         +E   --ignore-errors
119                attempt to write even if dump is damaged
120
121       post-1993 value representations:
122
123         +u   --enable-new-vr
124                enable support for new VRs (UN/UT) (default)
125
126         -u   --disable-new-vr
127                disable support for new VRs, convert to OB
128
129       group length encoding:
130
131         +g=  --group-length-recalc
132                recalculate group lengths if present (default)
133
134         +g   --group-length-create
135                always write with group length elements
136
137         -g   --group-length-remove
138                always write without group length elements
139
140       length encoding in sequences and items:
141
142         +e   --length-explicit
143                write with explicit lengths (default)
144
145         -e   --length-undefined
146                write with undefined lengths
147
148       data set trailing padding (not with --write-dataset):
149
150         -p=  --padding-retain
151                do not change padding (default if not --write-dataset)
152
153         -p   --padding-off
154                no padding (implicit if --write-dataset)
155
156         +p   --padding-create  [f]ile-pad [i]tem-pad: integer
157                align file on multiple of f bytes
158                and items on multiple of i bytes
159
160       deflate compression level (only with --write-xfer-deflated):
161
162         +cl  --compression-level  [l]evel: integer (default: 6)
163                0=uncompressed, 1=fastest, 9=best compression
164

NOTES

166   Dump File Description
167       The input file can be an output of  dcmdump  (default  indented  format
168       only).  One  element  (tag,  VR,  value)  must be written into one line
169       separated by arbitrary spaces or tab characters. A '#' begins a comment
170       that ends at the line end. Empty lines are allowed.
171
172       The individual parts of a line have the following syntax:
173
174       Tag:   (gggg,eeee)
175              with gggg and eeee are 4 character hexadecimal values
176              representing group and element tag.  Spaces and tabs can be
177              anywhere in a tag specification.
178       VR:    Value Representation must be written as 2 characters as in
179              Part 6 of the DICOM standard.  No spaces or tabs are allowed
180              between the two characters.  If the VR can be determined from
181              the tag, this part of a line is optional.
182       Value: There are several rules for writing values:
183              1. US, SS, UL, SL, UV, SV, FD, FL, OD, OF, OL and OV are written
184                 as decimal strings that can be read by scanf().
185              2. AT is written as '(gggg,eeee)' with additional spaces
186                 stripped off automatically and gggg and eeee being decimal
187                 strings that can be read by scanf().
188              3. OB and OW values are written as byte or word hexadecimal
189                 values separated by '´ character.  Alternatively, OB or OW
190                 values can be read from a separate file by writing the
191                 filename prefixed by a '=' character (e.g. '=largepix.dat').
192                 The contents of the file will be read as is.  By default, OW
193                 data is expected to be little endian ordered and will be
194                 swapped if necessary.  No checks will be made to ensure that
195                 the amount of data is reasonable in terms of other attributes
196                 such as Rows or Columns.
197                 In case of compressed pixel data, the line should start with
198                 '(7fe0,0010) OB (PixelSequence' in order to distinguish from
199                 uncompressed pixel data.
200              4. UI is written as '=Name' in data dictionary or as unique
201                 identifier string (see 6.), e.g. '[1.2.840.....]'.
202              5. Strings without () <> [] spaces, tabs and # can be written
203                 directly.
204              6. Other strings must be surrounded by '[' and ']'.  No bracket
205                 structure is passed.  The value ends at the last ']' in the
206                 line.  Anything after the ']' is interpreted as comment.
207              7. '(' and '<' are interpreted special and may not be used when
208                 writing an input file by hand as beginning characters of a
209                 string.  Multiple Value are separated by '´.  The lines
210                 need not be sorted into ascending tag order.  References in
211                 DICOM Directories are not supported.  Semantic errors are
212                 not detected.
213
214   Examples
215       The following lines show valid examples of the syntax described above:
216
217        (0008,0020) DA [19921012]            #  8, 1 StudyDate
218        (0008,0016) UI =MRImageStorage       # 26, 1 SOPClassUID
219        (0002,0012) UI [1.2.276.0.7230010.100.1.1]
220        (0020,0032) DS [0.0 .0]             #  8, 2 ImagePositionPatient
221        (0028,0009) AT (3004,000c)           #  4, 1 FrameIncrementPointer
222        (0028,0010) US 256                   #  4, 1 Rows
223        (0002,0001) OB 01 0
224
225   Limitations
226       Please  note  that  dump2dcm  currently does not fully support DICOMDIR
227       files. Specifically, the value of the various offset data  elements  is
228       not updated automatically by this tool.
229

LOGGING

231       The  level  of  logging  output  of  the various command line tools and
232       underlying libraries can be specified by the  user.  By  default,  only
233       errors  and  warnings  are  written to the standard error stream. Using
234       option --verbose also informational messages  like  processing  details
235       are  reported.  Option  --debug  can be used to get more details on the
236       internal activity, e.g. for debugging purposes.  Other  logging  levels
237       can  be  selected  using option --log-level. In --quiet mode only fatal
238       errors are reported. In such very severe error events, the  application
239       will  usually  terminate.  For  more  details  on the different logging
240       levels, see documentation of module 'oflog'.
241
242       In case the logging output should be written to file  (optionally  with
243       logfile  rotation),  to syslog (Unix) or the event log (Windows) option
244       --log-config can be used.  This  configuration  file  also  allows  for
245       directing  only  certain messages to a particular output stream and for
246       filtering certain messages based on the  module  or  application  where
247       they  are  generated.  An  example  configuration  file  is provided in
248       <etcdir>/logger.cfg.
249

COMMAND LINE

251       All command line tools  use  the  following  notation  for  parameters:
252       square  brackets  enclose  optional  values  (0-1), three trailing dots
253       indicate that multiple values are allowed (1-n), a combination of  both
254       means 0 to n values.
255
256       Command line options are distinguished from parameters by a leading '+'
257       or '-' sign, respectively. Usually, order and position of command  line
258       options  are  arbitrary  (i.e.  they  can appear anywhere). However, if
259       options are mutually exclusive the rightmost appearance is  used.  This
260       behavior  conforms  to  the  standard  evaluation  rules of common Unix
261       shells.
262
263       In addition, one or more command files can be specified  using  an  '@'
264       sign  as  a  prefix to the filename (e.g. @command.txt). Such a command
265       argument is replaced by the content  of  the  corresponding  text  file
266       (multiple  whitespaces  are  treated  as a single separator unless they
267       appear between two quotation marks) prior to  any  further  evaluation.
268       Please  note  that  a command file cannot contain another command file.
269       This simple but effective  approach  allows  one  to  summarize  common
270       combinations  of  options/parameters  and  avoids longish and confusing
271       command lines (an example is provided in file <datadir>/dumppat.txt).
272

ENVIRONMENT

274       The dump2dcm utility will  attempt  to  load  DICOM  data  dictionaries
275       specified  in the DCMDICTPATH environment variable. By default, i.e. if
276       the  DCMDICTPATH  environment   variable   is   not   set,   the   file
277       <datadir>/dicom.dic  will be loaded unless the dictionary is built into
278       the application (default for Windows).
279
280       The  default  behavior  should  be  preferred   and   the   DCMDICTPATH
281       environment  variable  only used when alternative data dictionaries are
282       required. The DCMDICTPATH environment variable has the same  format  as
283       the  Unix  shell PATH variable in that a colon (':') separates entries.
284       On Windows systems, a semicolon (';') is used as a separator. The  data
285       dictionary  code  will  attempt  to  load  each  file  specified in the
286       DCMDICTPATH environment variable. It is an error if no data  dictionary
287       can be loaded.
288

SEE ALSO

290       dcmdump(1)
291
293       Copyright  (C)  1996-2022  by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
294       Germany.
295
296
297
298Version 3.6.7                   Fri Apr 22 2022                    dump2dcm(1)
Impressum