Function: normalizeVOILUTFunction()
normalizeVOILUTFunction(
value):VOILUTFunctionType|undefined
Normalizes a raw VOI LUT Function (0028,1056) value into a VOILUTFunctionType.
The value reaches us in a few different shapes depending on which metadata
provider produced it: dicom-parser returns a string, DICOMweb JSON returns
a single element Value array, and some providers hand back the whole
multi-valued array. It is a CS attribute, so it can also arrive padded with
whitespace or a trailing null, and in the wrong case.
Note that indexing a string (value[0]) yields its first character, so
treating the string shape as an array silently produces 'S' for
'SIGMOID', which caused the "Invalid VOI LUT function" throw reported in
cornerstone3D#2844.
Parameters
• value: unknown
the raw attribute value from a metadata provider
Returns
VOILUTFunctionType | undefined
the matching VOILUTFunctionType, or undefined when the value is absent or not a DICOM defined term.