VoiLutLinearFunction

VOI LUT linear function.

Can be default linear or linear exact.

if (x <= c - 0.5 - (w-1)/2) then y = ymin
else if (x > c - 0.5 + (w-1)/2) then y = ymax
else y = ((x - (c - 0.5)) / (w-1) + 0.5) * (ymax - ymin) + ymin
if (x <= c - w/2), then y = ymin
else if (x > c + w/2), then y = ymax
else y = ((x - c) / w + 0.5) * (ymax- ymin) + ymin

Ref: https://dicom.nema.org/medical/dicom/2022a/output/chtml/part03/sect_C.11.2.html#sect_C.11.2.1.2.

Constructor

new VoiLutLinearFunction(center, width, isExactopt)

Parameters:
NameTypeAttributesDescription
centernumber

The window level center.

widthnumber

The window level width.

isExactboolean<optional>

Is exact flag, defaults to false.

Classes

VoiLutLinearFunction

Methods

getY(x) → {number}

Get the value of the function at a given number.

Parameters:
NameTypeDescription
xnumber

The input value.

Returns:

The value of the function at x.

Type: 
number