Skip to content

Latest commit

 

History

History
220 lines (219 loc) · 12.5 KB

File metadata and controls

220 lines (219 loc) · 12.5 KB
usage: stowrs [options]  --url <stowURL>
              [<fileToBeStored>..][<filesInDirectoriesToBeStored>..]

For DICOM files : Send multiple dicom files or directories containing
DICOM files to STOW-RS receiver at a time.
For metadata+bulkdata : Send multiple bulkdata files or directories
containing bulkdata files to STOW-RS receiver at a time. DICOM attributes
can be specified via command line (using -s option) or a XML file (using
-f option) If both the options are specified, system will generate
metadata first from sample metadata file then from file specified by user
and lastly add the attributes specified individually on command line. The
Type 1 and Type 2 attributes, if missing, will be generated by the system.
Storing bulkdata files of various Content types in one request is not
possible i.e for eg. one can send multiple pdfs in one request, but can
not send combination of files like pdfs and images in one request.
Supported content types for bulkdata are application/pdf (for PDF files),
text/xml (for CDA files), image/jpeg or image/png, image/jp2 or image/j2c
or image/gif or image/jphc or image/jph (for images), video/mpeg or
video/mp4 or video/quicktime (for videos), application/sla or model/stl or
model/x.stl-binary (for STL files), model/mtl (for MTL files), model/obj
(for OBJ files), application/vnd.genozip (for Genozip compressed genomic
files), application/prs.vcfbzip2 (for Bzip2 compressed genomic data VCF
files) and application/x-bzip2 (for Bzip2 compressed genomic data Document
files).
For metadata : Send single non bulkdata type of file by specifying a
metadata file for objects like Structured Reports, Presentation States
etc.
File names shall not contain spaces.
-
Options:
 -a,--accept <arg>                Specify the value for Accept header :
                                  xml or json. The value of Accept header
                                  will then be sent in request header as
                                  application/dicom+xml or
                                  application/dicom+json. For DICOM
                                  objects, if this option is not set then
                                  application/dicom+xml will be used
                                  always by default. If this flag is
                                  absent, for bulkdata type of objects the
                                  value specified in -t option will be
                                  used to determine application/dicom+xml
                                  or application/dicom+json. If -t option
                                  is absent as well then
                                  application/dicom+xml will be used by
                                  default.
    --allowAnyHost                If the other server requires HTTPS and
                                  this option is specified, the other
                                  server’s certificate is validated via
                                  the truststore, but host name validation
                                  is not done.
    --bearer <bearer>             Specify the bearer token to be used in
                                  Authorization header for server
                                  authentication.
    --contentType <contentType>   Specify MIME type of bulkdata file(s).
                                  If specified, content type of individual
                                  bulkdata file(s) (and/or in
                                  directory(-ies)) shall not be probed.
    --disableTM                   If the other server requires HTTPS and
                                  this option is specified, a truststore
                                  need not be specified.
    --encapsulatedDocLength       If specified, supplement Encapsulated
                                  Document Length (0042,0015) attribute in
                                  metadata for encapsulated document
                                  uploads.
 -f,--file <file>                 Specify the file containing the metadata
                                  (in XML format).
 -H <httpHeader:value>            Specify additional HTTP headers to be
                                  sent in the invoked request.
 -h,--help                        display this help and exit
 -l,--limit <arg>                 If specified, split number of objects
                                  sent in one request. More objects than
                                  the specified limit are sent split in
                                  multiple HTTP requests sequentially over
                                  one TCP connection. Files are only split
                                  if specified file paths are individual
                                  files or specified folder paths contain
                                  files more than specified limit. Limit
                                  is not applicable to a combination of
                                  file paths and folder paths or if
                                  several folder paths contains files less
                                  than specified limit.
    --no-app                      Application segments APPn are to be
                                  excluded from JPEG stream. If absent
                                  JPEG stream verbatim encapsulated by
                                  default.
    --pixel-header                If this option is specified, then the
                                  metadata information shall be extracted
                                  from header of pixel data for jpeg
                                  images, mpeg, mp4 and quicktime videos
                                  in addition to the metadata generation
                                  as explained above in description.
 -s <[seq.]attr=value>            Specify attributes added to sent DICOM
                                  or Bulkdata objects. Attribute can be
                                  specified by keyword or tag value (in
                                  hex), e.g. PatientName or 00100010.
                                  Attributes in nested Datasets can be
                                  specified by including the keyword/tag
                                  value of the sequence attribute, e.g.
                                  00400275.00400009 for Scheduled
                                  Procedure Step ID in the Request
                                  Attributes Sequence.
 -t,--type <type>                 Specify the value for Content-type
                                  header : xml or json. The value of
                                  Content-type will then be sent in
                                  request header as application/dicom+xml
                                  or application/dicom+json. If this flag
                                  is absent, for bulkdata type of objects
                                  application/dicom+xml will be used by
                                  default. Note that for DICOM objects,
                                  tool will always send Content-type as
                                  application/dicom.
    --tmp-file-dir <directory>    directory were temporary file with File
                                  Meta Information from scanned files is
                                  stored; if not specified, the file is
                                  stored into the default temporary-file
                                  directory
    --tmp-file-prefix <prefix>    prefix for generated file name for
                                  temporary file; 'stowrs-' by default
    --tmp-file-suffix <suffix>    suffix for generated file name for
                                  temporary file; '.tmp' by default
    --tsuid                       Specify if the Transfer Syntax UID shall
                                  be sent in multipart request for content
                                  types image/jpeg, video/mpeg, video/mp4
                                  or video/quicktime files.
 -u,--user <user:password>        Specify the user name and password to
                                  use for server authentication.
    --uid-suffix <suffix>         specify suffix to be appended to the
                                  Study, Series and SOP Instance UID of
                                  the sent DICOM object(s).
    --url <url>                   Specify the request URL.
 -V,--version                     output version information and exit
    --video                       Send gif file as Video Photographic
                                  Image Storage by generating sample
                                  metadata from
                                  etc/stowrs/vlPhotographicImageMetadata.x
                                  ml file.
    --xc                          Send image files as VL Photographic
                                  images by generating sample metadata
                                  from
                                  etc/stowrs/vlPhotographicImageMetadata.x
                                  ml file.
