Function: createMultiResultLine()
createMultiResultLine(
cachedVolumeStats,targetIds,name,attribute,unitAttribute):string
Creates a formatted multi-result line string for a given metric across multiple target volumes.
Formats the result as "Name: value1 unit1 value2 unit2 ..." where each value-unit pair corresponds to a different target volume. Only includes values that are valid numbers.
Parameters
• cachedVolumeStats: any
Object containing cached statistics for each target volume, keyed by target ID
• targetIds: string[]
Array of target volume IDs to include in the result
• name: string
Display name for the metric (e.g., "Area", "Mean", "Max")
• attribute: string
The attribute name to read from the stats object (e.g., "area", "mean", "max")
• unitAttribute: string
The attribute name containing the unit for this metric (e.g., "areaUnit", "modalityUnit")
Returns
string
A formatted string like "Name: value1 unit1 value2 unit2", or undefined if no valid numeric values are found for any target