wado
Retrieves a study, a series or one instance from a DICOMweb service
(WADO-RS, PS3.18 10.4) and writes each instance to a directory as
<SOP Instance UID>.dcm; or prints the metadata as DICOM JSON.
When to use it
Use wado to download from a DICOMweb server, the HTTP counterpart of
getscu and movescu: one HTTPS connection out,
no AE titles, and a token or Basic credentials if the server wants them.
Find the UIDs first with qido.
It retrieves DICOM instances and metadata only; it does not ask for
rendered images or thumbnails (make a picture locally with
convert). dcmtk has no DICOMweb tools; in Python,
dicomweb-client's retrieve_study does the same job.
Examples
Download a study
go-dicom wado -study 1.3.6.1.4.1.5962.1.2.1.20040119072730.12322 https://pacs.example.org/dicom-web study/ study/1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322.dcm
Retrieved 1 instance(s) to study/Each instance is written as the server sent it.
One series, or one instance
go-dicom wado -study 1.3.6.1.4.1.5962.1.2.4.20040826185059.5457 -series 1.3.6.1.4.1.5962.1.3.4.1.20040826185059.5457 https://pacs.example.org/dicom-web series/ series/1.3.6.1.4.1.5962.1.1.4.1.1.20040826185059.5457.dcm
Retrieved 1 instance(s) to series/-instance narrows to one instance of -series.
In a transfer syntax you choose
go-dicom wado -study 1.3.6.1.4.1.5962.1.2.1.20040119072730.12322 -transfer-syntax 1.2.840.10008.1.2.4.80 https://pacs.example.org/dicom-web jls/
go-dicom show jls/1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322.dcm::TransferSyntaxUID jls/1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322.dcm
Retrieved 1 instance(s) to jls/
0002,0010 UI 22 1.2.840.10008.1.2.4.80Without -transfer-syntax each instance comes as it is stored. A server
that cannot give the syntax asked for refuses the request:
answered 406 Not Acceptable: the instance is held in transfer syntax 1.2.840.10008.1.2.1 and cannot be sent in 1.2.840.10008.1.2.4.100: this server does not encode it.
Only the metadata
go-dicom wado -study 1.3.6.1.4.1.5962.1.2.1.20040119072730.12322 -metadata https://pacs.example.org/dicom-web > study.json[
{
"00080005": {
"Value": [
"ISO_IR 192"
],
"vr": "CS"
},
…The metadata is every instance's attributes as DICOM JSON, without the pixel data. create turns it back into files, but those files hold no pixels: download the instances for those.
A study that is not there
go-dicom wado -study 1.2.3 https://pacs.example.org/dicom-web none/Error: wado: after 0 instance(s): dicomweb: https://pacs.example.org/dicom-web/studies/1.2.3 answered 404 Not Found: the archive holds no such instancesNotes
-studyis required. Exit status is 0 when everything asked for was written, 1 on any HTTP or write error; the error says how many instances were written before it.- An instance already in the output directory is written over.
- Authentication and TLS options are those of qido: set
DICOMWEB_TOKENrather than-token, which shows in the process list. -timeoutis in seconds; by default there is no limit.- See CONFORMANCE.md, DICOMweb.
See also
Options
Retrieve a study, series or instance from a DICOMweb service (WADO-RS)
USAGE:
go-dicom wado [options] -study <uid> <url> <output-dir>
go-dicom wado [options] -study <uid> -metadata <url>
Each instance is written to <output-dir> as <SOP Instance UID>.dcm, as the
server sent it.
OPTIONS:
-study <uid> The study to retrieve (required)
-series <uid> Only this series of the study
-instance <uid> Only this instance of -series
-metadata Print the metadata as DICOM JSON, without the pixel
data, instead of downloading
-transfer-syntax <uid>
Ask for the instances in this transfer syntax
(default: each as it is stored)
-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 wado -study 1.2.840.1 https://pacs.example.org/dicom-web study/
go-dicom wado -study 1.2.840.1 -series 1.2.840.2 <url> series/
go-dicom wado -study 1.2.840.1 -metadata <url> > study.json