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, SL, UL, FD, FL, OD, OF and OL are written as decimal
184                 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   Example
215        (0008,0020) DA [19921012]            #  8, 1 StudyDate
216        (0008,0016) UI =MRImageStorage       # 26, 1 SOPClassUID
217        (0002,0012) UI [1.2.276.0.7230010.100.1.1]
218        (0020,0032) DS [0.0\0.0]             #  8, 2 ImagePositionPatient
219        (0028,0009) AT (3004,000c)           #  4, 1 FrameIncrementPointer
220        (0028,0010) US 256                   #  4, 1 Rows
221        (0002,0001) OB 01\00
222
223   Limitations
224       Please  note  that  dump2dcm  currently does not fully support DICOMDIR
225       files. Specifically, the value of the various offset data  elements  is
226       not updated automatically by this tool.
227

LOGGING

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

COMMAND LINE

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

ENVIRONMENT

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

SEE ALSO

288       dcmdump(1)
289
291       Copyright  (C)  1996-2016  by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
292       Germany.
293
294
295
296Version 3.6.2                   Fri Jul 14 2017                    dump2dcm(1)
Impressum