CLI reference¶
dcmclient exposes 55 agent-facing tools over one declarative ToolSpec registry — the same registry that backs the manifest self-description and the live mcp server. This page is generated straight from that manifest, so it cannot drift from the binary.
Conventions¶
stdout = machine output, stderr = human diagnostics. Status tools (the dcmnet SCUs/SCPs + dcmprobe/dcmconv/json2dcm/xml2dcm) accept --json for a {tool,ok,exit_code,error,result} envelope; document tools (dcmdump/dcm2json/dcm2xml/dsrdump/dsr2html/dcmvalidate) write their structured artifact straight to stdout. Network tools also surface the DICOM response status in result.
Exit codes¶
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | runtime error — unreadable / invalid input, or a per-file / per-operation failure |
| 104 | CLI argument conversion error (bad numeric or enum value) |
| 105 | CLI validation error (rejected value, or mutually-exclusive options) |
| 106 | required option or argument missing |
Network — DICOMweb & DIMSE¶
delete¶
DICOMweb DELETE a study / series / instance (PS3.18 §10.6)
network · module dicomweb
| Option | Type | Description |
|---|---|---|
-s / --server |
string | Server origin, e.g. http://localhost:8042 (or use --profile) |
--base-path |
string | DICOMweb base path under the origin |
--auth |
string | Authorization header value (e.g. 'Bearer ey…' or 'Basic …') |
--profile |
string | Fill --server/--base-path/--auth from a saved dcmclient config profile |
--level |
string | Delete level: study | series | instance |
--study |
string | StudyInstanceUID (required) |
--series |
string | SeriesInstanceUID (series/instance level) |
--instance |
string | SOPInstanceUID (instance level) |
--yes |
bool | Confirm the irreversible delete (required) |
--aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
$ dcmclient delete --server http://localhost:8042 --study 1.2.3 --yes
$ dcmclient delete --profile pacs --study 1.2.3 --series 1.2.4 --instance 1.2.5 --yes
echoscu¶
DIMSE Verification SCU — one association, N C-ECHO round-trips
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--repeat |
uint | Number of C-ECHO round-trips on the single association |
--json |
bool | Emit a single {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Per-echo trace to stderr |
findscu¶
DIMSE Q/R FIND SCU — query a remote SCP for matching studies / series / instances
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
-P / --patient |
bool | Patient Root information model (PS3.4 §C.6.1) |
-S / --study |
bool | Study Root information model (PS3.4 §C.6.2 — default) |
-O / --psonly |
bool | Patient/Study Only information model (PS3.4 §C.6.3) |
-W / --worklist |
bool | Modality Worklist information model (PS3.4 §K.6) — requires --query-file (the MWL identifier needs a Scheduled Procedure Step Sequence) |
-k / --key |
string[] | Matching / returning key. Forms: 'PatientName=DOE^', '0010,0010=DOE^', or 'PatientID' (returning key, empty value). |
--query-file |
string | DICOM JSON Model file supplying the C-FIND identifier verbatim (replaces -k). Required for -W (MWL); also for any query needing sequences. |
--cancel |
uint | Send C-CANCEL after N pending responses |
--json |
bool | Emit one NormalizedStudy JSON object per pending response (study-root flows) |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Per-step protocol trace to stderr |
$ dcmclient findscu PACS 4242 --aec PACS -S -k PatientName=DOE^*
$ dcmclient findscu 127.0.0.1 11112 -k StudyInstanceUID -k PatientID --json
forward¶
Relay studies between two DICOMweb servers (WADO-RS pull → STOW-RS push)
network · module dicomweb
| Option | Type | Description |
|---|---|---|
--source |
string | Source server origin (or --source-profile) |
--source-base-path |
string | Source DICOMweb base path |
--source-auth |
string | Source Authorization header value |
--source-profile |
string | Fill --source/-base-path/-auth from a saved profile |
--dest |
string | Destination server origin (or --dest-profile) |
--dest-base-path |
string | Destination DICOMweb base path |
--dest-auth |
string | Destination Authorization header value |
--dest-profile |
string | Fill --dest/-base-path/-auth from a saved profile |
--dest-bound-study |
string | Bind the destination STOW POST to this StudyInstanceUID |
--study |
string, required | StudyInstanceUID to relay |
--series |
string | SeriesInstanceUID (empty → whole study) |
--instance |
string | SOPInstanceUID (empty → whole series/study) |
--concurrency |
uint | Parallel series-level pull+push workers at study scope |
-v / --verbose |
bool | Per-instance progress to stderr |
--source-aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--source-aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--source-aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--source-aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--source-aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--dest-aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--dest-aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--dest-aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--dest-aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--dest-aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--source-oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--source-oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--source-oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--source-oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--source-oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--source-oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--source-oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--source-oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--source-oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--source-oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
--dest-oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--dest-oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--dest-oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--dest-oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--dest-oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--dest-oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--dest-oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--dest-oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--dest-oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--dest-oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
$ dcmclient forward --source http://a:8042 --dest http://b:8042 --study 1.2.3
$ dcmclient forward --source-profile src --dest-profile dst --series 1.2.3.4
getscu¶
DIMSE Q/R GET SCU — retrieve matching instances over a single association
writes files · network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
-P / --patient |
bool | Patient Root information model |
-S / --study |
bool | Study Root information model (default) |
-O / --psonly |
bool | Patient/Study Only information model |
-k / --key |
string[] | Matching key. Same syntax as find-scu's -k. |
--cancel |
uint | Send C-CANCEL after N pending C-GET responses |
--out-dir (-od) |
string | Directory to write received instances into. Default '.' |
--json |
bool | Emit a {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Per-step + per-instance progress to stderr |
$ dcmclient getscu PACS 4242 --aec PACS -S -k StudyInstanceUID=1.2.3 --out-dir out/
$ dcmclient getscu 127.0.0.1 11112 -k PatientID=12345 --out-dir study/
ian-scu¶
DIMSE Instance Availability Notification SCU — announce available instances to a peer (N-CREATE, PS3.4 §R)
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--dataset-file |
string | DICOM JSON Model file: the Attribute List (Referenced Series Sequence with per-instance availability + retrieve AE) |
--instance |
string | Propose the IAN SOP Instance UID (empty → the SCP assigns one) |
--json |
bool | Emit a single {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Verbose diagnostics to stderr |
$ dcmclient ian-scu PACS 11112 --dataset-file ian.json
$ dcmclient ian-scu 127.0.0.1 11112 --dataset-file ian.json --json
listen¶
DIMSE SCP receiver — accept C-STORE associations and forward each instance to a DICOMweb sink
writes files · network · module dcmnet
| Option | Type | Description |
|---|---|---|
-p / --port |
uint | Local TCP port to bind |
--ae-title |
string | Local AE Title |
--bind |
string | Bind address. Default any (0.0.0.0); use 127.0.0.1 for loopback-only |
--sink |
string | DICOMweb sink origin to forward to, e.g. http://localhost:8042 (or use --sink-profile) |
--sink-profile |
string | Use a saved profile for the sink |
--sink-base-path |
string | Sink DICOMweb base path. Default /dicom-web |
--sink-auth |
string | Sink Authorization header value |
--max-pdu (-pdu) |
uint | Maximum receive PDU size advertised in A-ASSOCIATE-AC (0 = unlimited) |
--max-assocs |
uint | Cap on concurrent associations; new SCUs over the cap get A-ASSOCIATE-RJ (0 = unlimited) |
--idle-timeout |
string | Per-connection idle timeout in SECONDS (fractional allowed) — peer is A-ABORTed if silent this long (0 = no bound) |
--prefer-uncompr |
bool | Reject any encapsulated transfer syntax — accept only EVR-LE / IVR-LE (a stricter default; ours accepts encapsulated) |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. Required for everything else --tls-* to take effect. |
--tls-ca-cert |
string | PEM bundle inbound client certs are verified against (enables mTLS). Optional. |
--tls-cert |
string | Our server certificate (PEM). Required when --tls is on. |
--tls-key |
string | Our server private key (PEM). Required when --tls is on. |
--tls-no-require-client-cert |
bool | When --tls-ca-cert is set, allow anonymous clients (cert verified IF presented, but not required). |
-v / --verbose |
bool | Per-association + per-instance progress to stderr |
$ dcmclient listen --port 11112 --ae-title DCMCLIENT --sink http://localhost:8042
$ dcmclient listen -p 104 --sink-profile pacs --sink-base-path /dicom-web
movescu¶
DIMSE Q/R MOVE SCU — ship matched instances to a third-party C-STORE destination AET
writes files · network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--aem / --move-dest (-aem) |
string, required | Move destination AE Title (REQUIRED). The SCP must have this AET registered as a known modality so it can open a C-STORE association. |
-P / --patient |
bool | Patient Root information model |
-S / --study |
bool | Study Root information model (default) |
-O / --psonly |
bool | Patient/Study Only information model |
-k / --key |
string[] | Matching key. Same syntax as find-scu's -k. |
--cancel |
uint | Send C-CANCEL after N pending responses |
--json |
bool | Emit a {tool,ok,exit_code,result} status object (sub-op counters) on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Per-step + sub-operation counter progress to stderr |
$ dcmclient movescu PACS 4242 --aec PACS --move-dest STORESCP -S -k StudyInstanceUID=1.2.3
$ dcmclient movescu 127.0.0.1 11112 --aem DESTAE -k PatientID=12345 --json
mpps-scu¶
DIMSE Modality Performed Procedure Step (MPPS) SCU — start (N-CREATE) / update (N-SET) a procedure step (PS3.4 §F)
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--action |
string | MPPS operation: create (N-CREATE, status IN PROGRESS) | set (N-SET) |
--instance |
string | MPPS SOP Instance UID — required for set; optional for create (proposes the UID) |
--dataset-file |
string | DICOM JSON Model file: the Attribute List (create) or Modification List (set) |
--json |
bool | Emit a single {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Verbose diagnostics to stderr |
$ dcmclient mpps-scu PACS 11112 --action create --dataset-file step.json
$ dcmclient mpps-scu 127.0.0.1 11112 --action set --instance 1.2.3 --dataset-file complete.json
printscu¶
DIMSE Print Management SCU — print an image to a hardcopy / virtual printer (Film Session/Box/Image Box, PS3.4 §H)
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--dicom-file |
string | DICOM instance to print (rendered to an 8-bit film tile) |
--frame |
uint | 1-based frame to print (multi-frame instances; default 1) |
--max-dim |
uint | Aspect-preserving downscale so the largest dimension fits N px (0 = native resolution) |
--grayscale |
bool | Print a colour source as grayscale (luma) instead of colour |
--json |
bool | Emit a single {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Verbose diagnostics to stderr |
$ dcmclient printscu PRINTER 104 --dicom-file chest.dcm
$ dcmclient printscu 127.0.0.1 11112 --dicom-file ct.dcm --frame 3 --max-dim 2048 --json
qido¶
QIDO-RS study / series / instance search (PS3.18 §10.6)
network · module dicomweb
| Option | Type | Description |
|---|---|---|
-s / --server |
string | Server origin, e.g. http://localhost:8042 (or use --profile) |
--base-path |
string | DICOMweb base path under the origin |
--auth |
string | Authorization header value (e.g. 'Bearer ey…' or 'Basic …') |
--profile |
string | Fill --server/--base-path/--auth from a saved dcmclient config profile |
--patient-name |
string | QIDO PatientName match (wildcards *,?) |
--patient-id |
string | QIDO PatientID match |
--study |
string | StudyInstanceUID (match, or path binding for series/instance) |
--series |
string | SeriesInstanceUID (match, or path binding for instance level) |
--modality |
string | Modality match, e.g. CT / MR / US |
--date-range |
string | StudyDate: 2025-01-01..2025-12-31, half-open .. forms, or a single date |
--sort |
string[] | PS3.18 §10.6.1.5 sort term(s), '-' prefix = descending (e.g. -StudyDate) |
--include |
string[] | Extra includefield(s): keyword or 8-hex tag |
--level |
string | Query level: study | series | instance |
--limit |
uint | Max results to return |
--offset |
uint | Result offset for paging |
--json |
bool | Emit one NormalizedStudy JSON record per match (else human table) |
--aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
$ dcmclient qido --server http://localhost:8042 --patient-name 'DOE^*' --json
$ dcmclient qido --profile pacs --modality CT --date-range 2025-01-01.. --limit 20
stgcmt-scu¶
DIMSE Storage Commitment Push Model SCU — request commitment (N-ACTION) for stored instances (PS3.4 §J)
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--dataset-file |
string | DICOM JSON Model file carrying the (0008,1199) Referenced SOP Sequence of instances to commit (do NOT include (0008,1195) — use --transaction-uid) |
--transaction-uid |
string | (0008,1195) Transaction UID (PS3.4 §J Type 1) — correlates the later N-EVENT-REPORT result; required |
--json |
bool | Emit a single {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Verbose diagnostics to stderr |
$ dcmclient stgcmt-scu PACS 11112 --dataset-file commit.json
$ dcmclient stgcmt-scu 127.0.0.1 11112 --dataset-file commit.json --json
storescp¶
DIMSE Storage SCP — accept C-STORE associations and write each instance to disk
writes files · network · module dcmnet
| Option | Type | Description |
|---|---|---|
port |
uint | Local TCP port to bind |
--aet (-aet) |
string | Local AE Title |
--bind |
string | Bind address. Default any (0.0.0.0); use 127.0.0.1 for loopback-only |
--out-dir (-od) |
string | Directory to write received instances into. Default '.' |
--max-pdu (-pdu) |
uint | Maximum receive PDU size advertised in A-ASSOCIATE-AC (0 = unlimited) |
--max-assocs |
uint | Cap on concurrent associations; new SCUs over the cap get A-ASSOCIATE-RJ (0 = unlimited) |
--idle-timeout |
string | Per-connection idle timeout in SECONDS (fractional allowed) — peer is A-ABORTed if silent this long (0 = no bound) |
--sort-by-study |
bool | Group received instances under |
--unique-filenames |
bool | On collision, append _NNN before .dcm instead of overwriting |
--prefer-uncompr |
bool | Reject any encapsulated transfer syntax — accept only EVR-LE / IVR-LE (a stricter default; ours accepts encapsulated) |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. Required for everything else --tls-* to take effect. |
--tls-ca-cert |
string | PEM bundle inbound client certs are verified against (enables mTLS). Optional. |
--tls-cert |
string | Our server certificate (PEM). Required when --tls is on. |
--tls-key |
string | Our server private key (PEM). Required when --tls is on. |
--tls-no-require-client-cert |
bool | When --tls-ca-cert is set, allow anonymous clients (cert verified IF presented, but not required). |
-v / --verbose |
bool | Per-association + per-instance progress to stderr |
$ dcmclient storescp 11112 --aet STORESCP --out-dir incoming/
$ dcmclient storescp 104 --bind 127.0.0.1 --sort-by-study --unique-filenames
storescu¶
DIMSE Storage SCU — send one or more .dcm files to a remote SCP over a single association
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
files |
string[], required | One or more Part-10 DICOM files OR directories (directories are recursed by default; see --no-recurse) |
--no-recurse |
bool | When a positional names a directory, take only its top-level entries instead of descending (default: recurse) |
--propose-little (-xe) |
bool | Propose Explicit VR Little Endian |
--propose-implicit (-xi) |
bool | Propose Implicit VR Little Endian |
--propose-deflated (-xd) |
bool | Propose Deflated Explicit VR Little Endian |
--propose-rle (-xr) |
bool | Propose RLE Lossless |
--propose-lossless (-xs) |
bool | Propose JPEG Lossless (process 14, SV1) |
--propose-jpeg8 (-xy) |
bool | Propose JPEG Baseline (process 1) |
--propose-jpeg12 (-xx) |
bool | Propose JPEG Extended (process 2 & 4) |
--propose-j2k-lossless (-xv) |
bool | Propose JPEG 2000 Lossless Only |
--propose-j2k-lossy (-xw) |
bool | Propose JPEG 2000 |
--propose-jls-lossless (-xt) |
bool | Propose JPEG-LS Lossless |
--propose-jls-lossy (-xu) |
bool | Propose JPEG-LS Lossy (near-lossless) |
--propose-htj2k |
bool | Propose High-Throughput JPEG 2000 Lossless Only |
--json |
bool | Emit a {tool,ok,exit_code,result} status object (with per-file results) on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Per-file progress to stderr |
$ dcmclient storescu PACS 4242 --aec PACS scan.dcm
$ dcmclient storescu 127.0.0.1 11112 study/ --propose-j2k-lossless
stow¶
STOW-RS upload one or more .dcm files
network · module dicomweb
| Option | Type | Description |
|---|---|---|
-s / --server |
string | Server origin, e.g. http://localhost:8042 (or use --profile) |
--base-path |
string | DICOMweb base path under the origin |
--auth |
string | Authorization header value (e.g. 'Bearer ey…' or 'Basic …') |
--profile |
string | Fill --server/--base-path/--auth from a saved dcmclient config profile |
--study |
string | Bind the STOW POST to this StudyInstanceUID (empty → POST /studies, unbound) |
files |
string[], required | One or more .dcm files to upload |
-v / --verbose |
bool | Per-file progress to stderr |
--aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
$ dcmclient stow --server http://localhost:8042 scan1.dcm scan2.dcm
$ dcmclient stow --profile pacs --study 1.2.3 study/*.dcm
termscu¶
DIMSE termination probe — open an association and immediately A-ABORT (or --release)
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--release |
bool | Tear down with A-RELEASE instead of A-ABORT |
--json |
bool | Emit a single {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Per-step trace to stderr |
ups¶
UPS-RS workitem worklist — create / search / claim / cancel / subscribe workitems (PS3.18 §11)
network · module dicomweb
| Option | Type | Description |
|---|---|---|
-s / --server |
string | Server origin, e.g. http://localhost:8042 (or use --profile) |
--base-path |
string | DICOMweb base path under the origin |
--auth |
string | Authorization header value (e.g. 'Bearer ey…' or 'Basic …') |
--profile |
string | Fill --server/--base-path/--auth from a saved dcmclient config profile |
--action |
string | UPS-RS verb: create | search | retrieve | update | change-state | request-cancel | subscribe | unsubscribe |
--workitem |
string | Workitem SOP Instance UID |
--state |
string | change-state: SCHEDULED | IN PROGRESS | COMPLETED | CANCELED |
--transaction-uid |
string | Transaction UID (update / change-state) |
--dataset-file |
string | DICOM JSON Model file: the workitem (create), changes (update), or cancellation reason (request-cancel) |
--ae-title |
string | Subscriber AE Title (subscribe / unsubscribe) |
--match |
string[] | search match key: tag=value or keyword=value |
--include |
string[] | search includefield(s): keyword or 8-hex tag |
--limit |
int | search: max results to return |
--offset |
int | search: result offset for paging |
--aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
$ dcmclient ups --action search --server http://localhost:8042 --json
$ dcmclient ups --action change-state --workitem 1.2.3 --state "IN PROGRESS" --transaction-uid 1.2.9 --server http://localhost:8042
upsscu¶
DIMSE Unified Procedure Step (UPS) SCU — push / pull / claim / update / cancel / subscribe workitems (PS3.4 §CC)
network · module dcmnet
| Option | Type | Description |
|---|---|---|
peer |
string, required | Peer SCP host (IP / DNS name) |
port |
uint, required | Peer SCP TCP port |
--aet (-aet) |
string | Calling AE Title (us) |
--aec (-aec) |
string | Called AE Title (peer) |
--max-pdu (-pdu) |
uint | Maximum receive PDU size |
--connect-timeout (-to, --timeout, -ta, --acse-timeout) |
string | Association-establishment timeout in SECONDS — TCP connect + ACSE handshake (fractional allowed; default 30). The aliases --timeout/-to and --acse-timeout/-ta also set it: this async stack uses one establishment timeout covering both connect and ACSE |
--dimse-timeout (-td) |
string | Per-operation DIMSE response timeout in SECONDS (fractional; 0 = no bound) — abort if the peer stays silent this long waiting for a response (for C-FIND/C-GET it bounds the gap between results, so a long healthy query isn't cut off). Alias: -td |
--action |
string | UPS operation: push | get | set | change-state | request-cancel | subscribe | unsubscribe |
--workitem |
string | Target workitem SOP Instance UID (get / set / change-state / request-cancel) |
--state |
string | change-state: target Procedure Step State (SCHEDULED | IN PROGRESS | COMPLETED | CANCELED) |
--transaction-uid |
string | Transaction UID claimed with (change-state / set) |
--dataset-file |
string | DICOM JSON Model file: the workitem (push), modification list (set), or cancellation reason (request-cancel) |
--receiving-ae |
string | subscribe / unsubscribe: Receiving AE Title (default: the calling AET) |
--target |
string | subscribe / unsubscribe: target instance UID (default: the global subscription instance) |
--json |
bool | Emit a single {tool,ok,exit_code,result} status object on stdout |
--tls / --enable-tls |
bool | Wrap the DIMSE association in TLS 1.2+. |
--tls-ca-cert |
string | PEM bundle the peer's certificate is verified against (default: system trust store). |
--tls-cert |
string | Our client certificate (PEM) — enables mTLS. Pair with --tls-key. |
--tls-key |
string | Our client private key (PEM) — pair with --tls-cert. |
--tls-insecure |
bool | Skip server certificate verification. Dev/self-signed only. |
--tls-server-name |
string | SNI server name (default: peer host). Used for cert hostname match. |
-v / --verbose |
bool | Verbose diagnostics to stderr |
$ dcmclient upsscu PACS 11112 --action push --dataset-file workitem.json
$ dcmclient upsscu 127.0.0.1 11112 --action change-state --workitem 1.2.3 --state "IN PROGRESS" --transaction-uid 1.2.9
$ dcmclient upsscu 127.0.0.1 11112 --action subscribe --json
wado¶
WADO-RS bulk retrieve (study / series / instance)
writes files · network · module dicomweb
| Option | Type | Description |
|---|---|---|
-s / --server |
string | Server origin, e.g. http://localhost:8042 (or use --profile) |
--base-path |
string | DICOMweb base path under the origin |
--auth |
string | Authorization header value (e.g. 'Bearer ey…' or 'Basic …') |
--profile |
string | Fill --server/--base-path/--auth from a saved dcmclient config profile |
--study |
string, required | StudyInstanceUID to retrieve |
--series |
string | SeriesInstanceUID (empty → whole study) |
--instance |
string | SOPInstanceUID (empty → whole series/study) |
-o / --out |
string | Output directory for retrieved instances |
--concurrency |
uint | Parallel fetch width at study level (1 = single GET) |
-v / --verbose |
bool | Per-instance progress to stderr |
--aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
$ dcmclient wado --server http://localhost:8042 --study 1.2.3 -o out/
$ dcmclient wado --profile pacs --series 1.2.3.4 --concurrency 16 -o out/
wado-uri¶
WADO-URI single-object retrieve (PS3.18 §9; legacy PACS shim)
writes files · network · module dicomweb
| Option | Type | Description |
|---|---|---|
-s / --server |
string | Server origin, e.g. http://localhost:8042 (or use --profile) |
--base-path |
string | WADO-URI endpoint path under the origin |
--auth |
string | Authorization header value (e.g. 'Bearer ey…' or 'Basic …') |
--profile |
string | Fill --server/--base-path/--auth from a saved dcmclient config profile |
--study |
string, required | StudyInstanceUID |
--series |
string, required | SeriesInstanceUID |
--instance |
string, required | SOPInstanceUID (objectUID) |
--content-type |
string | Requested representation: application/dicom (default) or an image MIME (image/jpeg, …) |
--transfer-syntax |
string | TransferSyntax UID to negotiate (optional) |
--frame |
uint | 1-based frame number for a multi-frame object (rendered) |
--rows |
uint | Rendered-image height in pixels (image content types) |
--columns |
uint | Rendered-image width in pixels (image content types) |
--image-quality |
uint | Rendered JPEG quality 1-100 (image content types) |
--anonymize |
bool | Ask the server to return a de-identified object |
-o / --out |
string | Output file (default: |
-v / --verbose |
bool | Request URL to stderr |
--aws-region |
string | AWS region (or $AWS_REGION). Required to enable SigV4 |
--aws-access-key |
string | AWS access key (or $AWS_ACCESS_KEY_ID) |
--aws-secret-key |
string | AWS secret key (or $AWS_SECRET_ACCESS_KEY) |
--aws-session-token |
string | STS session token (or $AWS_SESSION_TOKEN). Optional |
--aws-service |
string | AWS service for SigV4 scope (default medical-imaging) |
--oauth2-token-url |
string | OAuth2 token endpoint URL (or $DCMCLIENT_OAUTH2_TOKEN_URL) |
--oauth2-auth-url |
string | OAuth2 authorization endpoint URL — loopback flow (or $DCMCLIENT_OAUTH2_AUTH_URL) |
--oauth2-device-url |
string | OAuth2 device authorization endpoint URL — device flow (or $DCMCLIENT_OAUTH2_DEVICE_URL) |
--oauth2-client-id |
string | OAuth2 client_id (or $DCMCLIENT_OAUTH2_CLIENT_ID) |
--oauth2-client-secret |
string | OAuth2 client_secret (or $DCMCLIENT_OAUTH2_CLIENT_SECRET) |
--oauth2-scope |
string | OAuth2 scope string (or $DCMCLIENT_OAUTH2_SCOPE) |
--oauth2-refresh-token |
string | Bootstrap refresh_token (or $DCMCLIENT_OAUTH2_REFRESH_TOKEN) |
--oauth2-flow |
string | Flow override: client_credentials | refresh | loopback | device (default: auto) |
--oauth2-loopback-port |
uint | Fixed 127.0.0.1 redirect port for the loopback flow (default 0 = OS-assigned) |
--oauth2-no-cache |
bool | Don't read or write the on-disk token cache |
$ dcmclient wado-uri -s http://localhost:8042 --base-path /wado --study 1.2.3 --series 1.2.3.4 --instance 1.2.3.4.5 -o out.dcm
$ dcmclient wado-uri --profile pacs --study 1.2.3 --series 1.2.3.4 --instance 1.2.3.4.5 --content-type image/jpeg --columns 512 -o preview.jpg
Inspect¶
dcm2content¶
Extract the semantic content of a structured DICOM object — Segmentation, RT Structure Set, RT Plan (photon + ion), RT Dose, Presentation State, Waveform, or Ophthalmic Visual Field (static perimetry) — to JSON (auto-detected by SOP class, tagged by type). The interpreted counterpart to dcm2json's raw model
read-only · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | A structured DICOM object (Segmentation / RTSTRUCT / RTPLAN / RTDOSE / Presentation State / Waveform / Ophthalmic Visual Field) |
--contours |
bool | RT Structure Set only: include each contour's full xyz point list (off by default — point clouds are bulky) |
--control-points |
bool | RT Plan only: include every control point (angles, meterset, leaf/jaw positions) instead of the first-control-point summary (off by default — IMRT/VMAT plans carry hundreds of control points) |
$ dcmclient dcm2content organ-seg.dcm
$ dcmclient dcm2content --contours plan-rtstruct.dcm
$ dcmclient dcm2content rtplan.dcm
$ dcmclient dcm2content --control-points vmat-rtplan.dcm
$ dcmclient dcm2content rtdose.dcm
$ dcmclient dcm2content ecg.dcm
dcm2json¶
Convert a Part-10 DICOM file to DICOM JSON Model (PS3.18 §F)
read-only · module dcmdata
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more Part-10 input files |
-o / --output |
string | Write JSON to this file instead of stdout (concatenated when multiple inputs) |
--out-dir |
string | With multiple inputs, write |
--charset / --charset-assume (+Cd) |
string | Override SpecificCharacterSet for transcoding (same wire form as (0008,0005): 'ISO_IR 100', 'GB18030', or VM=2 '\ISO 2022 IR 87'). Wins over the file's own (0008,0005) |
-v / --verbose |
bool | Per-file progress to stderr |
dcm2xml¶
Convert a Part-10 DICOM file to Native DICOM Model XML (PS3.19)
read-only · module dcmdata
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more Part-10 input files |
-o / --output |
string | Write XML to this file instead of stdout (concatenated when multiple inputs) |
--out-dir |
string | With multiple inputs, write |
--charset / --charset-assume |
string | Override SpecificCharacterSet for transcoding (same wire form as (0008,0005): 'ISO_IR 100', 'GB18030', or VM=2 '\ISO 2022 IR 87' for ISO-2022 escapes). Wins over the file's own (0008,0005) |
-v / --verbose |
bool | Per-file progress to stderr |
dcmdump¶
Dump a Part-10 DICOM file as a one-element-per-line listing
read-only · module dcmdata
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more file paths to dump |
-L / --print-long-tag (+L) |
bool | Do not truncate long values |
-M / --max-read-length (+M) |
uint | Truncate values longer than N bytes (default 64; ignored under -L) |
--charset / --charset-assume (+Cd) |
string | Override SpecificCharacterSet for transcoding; wins over (0008,0005), and kicks in when (0008,0005) is absent. Same wire form (0008,0005) carries: 'ISO_IR 100', 'GB18030', or VM=2 '\ISO 2022 IR 87' for ISO-2022 escapes |
--no-utf8 |
bool | Disable UTF-8 transcoding; dump raw element bytes (non-printable rendered as \xHH). We transcode by default, this opts out |
--names |
bool | Append the attribute keyword to each line, from the union public+private dictionary; private tags resolve by Private Creator |
-v / --verbose |
bool | Extra diagnostic lines on stderr |
dsr2html¶
Render a DICOM Structured Report to HTML
read-only · module dcmsr
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more Part-10 SR input files |
-o / --output |
string | Write HTML to this file instead of stdout (documents concatenated when multiple inputs) |
--out-dir |
string | With multiple inputs, write |
-v / --verbose |
bool | Per-file progress to stderr |
dsrdump¶
Dump a DICOM Structured Report content tree as text
read-only · module dcmsr
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more Part-10 SR input files |
-o / --output |
string | Write the dump to this file instead of stdout (concatenated when multiple inputs) |
--out-dir |
string | With multiple inputs, write |
-v / --verbose |
bool | Per-file progress to stderr |
Convert & author¶
dcm2nii¶
Assemble a DICOM series into one NIfTI-1 volume (.nii/.nii.gz) with the correct voxel→world affine — the ML/neuro (FSL/ANTs/nibabel) on-ramp
writes files · module dcmvolume
| Option | Type | Description |
|---|---|---|
input |
string, required | DICOM series directory (or a single file) |
output |
string, required | Write the NIfTI here; a .nii.gz extension gzip-compresses |
--no-recurse |
bool | Only scan the top-level directory (default: descend into subdirectories) |
--dwi |
bool | Diffusion mode: group by b-value+gradient into a 4-D stack and also write FSL |
--gradient-order |
bool | --dwi: order volumes by gradient (b0 first, deterministic) instead of the default acquisition order (InstanceNumber) |
--bids |
bool | Also write a BIDS |
--json |
bool | Emit the dims/spacing/affine/series sidecar on stdout |
$ dcmclient dcm2nii ct_series_dir/ out.nii.gz
$ dcmclient dcm2nii --json mr_dir/ vol.nii
$ dcmclient dcm2nii --no-recurse series/ out.nii.gz
$ dcmclient dcm2nii --dwi dwi_series/ dwi.nii.gz # + dwi.bval / dwi.bvec
$ dcmclient dcm2nii --bids mr_dir/ sub-01_T1w.nii.gz # + sub-01_T1w.json
dcm2pdf¶
Extract the embedded document from an Encapsulated PDF/CDA/STL DICOM
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | Encapsulated PDF/CDA/STL DICOM file |
output |
string, required | Write the extracted document here |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
dcmconv¶
Convert a Part-10 DICOM file to a different Transfer Syntax
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | Input Part-10 file |
output |
string, required | Output Part-10 file |
--to / --write-xfer |
string | Target Transfer Syntax: a UID (1.2.840.10008.1.2.4.90 …) or alias. Encode: j2k / j2k-lossy / jls / jls-lossy / htj2k / htj2k-lossy / jxl / jxl-lossy / jpeg (= jpeg-baseline) / jpeg-extended / jpeg-lossless / jpeg-lossless-sv1 / rle. Uncompressed: ivr-le / evr-le (source must be uncompressed VR-LE). Deflated: deflated (source must be uncompressed VR-LE). Optional only when --convert-to-utf8 is set. |
--convert-to-utf8 (+U8) |
bool | Reencode every PN / LO / SH / LT / ST / UT / UC value from the source (0008,0005) to UTF-8; (0008,0005) becomes 'ISO_IR 192'. Source must be uncompressed VR-LE. Combinable with --to — UTF-8 reencode runs first, then transcode. |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result = {input,output,source_ts,target_ts,bytes}) |
-v / --verbose |
bool | Per-file source-TS / output-size progress to stderr |
$ dcmclient dcmconv --to j2k input.dcm output.dcm
$ dcmclient dcmconv --convert-to-utf8 input.dcm output.dcm
dcmdecap¶
Extract the payload of an Encapsulated Document instance (PDF / CDA / STL / OBJ / MTL) — one tool for every payload type
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | Encapsulated Document DICOM instance |
output |
string, required | Write the payload here |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient dcmdecap report.dcm report.pdf
$ dcmclient dcmdecap implant.dcm implant.stl
$ dcmclient dcmdecap --json doc.dcm payload.bin
dcmencap¶
Wrap a document (PDF / CDA / STL / OBJ / MTL) into its Encapsulated Document Storage DICOM instance — one tool for every payload type
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | Document to encapsulate (pdf / xml|cda / stl / obj / mtl) |
output |
string, required | Write the DICOM instance here |
--type |
string | Document type: auto (default; file extension then content magic), pdf, cda, stl, obj, mtl |
--title |
string | DocumentTitle (0042,0010); defaults to the input file stem |
--mime |
string | Override MIMETypeOfEncapsulatedDocument (0042,0012) |
--units |
string | 3D model types only: UCUM Measurement Units code value (default um) |
--series-from |
string | Reference DICOM — inherit patient + study (the document joins that study) |
--patient-name |
string | PatientName (0010,0010) — overrides the reference / sets it when none |
--patient-id |
string | PatientID (0010,0020) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient dcmencap report.pdf report.dcm
$ dcmclient dcmencap implant.stl implant.dcm --series-from ct.dcm
$ dcmclient dcmencap summary.xml out.dcm --type cda
$ dcmclient dcmencap mesh.obj out.dcm --title "Resection guide"
dcmmkdir¶
Build a DICOMDIR-indexed file-set (PS3.10 Basic Directory) from a set of DICOM files; lays the instances out under the output directory with media-ready (ISO-9660) File IDs
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
inputs |
string[], required | Part-10 DICOM files and/or directories (directories are scanned recursively) |
--output |
string, required | Output media directory — each input is COPIED here under a flat File ID (IMG00001…) and the DICOMDIR is written alongside (a self-contained file-set; ~2x the source size) |
--fileset-id |
string | File-set ID (0004,1130), <=16 chars (default DCMCLIENT) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient dcmmkdir study/ --output /media/dicom
$ dcmclient dcmmkdir a.dcm b.dcm c.dcm --output out
$ dcmclient dcmmkdir series/ --output disc --fileset-id MYSTUDY
dsr2xml¶
Render a DICOM Structured Report's content tree as XML
writes files · module dcmsr
| Option | Type | Description |
|---|---|---|
input |
string, required | Structured Report DICOM file |
output |
string, required | Write the SR-tree XML here |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
dump2dcm¶
Rebuild a Part-10 DICOM file from a dcmdump text listing
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | dcmdump text listing ("-" reads stdin) |
output |
string, required | Write the rebuilt Part-10 DICOM here |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
img2dcm¶
Import a JPEG into a Secondary Capture DICOM, codestream stored verbatim
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | JPEG image (baseline or extended) |
output |
string, required | Write the DICOM instance here |
--series-from |
string | Reference DICOM — inherit patient + study (the image joins that study) |
--patient-name |
string | PatientName (0010,0010) — overrides the reference / sets it when none |
--patient-id |
string | PatientID (0010,0020) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
json2dcm¶
Convert a DICOM JSON Model object (PS3.18 §F) to a Part-10 DICOM file
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | Input DICOM JSON Model file (the inverse of dcm2json) |
output |
string, required | Output Part-10 file (Implicit VR LE) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result = {input,output,bytes}) |
-v / --verbose |
bool | Print the output path / size to stderr |
mkkos¶
Author a Key Object Selection (KOS) document from JSON instance references
writes files · module dcmsr
| Option | Type | Description |
|---|---|---|
input |
string, required | JSON references ("-" reads stdin) |
output |
string, required | Write the KOS DICOM here |
--series-from |
string | Reference DICOM — inherit patient + study (the KOS is filed under that study) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient mkkos keyimages.json kos.dcm --series-from study.dcm
$ echo '{"references":[...]}' | dcmclient mkkos - kos.dcm
mkreport¶
Author a Structured Report (TID 1500 Measurement Report) from JSON measurements
writes files · module dcmsr
| Option | Type | Description |
|---|---|---|
input |
string, required | JSON measurements ("-" reads stdin) |
output |
string, required | Write the SR DICOM here |
--series-from |
string | Reference DICOM — inherit patient + study (the report attaches to that study) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient mkreport findings.json report.dcm --series-from study.dcm
$ echo '{"measurements":[...]}' | dcmclient mkreport - report.dcm
pdf2dcm¶
Wrap a PDF into an Encapsulated PDF Storage DICOM instance
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | PDF file to encapsulate |
output |
string, required | Write the DICOM instance here |
--series-from |
string | Reference DICOM — inherit patient + study (the report joins that study) |
--title |
string | DocumentTitle (0042,0010); defaults to the PDF file stem |
--patient-name |
string | PatientName (0010,0010) — overrides the reference / sets it when none |
--patient-id |
string | PatientID (0010,0020) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient pdf2dcm report.pdf report.dcm
$ dcmclient pdf2dcm report.pdf out.dcm --series-from study.dcm
xml2dcm¶
Convert a Native DICOM Model document (PS3.19) to a Part-10 DICOM file
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | Input Native DICOM Model XML file (the inverse of dcm2xml) |
output |
string, required | Output Part-10 file (Implicit VR LE) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result = {input,output,bytes}) |
-v / --verbose |
bool | Print the output path / size to stderr |
xml2dsr¶
Rebuild a Structured Report from dsr2xml content-tree XML
writes files · module dcmsr
| Option | Type | Description |
|---|---|---|
input |
string, required | dsr2xml content-tree XML ("-" reads stdin) |
output |
string, required | Write the rebuilt SR DICOM here |
--series-from |
string | Reference DICOM — inherit patient + study (the SR header the XML omits) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient dsr2xml report.dcm t.xml && dcmclient xml2dsr t.xml out.dcm
$ dcmclient xml2dsr edited.xml out.dcm --series-from study.dcm
Extract, render & measure¶
dcm2img¶
Render a DICOM frame to an image file (PNM/PNG/JPEG/BMP display; PNM16/TIFF/PNG16/JPEG12/JPEG16/JP2/JPH/JLS/JXL full-depth)
writes files · module dcmimage
| Option | Type | Description |
|---|---|---|
input |
string, required | Input Part-10 DICOM file |
output |
string | Output image file (omit when using --data-uri) |
--data-uri |
bool | Emit the rendered image as a data: |
--format |
string | Display 8-bit (windowed): pnm/pgm/ppm | png | jpeg | bmp. Full native depth (8/12/16-bit lossless): pnm16 | tiff | png16 | jpeg12 | jpeg16 | jp2/j2k | jph | jls/jpls | jxl. Multi-frame animation/video: webp | gif (lossless 8-bit) | mp4/mov (h264, lossy 8-bit, full-res) | mkv (FFV1, LOSSLESS, native 8/16-bit — the only video that keeps full depth). Video-transfer-syntax input (MPEG-2/H.264/HEVC) decodes here too: stills/animation in 8-bit, full-depth formats in 16-bit (no precision loss, incl. 10-bit HEVC); dcm2mpg for a lossless copy. Empty ⇒ infer from the output extension |
--frame |
uint | 1-based frame index (default 1) |
--window |
string | Explicit window 'center,width' for the 8-bit display formats AND the animation/video (mp4/webp/gif — the cine equivalent of choosing one window for all frames); default is the file's VOI (per-frame → dataset → auto from min/max). Ignored for mkv (lossless keeps native) |
--quality |
int | JPEG quality 1..100 (display jpeg only; default 90) |
--scale |
uint | Cap the largest output dimension (nearest-neighbour, aspect preserved; 0 = native; downscale only). Display + animation/video; not mkv (lossless keeps native resolution) |
--fps |
string | Animation frame rate for webp/gif (0 = default 10 fps) |
--gsdf |
bool | Apply DICOM PS3.14 GSDF (Grayscale Standard Display Function) display calibration — remaps the windowed value so equal steps are equal perceived-contrast (JND) steps. Grayscale only; opt-in (best-effort device-reported luminance, not photometer-certified). The non-linear remap is done in the float domain before 8-bit quantisation — a deterministic, reproducible LUT |
--gsdf-lmin |
string | GSDF display black level in cd/m² (default 0.5) |
--gsdf-lmax |
string | GSDF display white level in cd/m² (default 350) |
--gsdf-gamma |
string | GSDF panel native EOTF gamma (default 2.2 ≈ sRGB) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result = {input,output,format,frame,width,height,bytes}) |
-v / --verbose |
bool | Per-file progress to stderr |
$ dcmclient dcm2img scan.dcm out.png
$ dcmclient dcm2img scan.dcm out.jpeg --frame 3 --window 40,400
dcm2mpg¶
Export the embedded video from a DICOM (MPEG-2/H.264/HEVC transfer syntax) by stream copy — no re-encode, bit-exact
writes files · module dcmimage
| Option | Type | Description |
|---|---|---|
input |
string, required | Input Part-10 DICOM (video transfer syntax) |
output |
string, required | Output video file (.mp4) |
--raw |
bool | Write the raw elementary stream verbatim (no MP4 container) — the purest, most faithful dump (e.g. .m2v / .h264 / .h265) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result = {input,output,codec,container,bytes}) |
-v / --verbose |
bool | Progress to stderr |
dcm2raw¶
Decode DICOM pixels (any transfer syntax) to raw native integers (or HU/rescaled float) + a numpy shape/dtype + geometry sidecar
writes files · module dcmimage
| Option | Type | Description |
|---|---|---|
input |
string, required | DICOM image file (any transfer syntax) |
output |
string, required | Write the raw native pixel bytes here |
--frame |
int | Extract just frame N (1-based); default 0 = all frames concatenated |
--rescale |
bool | Emit the modality-LUT output — real-world values (HU for CT) as float32 — instead of stored integers (per-frame rescale applied for Enhanced multi-frame) |
--json |
bool | Emit the shape/dtype + geometry sidecar (rows/columns/frames/dtype/numpy_shape + rescale/spacing/orientation/position/uids) on stdout |
$ dcmclient dcm2raw --json scan.dcm pixels.raw
$ dcmclient dcm2raw --frame 1 ct-multiframe.dcm slice1.raw
$ dcmclient dcm2raw --rescale --json ct.dcm hu.raw
dcmicmp¶
Compare two DICOM images and report pixel-difference metrics (max |Δ|, mean |Δ|, RMSE, PSNR) over the NATIVE stored pixels. The QA gate for a lossy transcode: --min-psnr fails (exit 2) when the round-trip degraded below the given PSNR in dB
read-only · module dcmimage
| Option | Type | Description |
|---|---|---|
reference |
string, required | Reference (original) Part-10 image |
test |
string, required | Test image to compare against the reference |
--frame |
uint | 1-based frame index (default 1) |
--min-psnr |
string | Fail with exit code 2 if PSNR is below this many dB (0 = report only) |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient dcmicmp original.dcm compressed.dcm
$ dcmclient dcmicmp orig.dcm lossy.dcm --min-psnr 50 --json
$ dcmclient dcmicmp a.dcm b.dcm --frame 3
Edit¶
dcmodify¶
Insert / modify / erase DICOM attributes in place
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more Part-10 input files (edited in place unless --output) |
-i / --insert (-i) |
string[] | Insert or overwrite: 'tag=value' (e.g. '(0010,0010)=Doe^Jane'). Repeatable. New top-level tags need a dictionary VR (v0: overwrite of existing tags only) |
-m / --modify (-m) |
string[] | Modify only if present: 'tag=value'. Repeatable |
-e / --erase (-e) |
string[] | Erase a tag: 'tag' (e.g. '0010,0010'). Repeatable |
-o / --output |
string | Write the edited file here (single input only) instead of editing in place |
--regenerate-uids |
bool | Produce a NEW COPY with fresh, consistently-remapped UIDs (Study/Series/SOP + recursive cross-references) and the same -i/-m/-e edits — the local equivalent of the server's POST /modify. Source is preserved, so requires -o (single) or --out-dir (batch) |
--out-dir |
string | With --regenerate-uids: write copies into this directory (batch; one session → consistent UIDs). Never edits in place |
--uid-root |
string | With --regenerate-uids: OID root for remapped UIDs (default '2.25') |
-v / --verbose |
bool | Per-file progress to stderr |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result = {modified,total,ops}) |
$ dcmclient dcmodify --modify '(0010,0010)=Doe^Jane' scan.dcm
$ dcmclient dcmodify --erase '0010,0010' --output anon.dcm scan.dcm
$ dcmclient dcmodify --regenerate-uids -m '(0010,0010)=Doe^Jane' -o copy.dcm scan.dcm
dsign¶
Sign or verify a DICOM file's digital signatures (PS3.15): embed an X.509-certified MAC, or check each signature against its embedded cert
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
input |
string, required | DICOM file to sign (or verify) |
output |
string | Write the signed DICOM here (sign mode; omit when --verify) |
--verify |
bool | Verify every signature in the file (uses the embedded signer certificates; no --key/--cert/output needed) |
--key |
string | PEM private key to sign with (sign mode) |
--cert |
string | PEM X.509 certificate to embed as the signer (sign mode) |
--mac |
string | MAC algorithm (0400,0015), default SHA256 |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout |
$ dcmclient dsign in.dcm signed.dcm --key key.pem --cert cert.pem
$ dcmclient dsign in.dcm signed.dcm --key key.pem --cert cert.pem --mac SHA512
$ dcmclient dsign --verify signed.dcm
$ dcmclient dsign --verify signed.dcm --json
De-identify¶
dcmdeident¶
De-identify DICOM — PS3.15 Annex E Basic Profile
writes files · module dcmdata
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more Part-10 input files to de-identify |
-o / --output |
string | Write the de-identified file here (single input only) |
--out-dir |
string | Write de-identified copies into this directory (batch; one session → consistent UIDs). Never edits in place |
--patient-name |
string | Replacement Patient Name (default 'Anonymous') |
--patient-id |
string | Replacement Patient ID (default 'ANON0001') |
--uid-root |
string | OID root for remapped UIDs (default '2.25', the UUID-derived arc) |
--retain-dates |
bool | Retain Longitudinal Full Dates option (keep study/series dates+times) |
--retain-private |
bool | Keep private tags (default: all private attributes removed) |
--clean-descriptors |
bool | Clean Descriptors option (v0: empties free-text descriptors; not full content-aware cleaning) |
--retain-uids |
bool | Retain UIDs option (keep SOP/Study/Series and other K-column UIDs unmapped) |
--retain-device-id |
bool | Retain Device Identity option (keep device serial numbers, station names, ...) |
--retain-institution-id |
bool | Retain Institution Identity option (keep institution name/address/department) |
--retain-patient-chars |
bool | Retain Patient Characteristics option (keep age/sex/size/weight; clean-column cells emptied) |
--shift-dates |
int | Retain Modified Dates option: shift every date by this many days (consistent across the batch); ignored with --retain-dates |
--clean-graphics |
bool | Clean Graphics option (v0: empties graphic annotations) |
--clean-struct-content |
bool | Clean Structured Content option (v0: empties SR content-column attributes) |
--clean-pixel |
bool | Clean Pixel Data option (113101): black out burned-in annotation regions using the RSNA CTP device signature library. Re-emits uncompressed (never re-compresses); non-image instances pass through |
--replace |
string[] | Override a dummy (D) value: 'tag=value' or 'Keyword=value'. Repeatable |
--remove |
string[] | Erase an extra tag beyond the profile: 'tag' or 'Keyword'. Applied in both profiles. Repeatable |
--keep-phi |
bool | Modify mode (profile::none): keep all clinical attributes, still remap UIDs consistently and apply --replace/--remove, but emit no (0012,006x) de-identification stamps. Not a de-identification |
-v / --verbose |
bool | Per-file progress to stderr |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result = {deidentified,total}) |
$ dcmclient dcmdeident --output anon.dcm scan.dcm
$ dcmclient dcmdeident --out-dir anon/ --retain-dates study/*.dcm
Validate¶
dcmprobe¶
Test whether each input file is a valid Part-10 DICOM
read-only · module dcmdata
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more file paths to check |
--json |
bool | Emit one {tool,ok,exit_code,result} status object on stdout (result.files[] = per-file {path,valid,...}) instead of yes:/no: lines |
-v / --verbose |
bool | On a yes line, also print SOP class / instance UID and transfer syntax |
dcmvalidate¶
Validate DICOM conformance — VR / value-length / dictionary
read-only · module dcmdata
| Option | Type | Description |
|---|---|---|
files |
string[], required | One or more Part-10 input files to validate |
--json |
bool | Emit a structured findings document per file (agent-consumable) instead of human text |
--errors-only |
bool | Print only error-severity findings (suppress warnings / info) |
--quiet |
bool | Drop the per-file header / summary lines; print findings only |
Author¶
mkparamap¶
Author a DICOM Parametric Map (float pixels + Real World Value Mapping) from a float volume + a reference series
writes files · module dcmpmap
| Option | Type | Description |
|---|---|---|
ref |
string, required | Reference series (directory) or a single image — geometry + demographics |
--values |
string, required | Raw float32 volume: colsrowsnslices, slices ordered by ascending position |
--meta |
string | JSON Real World Value Mapping: slope / intercept / units / quantity / label / explanation (defaults to slope 1, intercept 0, unitless) |
-o / --output |
string, required | Output Parametric Map file |
--int |
int | Integer pixel storage: 8 or 16 bits (values quantized through the RWVM); default 0 = 32-bit float pixels |
--signed |
bool | Integer mode: signed pixel representation |
$ dcmclient mkparamap series/ --values adc.f32 --meta adc.json -o adc_map.dcm
$ dcmclient mkparamap ref.dcm --values t2.f32 --int 16 -o t2_map.dcm
mkseg¶
Author a DICOM Segmentation from a labelmap + a segment-terminology JSON (coded category / type / anatomy), geometry & demographics taken from the reference image
writes files · module dcmseg
| Option | Type | Description |
|---|---|---|
input |
string, required | Reference image: a single instance, OR a directory of the source series' single-frame instances (geometry + demographics + source refs) |
--mask |
string | Co-framed labelmap DICOM (pixel value k = the segment with labelID k; single-frame) |
--mask-raw |
string | OR a raw uint16 labelmap (rowscols[slices], row-major; for a series the slices are ordered by ascending position to match) |
--mask-nii |
string | OR a NIfTI-1 label volume (.nii/.nii.gz) co-framed with the reference series — the NIfTI/FSL → DICOM-SEG return path (Z auto-flipped to match; labels map via labelID) |
--meta |
string, required | segment-terminology JSON — per-segment label + coded category/type/anatomy |
-o / --output |
string, required | Write the Segmentation here |
--fractional |
string | Author a FRACTIONAL segmentation (probability/occupancy) instead of binary; --mask-raw is then uint8 [nsegnslicesrows*cols], segment-major |
--max-fractional |
int | Maximum Fractional Value (fractional only) |
$ dcmclient mkseg ct.dcm --mask labelmap.dcm --meta seg.json -o out-seg.dcm
$ dcmclient mkseg ct.dcm --mask-raw labelmap.u16 --meta seg.json -o out-seg.dcm
$ dcmclient mkseg ct-series-dir/ --mask-raw volume.u16 --meta seg.json -o out-seg.dcm
$ dcmclient mkseg ct-series-dir/ --mask-nii seg.nii.gz --meta seg.json -o out-seg.dcm
mksr¶
Author an arbitrary DICOM Structured Report (Comprehensive SR) from a JSON content tree — any value type (TEXT/CODE/NUM/CONTAINER/IMAGE/SCOORD…) and relationship. The general SR writer (mkreport is the TID 1500 preset)
writes files · module dcmsr
| Option | Type | Description |
|---|---|---|
input |
string, required | JSON content-tree document (patient/study/series + title + nested content[]) |
-o / --output |
string, required | Write the Structured Report here |
Compute¶
dcmradiomics¶
Extract IBSI radiomic features (first-order / GLCM / GLRLM / shape) from an image over an ROI (intensity threshold or co-framed mask) to JSON
read-only · module dcmimage
| Option | Type | Description |
|---|---|---|
input |
string, required | Grayscale image (CT / MR, any transfer syntax) |
--mask |
string | Co-framed mask DICOM (non-zero = inside the ROI; same dimensions + frame count) |
--roi-min |
string | Threshold-ROI lower bound in real-world values (e.g. HU); pair with --roi-max |
--roi-max |
string | Threshold-ROI upper bound; a voxel is inside when roi-min <= value <= roi-max |
--bins |
int | Texture quantization bins (typ. 32 or 64) |
--range-min |
string | Quantization range lower bound (default CT HU) |
--range-max |
string | Quantization range upper bound (default CT HU) |
--bin-width |
string | Fixed-bin-width discretization (e.g. 25); overrides --bins |
--resample |
string | Resample the ROI to isotropic voxels of this size in mm (trilinear image / nearest mask) |
--normalize |
bool | Z-score normalize intensities before discretization |
--normalize-scale |
string | Post-normalization scale |
--log-sigma |
string | Laplacian-of-Gaussian sigma in mm; repeat for several (adds log-sigma- |
--wavelet |
bool | Add coif1 stationary-wavelet features (8 sub-bands, wavelet- |
--merged |
bool | GLCM/GLRLM direction-merged (IBSI) instead of per-angle averaged |
--voxel-array-shift |
string | First-order Energy/TotalEnergy/RMS use (value + shift) |
--filter |
string[] | Intensity filter (repeatable): square / squareroot / logarithm / exponential / gradient |
$ dcmclient dcmradiomics ct.dcm --roi-min 0 --roi-max 200
$ dcmclient dcmradiomics ct.dcm --mask liver-seg.dcm
$ dcmclient dcmradiomics ct.dcm --mask roi.dcm --bins 64
Extract¶
dcm2waveform¶
Extract a DICOM Waveform's samples — physical-unit CSV (ECG / EEG / hemodynamic) or 16-bit PCM WAV (audio) + a channel/frequency sidecar
writes files · module dcmwaveform
| Option | Type | Description |
|---|---|---|
input |
string, required | DICOM Waveform file (ECG / EEG / hemodynamic / audio …) |
output |
string, required | Write the CSV (or WAV with --wav) here |
--group |
int | Multiplex group index to extract (0-based); default 0 |
--raw |
bool | Emit the stored integer samples instead of physical-unit values (skip the Channel Sensitivity / baseline correction) |
--wav |
bool | Decode the group to 16-bit PCM WAV (Audio SOP classes) instead of CSV |
--json |
bool | Emit the channel / frequency / annotation sidecar on stdout |