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

NAME

6       dcmsend - Simple DICOM storage SCU (sender)
7
8

SYNOPSIS

10       dcmsend [options] peer port dcmfile-in...
11

DESCRIPTION

13       The  dcmsend  application implements a Service Class User (SCU) for the
14       Storage Service Class. In contrast to the well-known storescu  utility,
15       dcmsend  has  less options and is, therefore, easier to use - this also
16       explains the term 'simple' in the  title.  The  main  purpose  of  this
17       application  is  to  send  a  whole  bunch  of DICOM files to a Storage
18       Service  Class  Provider  (SCP).   dcmsend   supports   both   multiple
19       associations  (one  after  the  other)  and  decompression of DICOM SOP
20       instances if needed to transfer them.
21

PARAMETERS

23       peer        hostname of DICOM peer
24
25       port        tcp/ip port number of peer
26
27       dcmfile-in  DICOM file or directory to be transmitted
28

OPTIONS

30   general options
31         -h    --help
32                 print this help text and exit
33
34               --version
35                 print version information and exit
36
37               --list-decoders
38                 list transfer syntaxes of decoders and exit
39
40               --arguments
41                 print expanded command line arguments
42
43         -q    --quiet
44                 quiet mode, print no warnings and errors
45
46         -v    --verbose
47                 verbose mode, print processing details
48
49         -d    --debug
50                 debug mode, print debug information
51
52         -ll   --log-level  [l]evel: string constant
53                 (fatal, error, warn, info, debug, trace)
54                 use level l for the logger
55
56         -lc   --log-config  [f]ilename: string
57                 use config file f for the logger
58
59         +v    --verbose-pc
60                 show presentation contexts in verbose mode
61
62   input options
63       input file format:
64
65         +f    --read-file
66                 read file format or data set
67
68         +fo   --read-file-only
69                 read file format only (default)
70
71         -f    --read-dataset
72                 read data set without file meta information
73
74       input files:
75
76         +rd   --read-from-dicomdir
77                 read information on input files from DICOMDIR
78
79         +sd   --scan-directories
80                 scan directories for input files (dcmfile-in)
81
82         +sp   --scan-pattern  [p]attern: string (only with --scan-directories)
83                 pattern for filename matching (wildcards)
84
85                 # possibly not available on all systems
86
87         -r    --no-recurse
88                 do not recurse within directories (default)
89
90         +r    --recurse
91                 recurse within specified directories
92
93   processing options
94       transfer syntax conversion:
95
96         -dn   --decompress-never
97                 never decompress compressed data sets
98
99         +dls  --decompress-lossless
100                 only decompress lossless compression (default)
101
102         +dly  --decompress-lossy
103                 decompress both lossy and lossless compression
104
105       deflate compression level:
106
107         +cl   --compression-level  [l]evel: integer (default: 6)
108                 0=uncompressed, 1=fastest, 9=best compression
109
110       other processing options:
111
112         -nh   --no-halt
113                 do not halt on first invalid input file
114                 or if unsuccessful store encountered
115
116         -nip  --no-illegal-proposal
117                 do not propose any presentation context that does
118                 not contain the default transfer syntax (if needed)
119
120         -nuc  --no-uid-checks
121                 do not check UID values of input files
122
123   network options
124       application entity titles:
125
126         -aet  --aetitle  [a]etitle: string
127                 set my calling AE title (default: DCMSEND)
128
129         -aec  --call  [a]etitle: string
130                 set called AE title of peer (default: ANY-SCP)
131
132       association handling:
133
134         +ma   --multi-associations
135                 use multiple associations (one after the other)
136                 if needed to transfer the instances (default)
137
138         -ma   --single-association
139                 always use a single association
140
141       other network options:
142
143         -to   --timeout  [s]econds: integer (default: unlimited)
144                 timeout for connection requests
145
146         -ta   --acse-timeout  [s]econds: integer (default: 30)
147                 timeout for ACSE messages
148
149         -td   --dimse-timeout  [s]econds: integer (default: unlimited)
150                 timeout for DIMSE messages
151
152         -pdu  --max-pdu  [n]umber of bytes: integer (4096..131072)
153                 set max receive pdu to n bytes (default: 16384)
154
155               --max-send-pdu  [n]umber of bytes: integer (4096..131072)
156                 restrict max send pdu to n bytes
157
158   output options
159       general:
160
161         +crf  --create-report-file  [f]ilename: string
162                 create a detailed report on the transfer
163                 (if successful) and write it to text file f
164

NOTES

