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