Skip to Content
go-dicom(3)
Command line

commitscu

Asks a peer, with Storage Commitment (N-ACTION), to take responsibility for instances you sent it, and with -wait receives the answer (N-EVENT-REPORT) on the same association: which instances are committed and which failed.

When to use it

Use commitscu after storescu, before deleting the local copies: a C-STORE success says the peer received an instance, a commitment says it keeps it. Modalities do this before they clear their disks.

It names instances by SOP Class UID and SOP Instance UID; it sends no files. It does not run a server, so it can receive the result only on its own association (-wait); a peer that reports on a second association it opens back needs an SCP that handles N-EVENT-REPORT at your AE title.

dcmtk has no stand-alone storage commitment tool; pynetdicom does it in a script with send_n_action.

Examples

Commit one instance and wait for the result

go-dicom commitscu -aec QRSCP -wait -instance 1.2.840.10008.5.1.4.1.1.2:1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322 pacs:11112
Requesting Association with pacs:11112 (AE: QRSCP)
Association accepted
N-ACTION accepted (status 0x0000), transaction 2.25.72476684535058411742724187949748159949
Requested commitment for 1 instance(s)

Result for transaction 2.25.72476684535058411742724187949748159949
  committed: 1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322

-instance is sopClassUID:sopInstanceUID, repeated for each instance. Read both from the files with go-dicom show file.dcm::SOPClassUID and ::SOPInstanceUID.

An instance the peer does not hold

go-dicom commitscu -aec QRSCP -wait -instance 1.2.840.10008.5.1.4.1.1.2:1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322 -instance 1.2.840.10008.5.1.4.1.1.4:1.2.3.4.5 -transaction 1.2.826.0.1.3680043.10.511.77 pacs:11112
…
Result for transaction 1.2.826.0.1.3680043.10.511.77
  committed: 1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322
  FAILED:    1.2.3.4.5 (reason 0x0112)
Error: 1 instance(s) were not committed

Exit status 1. The reason is a Failure Reason of PS3.3 C.14.1.1: 0112 no such object instance, 0119 class/instance conflict, 0110 processing failure. -transaction sets the Transaction UID; without it one is generated.

Request only

go-dicom commitscu -aec QRSCP -instance 1.2.840.10008.5.1.4.1.1.2:1.3.6.1.4.1.5962.1.1.1.1.1.20040119072730.12322 pacs:11112
…
N-ACTION accepted (status 0x0000), transaction 2.25.125638844098516347986487787840692619253
Requested commitment for 1 instance(s)
The result arrives as an N-EVENT-REPORT; use -wait to receive it here,
or run a server to receive it on a separate association.

Important

Without -wait, exit status 0 means only that the request was accepted, not that anything was committed.

Notes

  • Exit status: 0 when every instance was committed (or, without -wait, when the request was accepted); 1 when any failed, the request was refused, or the association failed.
  • At least one -instance is required.
  • qrscp answers on the same association, and commits an instance only if it holds it under the SOP class named and its file is on disk. Without -wait its report has nowhere to go: it logs failed to report storage commitment … peer released association.
  • -timeout is in seconds (default 30). The -tls… options are those of echoscu; -events records the association (Events).
  • See CONFORMANCE.md, Storage commitment.

See also

Options

On this page