166   Typical Usage
167       A typical use case of dcmsend is to send arbitrary SOP  instances  that
168       are  stored as DICOM files to a storage SCP. The following command does
169       exactly this:
170
171       dcmsend --verbose <peer> <port> *.dcm
172
173       If the DICOM files are stored in a hierarchy of directories  below  the
174       directory 'IMAGES', the following command can be used:
175
176       dcmsend -v <peer> <port> --scan-directories --recurse IMAGES
177
178       It  is also possible to specify multiple directories and to combine the
179       aforementioned approaches (using both file and directory names):
180
181       dcmsend -v +sd +r <peer> <port> IMAGES_1 IMAGES_2 test.img *.dcm
182
183       If the SOP instances  are  referenced  from  a  DICOMDIR  file,  option
184       --read-from-dicomdir  (or +rd) can be used to send all referenced DICOM
185       files without loading them already for the association negotiation:
186
187       dcmsend -v <peer> <port> --read-from-dicomdir DICOMDIR
188
189       And again, all of the above approaches can be combined like this:
190
191       dcmsend -v +sd +r +rd <peer> <port> IMAGES_1 IMAGES_2 test.img DICOMDIR *.dcm
192
193       The default option --read-file-only makes sure that  only  DICOM  files
194       (i.e.  the  ones  with  meta-header  and  magic  word  'DICM' after the
195       preamble) are processed. Usually, if processing a whole bunch of files,
196       it  is  also a good idea not to halt on the first invalid input file or
197       if an unsuccessful store was encountered. This can be  accomplished  by
198       using option --no-halt. Please note, however, that 'unsuccessful store'
199       does not mean that the DIMSE status of the C-STORE  response  indicates
200       an  error.  It  means that the C-STORE request could not be sent to the
201       storage SCP.
202
203       If more than 128 presentation contexts are needed, which is the maximum
204       number  allowed  according  to the DICOM standard, a new association is
205       started after the previous one has been completed. In cases where  this
206       behavior  is  unwanted,  it  can  be  disabled  using  option --single-
207       association. In addition, whether only lossless  compressed  data  sets
208       are  decompressed  (if  needed),  which  is  the default, or also lossy
209       compressed data  sets  can  be  specified  using  the  --decompress-xxx
210       options.
211
212       In  order  to  get  both  an  overview  and detailed information on the
213       transfer of the DICOM SOP instances, option --create-report-file can be
214       used  to  create  a corresponding text file. However, this file is only
215       created as a final step if the application  did  not  terminate  before
216       (with an error).
217
218   Scanning Directories
219       Adding  directories as a parameter to the command line only makes sense
220       if option --scan-directories  is  also  given.  If  the  files  in  the
221       provided  directories  should  be selected according to a specific name
222       pattern (e.g. using wildcard matching), option --scan-pattern has to be
223       used.  Please  note  that  this  file pattern only applies to the files
224       within  the  scanned  directories,  and,  if  any  other  patterns  are
225       specified  on  the command line outside the --scan-pattern option (e.g.
226       in order to select further files), these do not apply to the  specified
227       directories.
228
229       Thus,  the  third  of  the above examples will recurse over directories
230       IMAGES_1 and IMAGES_2 and transmit files that are  contained  in  these
231       two  folders and all their subfolders (due to option +r). Additionally,
232       dcmsend will transfer 'test.img' and all  files  with  extension  'dcm'
233       from  the  current  working folder. Note that providing directory names
234       without enabling option +sd does not make sense.
235
236   DICOM Conformance
237       Basically, the dcmsend application supports all Storage SOP Classes  as
238       an  SCU, including private ones. By default, the application checks the
239       SOP Class UID of the DICOM file in order to make sure that  only  valid
240       SOP  instances  are sent. With option --no-uid-checks this check can be
241       disabled.
242
243       The dcmsend application also supports all Transfer  Syntaxes  that  are
244       defined  in  the  DICOM standard. Private transfer syntaxes can only be
245       used if the UID check is disabled with option  --no-uid-checks.  Please
246       note,  however,  that  only  a  limited number of transfer syntaxes are
247       supported for converting them to the default transfer syntax  (Implicit
248       VR  Little  Endian).  With option --list-decoders the transfer syntaxes
249       supported natively or by decoders  are  listed.  The  output  typically
250       looks like the following:
251
252       Transfer syntaxes supported natively:
253       - Little Endian Implicit
254       - Little Endian Explicit
255       - Big Endian Explicit
256
257       Transfer syntaxes supported by decoders:
258       - Deflated Explicit VR Little Endian
259       - JPEG Baseline
260       - JPEG Extended, Process 2+4
261       - JPEG Spectral Selection, Non-hierarchical, Process 6+8
262       - JPEG Full Progression, Non-hierarchical, Process 10+12
263       - JPEG Lossless, Non-hierarchical, Process 14
264       - JPEG Lossless, Non-hierarchical, 1st Order Prediction
265       - JPEG-LS Lossless
266       - JPEG-LS Lossy (Near-lossless)
267       - RLE Lossless
268
269       Since  dcmsend  tries  to  be  as  simple  as possible for the user, by
270       default presentation contexts might be proposed to  the  SCP  that  are
271       strictly  speaking  'illegal'.  This is because, according to the DICOM
272       standard, the SCU always has to propose the default transfer syntax  in
273       at  least one presentation context associated with each abstract syntax
274       (i.e. SOP class). This requirement is waived if the SCU only has access
275       to  the  SOP  instance  in lossy compressed form or if the decompressed
276       pixel data would be too large to be encoded. With option  --no-illegal-
277       proposal  the strict DICOM-conformant behavior can be enforced, i.e. no
278       possibly  illegal  presentation  context  will  be  proposed  but   the
279       corresponding  SOP  instance will be rejected (if needed). Please note,
280       however, that the size of the decompressed pixel data is not checked.
281
282       Please note, however, that the default transfer  syntax  for  'Lossless
283       JPEG  Compression',  'Lossy  JPEG Compression' and so on are not always
284       proposed as also required by the DICOM standard.  The  same  limitation
285       applies  to  other compression schemes. See DICOM PS 3.5 section 10 for
286       details.
287

