Skip to main content

Function: getVoiFromSigmoidRGBTransferFunction()

getVoiFromSigmoidRGBTransferFunction(cfun): [number, number]

Recovers the VOI range a sampled sigmoid transfer function was built from.

The nodes hold the DICOM sigmoid (PS3.3 C.11.2.1.3.1) y = 1 / (1 + exp(-4 * (x - c) / w)), so window width and center are solved for analytically from two samples of the curve. Converting those back to a range has to use the same convention as createSigmoidRGBTransferFunction, which reads the range through toWindowLevel - hence toLowHighRange here rather than a plain c +/- w/2. The two are exact inverses, so a range survives any number of round trips unchanged. If the sigmoid branch of one of them ever diverges from the linear convention, the other has to follow.

Parameters​

• cfun: vtkColorTransferFunction

Returns​

[number, number]

Defined in​

packages/core/src/utilities/getVoiFromSigmoidRGBTransferFunction.ts:17