message.addCommandAttributes¶
Signature: message.addCommandAttributes(otherDICOM)
Returns: void
Copies the DIMSE command set (group 0000) elements from otherDICOM into the current DICOM object.
Parameters¶
| Type | Name | Description | Default |
|---|---|---|---|
| DICOM Message | otherDICOM | the DICOM object to copy the command set elements from |
Example¶
// assumes `message` is a DICOM message model object
// otherDICOM carries the DIMSE command set (group 0000) to copy in -- typically the
// original C-STORE / C-FIND request this data set arrived under.
var otherDICOM = qie.parseDICOMFile("/tmp/otherDICOM.dcm", false);
// Why: a data set built or transformed inside a channel has no DIMSE command group, so
// it can no longer be routed as a command. Copying the command set from the request
// restores its Message ID, Affected SOP Class UID, Affected SOP Instance UID, etc.
message.addCommandAttributes(otherDICOM);