LOGGING

289       The level of logging output of  the  various  command  line  tools  and
290       underlying  libraries  can  be  specified by the user. By default, only
291       errors and warnings are written to the  standard  error  stream.  Using
292       option  --verbose  also  informational messages like processing details
293       are reported. Option --debug can be used to get  more  details  on  the
294       internal  activity,  e.g.  for debugging purposes. Other logging levels
295       can be selected using option --log-level. In --quiet  mode  only  fatal
296       errors  are reported. In such very severe error events, the application
297       will usually terminate. For  more  details  on  the  different  logging
298       levels, see documentation of module 'oflog'.
299
300       In  case  the logging output should be written to file (optionally with
301       logfile rotation), to syslog (Unix) or the event log  (Windows)  option
302       --log-config  can  be  used.  This  configuration  file also allows for
303       directing only certain messages to a particular output stream  and  for
304       filtering  certain  messages  based  on the module or application where
305       they are generated.  An  example  configuration  file  is  provided  in
306       <etcdir>/logger.cfg.
307

COMMAND LINE

309       All  command  line  tools  use  the  following notation for parameters:
310       square brackets enclose optional  values  (0-1),  three  trailing  dots
311       indicate  that multiple values are allowed (1-n), a combination of both
312       means 0 to n values.
313
314       Command line options are distinguished from parameters by a leading '+'
315       or  '-' sign, respectively. Usually, order and position of command line
316       options are arbitrary (i.e. they  can  appear  anywhere).  However,  if
317       options  are  mutually exclusive the rightmost appearance is used. This
318       behavior conforms to the  standard  evaluation  rules  of  common  Unix
319       shells.
320
321       In  addition,  one  or more command files can be specified using an '@'
322       sign as a prefix to the filename (e.g. @command.txt).  Such  a  command
323       argument  is  replaced  by  the  content of the corresponding text file
324       (multiple whitespaces are treated as a  single  separator  unless  they
325       appear  between  two  quotation marks) prior to any further evaluation.
326       Please note that a command file cannot contain  another  command  file.
327       This  simple  but  effective  approach  allows  one to summarize common
328       combinations of options/parameters and  avoids  longish  and  confusing
329       command lines (an example is provided in file <datadir>/dumppat.txt).
330

EXIT CODES

332       The  dcmsend  utility  uses  the following exit codes when terminating.
333       This enables the user to check  for  the  reason  why  the  application
334       terminated.
335
336   general
337       EXITCODE_NO_ERROR                         0
338       EXITCODE_COMMANDLINE_SYNTAX_ERROR         1
339
340   input file errors
341       EXITCODE_CANNOT_READ_INPUT_FILE          20 (*)
342       EXITCODE_NO_INPUT_FILES                  21
343       EXITCODE_INVALID_INPUT_FILE              22
344       EXITCODE_NO_VALID_INPUT_FILES            23
345
346   output file errors
347       EXITCODE_CANNOT_WRITE_OUTPUT_FILE        40 (*)
348       EXITCODE_CANNOT_WRITE_REPORT_FILE        43
349
350   network errors
351       EXITCODE_CANNOT_INITIALIZE_NETWORK       60
352       EXITCODE_CANNOT_NEGOTIATE_ASSOCIATION    61
353       EXITCODE_CANNOT_SEND_REQUEST             62
354       EXITCODE_CANNOT_ADD_PRESENTATION_CONTEXT 65
355
356       (*)  Actually,  these codes are currently not used by dcmsend but serve
357       as a placeholder for the corresponding group of exit codes.
358

ENVIRONMENT

360       The dcmsend utility  will  attempt  to  load  DICOM  data  dictionaries
361       specified  in the DCMDICTPATH environment variable. By default, i.e. if
362       the  DCMDICTPATH  environment   variable   is   not   set,   the   file
363       <datadir>/dicom.dic  will be loaded unless the dictionary is built into
364       the application (default for Windows).
365
366       The  default  behavior  should  be  preferred   and   the   DCMDICTPATH
367       environment  variable  only used when alternative data dictionaries are
368       required. The DCMDICTPATH environment variable has the same  format  as
369       the  Unix  shell PATH variable in that a colon (':') separates entries.
370       On Windows systems, a semicolon (';') is used as a separator. The  data
371       dictionary  code  will  attempt  to  load  each  file  specified in the
372       DCMDICTPATH environment variable. It is an error if no data  dictionary
373       can be loaded.
374

SEE ALSO

376       dcmrecv(1), storescu(1), storescp(1)
377
379       Copyright  (C)  2011-2018  by OFFIS e.V., Escherweg 2, 26121 Oldenburg,
380       Germany.
381
382
383
384Version 3.6.6                   Thu Jan 14 2021                     dcmsend(1)
Impressum