message.addFileMetaInformation¶
Signature: message.addFileMetaInformation(otherDICOM)
Returns: void
Copies the File Meta Information (group 0002) elements from otherDICOM into the current DICOM object.
Parameters¶
| Type | Name | Description | Default |
|---|---|---|---|
| DICOM Message | otherDICOM | the DICOM object to copy the File Meta Information from |
Example¶
// assumes `message` is a DICOM message model object
// otherDICOM already carries the File Meta Information (group 0002) you want -- for
// example a template that pins a specific Transfer Syntax.
var otherDICOM = qie.parseDICOMFile("/tmp/otherDICOM.dcm", false);
// Why: a data set assembled in memory has no File Meta Information, so it cannot be
// written as a Part 10 (.dcm) file or sent with a defined transfer syntax. Copy the
// group 0002 elements from the template so this message becomes a complete DICOM file.
message.removeFileMetaInformation(); // drop any stale group 0002 first
message.addFileMetaInformation(otherDICOM);