message.getDICOMStrings¶
Use when: You want to read values from the modified message during mapping. If you need the original incoming message, use source.getDICOMStrings.
Signature: message.getDICOMStrings(nodePath, instance*)
Returns: String result - the first node that matches the nodePath and instance
Get the result as a \\ delimited string of strings of the first node that matches the nodePath.
Note
When the optional instance value is 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. | 1 |
Example¶
// assumes `message` is a DICOM message model object
// Retrieve a backslash-delimited string of values
// for the specified DICOM tag
var dicomStrings = message.getDICOMStrings(
"0010,0010" // Patient Name
);
// Optionally retrieve a specific instance
// (1 = first instance)
var dicomStringsInstance = message.getDICOMStrings(
"0010,0010", // node path
2 // instance (1 = first instance)
);
// Result:
// - dicomStrings contains a \\-delimited string of values
// - dicomStringsInstance contains values for the specified instance