message.getDICOMDoubles¶
Use when: You want to read values from the modified message during mapping. If you need the original incoming message, use source.getDICOMDoubles.
Signature: message.getDICOMDoubles(nodePath, instance*)
Returns: String result - the first node that matches the nodePath and instance
Get the result as a \\ delimited string of doubles 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 doubles for a specific DICOM tag
var dicomDoubles = message.getDICOMDoubles("0010,0030");
// Retrieve the values for a specific instance of the tag
// (useful when the tag appears multiple times, e.g. in sequences)
var dicomDoublesInstance = message.getDICOMDoubles(
"0010,0030",
2 // instance (1 = first instance)
);
// Result:
// - Returned value is a String
// - Doubles are delimited by backslashes (e.g. "12.3\\45.6\\78.9")