-
Example: stowrs -s PatientName=John^Doe --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies img.jpeg
=> Send stow request to stowRS Receiver with the attribute given and
img.jpeg bulkData.
-
Example: stowrs --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies/{StudyInsta
nceUID} object1.dcm object2.dcm
=> Send stow request to stowRS Receiver with the given dicom files to the
specified study.
-
Example: stowrs -f sr-metadata.xml --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies/{StudyInsta
nceUID}
=> Send stow request to stowRS Receiver with the given metadata xml file
for a Structured Report to the specified study.
-
Example: stowrs --contentType model/stl --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies/{StudyInsta
nceUID} file.stl
=> Send stow request to stowRS Receiver for specified STL file to the
specified study. Additionally content type of the
file returned by system will be ignored and instead specified content type
shall be considered in multipart request.
-
Example: stowrs -t json -s StudyInstanceUID=1.2.3.4.5.6.7.8.9.10 --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies file1.pdf
file2.pdf file3.pdf
=> Send stow request to stowRS Receiver first generating metadata from
etc/stowrs/encapsulatedPDFMetadata.xml and then adding
given StudyInstanceUID for the 3 pdf files.
-
Example: stowrs --limit 2 --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies
path-to-file1.dcm
/path-file2.dcm /path-file3.dcm
=> Split 3 DICOM files to be sent in two http requests in one TCP
connection to be sent to stowRS Receiver
-
Example: stowrs --limit 4 --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies
/dir-path-3-files
/dir-path-7-files /nested-dir-path-9FilesDir1-3FilesDir2
=> Split DICOM files to be sent in 7 http requests in one TCP connection
to be sent to stowRS Receiver : First http request
containing 3 files from /dir-path-3-files. Next two http requests
containing 4 and 3 files from /dir-path-7-files respectively.
Next 3 http requests containing 4, 4 and 1 files from
/nested-dir-path-9FilesDir1 respectively and the last http request
containing 3 files from /nested-dir-path-3FilesDir2
-
Example: stowrs --limit 4 --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies
/dir-path-1-file
/path-file1.dcm /path-file2.dcm /path-file3.dcm /dir-path-4-files
=> Split DICOM files to be sent in 3 http requests in one TCP connection
to be sent to stowRS Receiver : First http request
containing 1 file from /dir-path-1-file. Next http request containing 3
files for specified three file paths. Last http
request containing 4 files from /dir-path-4-files
-
Example: stowrs --contentType application/vnd.genozip --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies
path-to-genozip-file.genozip
=> Send stow request to stowRS Receiver for specified Genozip compressed
genomic file. Additionally content type of the
file returned by system will be ignored and instead specified content type
shall be considered in multipart request.
-
Example: stowrs --contentType application/prs.vcfbzip2 --url
http[s]://<host>:<port>/dcm4chee-arc/aets/{AETitle}/rs/studies
path-to-vcf-bzip2-file.vcfbz2
=> Send stow request to stowRS Receiver for specified Bzip2 compressed
genomic data VCF file. Additionally content type of the
file returned by system will be ignored and instead specified content type
shall be considered in multipart request.