Skip to content

source.getDICOMSequence

Use when: You want to read values from the original incoming message before any mapping changes. If you need the modified message during mapping, use message.getDICOMSequence.

Signature: source.getDICOMSequence(nodePath, instance*)

Returns: DICOM Message[] result - the first node that matches the nodePath and instance as a JS Array of DICOM Messages, or a DICOM Message if an instance is specified

Get the result as a JS Array of DICOM Messages that matches the nodePath.

Note

instance is optional. When not specified, every matching sequence item is returned as an array; supply one to return that single item. When specified, the nodePath should not include an instance identifier.

Parameters

Type Name Description Default
String nodePath the DICOM node path
Integer instance* (optional) the match instance to return. Use 1 for the first instance.

Example

// Example: Retrieve a DICOM sequence as DICOM Message objects.

// Get the full sequence as an array of DICOM Messages
var dicomSequence = source.getDICOMSequence(
    "0040,0275" // DICOM tag (sequence)
);              // JS Array of DICOM Messages

// Get the sequence from a specific instance of the tag
var dicomSequenceInstance = source.getDICOMSequence(
    "0040,0275", // DICOM tag
    2            // instance
);               // DICOM Message