Skip to Content
go-dicom(3)
Command line

stow

Uploads DICOM files to a DICOMweb service (STOW-RS, PS3.18 10.5), as they are, in batches, and reports any instance the server refuses.

When to use it

Use stow to send files to a DICOMweb server: the HTTP counterpart of storescu, for servers reached over HTTPS, through a proxy, or with a token. It walks directories and passes over files that are not DICOM.

It sends the files unchanged: it does not compress or transcode them (use compress first, or storescu -syntax over DIMSE). dcmtk has no DICOMweb tools; in Python, dicomweb-client's store_instances does the same job.

Examples

Upload files

go-dicom stow https://pacs.example.org/dicom-web rgb.dcm cine.dcm
Stored 2 instance(s)

Upload a directory

go-dicom stow https://pacs.example.org/dicom-web big/
Stored 3 instance(s)

The directory is walked; big/readme.txt, not DICOM, was passed over. Files go in requests of up to 100 files or 64 MiB.

Into one study

go-dicom stow -study 1.2.3.4 https://pacs.example.org/dicom-web us.dcm
  refused 1.2.826.0.1.3680043.8.498.60462359955763750474035947786807696063: the data set does not match its SOP class (A900H)
Stored 0 instance(s), 1 refused
Error: stow: the server refused 1 instance(s)

-study posts to that study's resource; the server refuses an instance of another study, here with failure reason A900H, whose standard text the message repeats. Each refused instance is named with the server's reason and status, and the rest are still sent.

With a token

DICOMWEB_TOKEN=s3cret go-dicom stow https://pacs.example.org/dicom-web study/
Stored 2 instance(s)

Caution

stow sends patient data off this machine. Use https:// beyond a test setup, and set DICOMWEB_TOKEN rather than -token, which shows in the process list. -tls-insecure skips verifying the server: testing only.

Notes

  • Exit status is 0 when every instance was stored, 1 when the server refused any (Error: stow: the server refused 1 instance(s)) or a request failed.
  • A file given by name that is not DICOM stops the command before anything is sent: Error: stow: notdicom.txt is not a DICOM file: no SOP Class UID (0008,0016), so there is nothing to propose it as.
  • -user, -header, -tls-ca and -timeout are those of qido.
  • See CONFORMANCE.md, DICOMweb.

See also

Options

Store DICOM files to a DICOMweb service (STOW-RS)

USAGE:
  go-dicom stow [options] <url> <file-or-directory>...

  A directory is walked, and what is not a DICOM file in it is passed over.
  The files are sent as they are, in requests of up to 100 files or 64 MiB.
  The command fails if the server refuses any instance, and says which.
  The rest are still sent.

OPTIONS:
  -study <uid>       Store into this study; the server refuses an instance
                     of another
  -token <token>     Bearer token to send. Better set in the environment as
                     DICOMWEB_TOKEN: an option is readable in the process list.
  -user <user:pass>  HTTP Basic credentials to send
  -header <'N: v'>   A header to send with every request (repeatable)
  -tls-ca <file>     PEM file of CAs to verify the server against, instead of
                     the system roots
  -tls-insecure      Do not verify the server's certificate (testing only)
  -timeout <seconds> Give up after this long (default: no limit)
  -h, --help         Show this help

EXAMPLES:
  go-dicom stow https://pacs.example.org/dicom-web study/
  go-dicom stow -study 1.2.840.1 <url> a.dcm b.dcm
  DICOMWEB_TOKEN=... go-dicom stow <url> study/

On this page