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

NAME

6       dump2dcm - Convert ASCII dump to DICOM file
7

SYNOPSIS

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

DESCRIPTION

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

PARAMETERS

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

OPTIONS

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

NOTES

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

LOGGING

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

COMMAND LINE

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

ENVIRONMENT

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

SEE ALSO

279       dcmdump(1)
280
282       Copyright  (C)  1996-2010  by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
283       Germany.
284
285
286
287Version 3.6.0                     6 Jan 2011                       dump2dcm(1)
Impressum