Skip to main content

Function: createVOILUTSequenceTransferFunction()

createVOILUTSequenceTransferFunction(voiLUT, options): vtkColorTransferFunction | undefined

Builds a grayscale vtkColorTransferFunction from a DICOM VOI LUT Sequence (0028,3010).

When a VOI LUT Sequence is present it is the VOI transformation, replacing the window width/center and the VOI LUT Function entirely (C.11.2.1). Without this the GPU path fell back to a linear window over the stored values, so images that rely on their VOI LUT (typically CR, DX and MG, whose curves are strongly non linear) rendered far too flat.

The output entries are normalized the way the legacy cornerstone getVOILut.js did: the number of significant bits is taken from the largest entry rather than from LUT Descriptor's declared bit depth, because that declared depth cannot be trusted in real world data.

voiRange stretches the curve over a different input range than the LUT's own domain, which is what keeps window level interaction working: the shape the file specified is preserved and only the range it spans changes, exactly as the sampled sigmoid is rebuilt from a new window. Pass the LUT's own domain (see getVOILUTSequenceRange), or nothing, for an unmodified curve.

Parameters​

• voiLUT: CPUFallbackLUT

a VOI LUT Sequence item

• options = {}

• options.maxNodes?: number

upper bound on the number of transfer function nodes

• options.voiRange?: VOIRange

input range to stretch the curve over

Returns​

vtkColorTransferFunction | undefined

the transfer function, or undefined when the LUT cannot be used

Defined in​

packages/core/src/utilities/createVOILUTSequenceTransferFunction.ts:279