WindowLut

Window LUT class. Typically converts from float to integer.

Constructor

new WindowLut(rescaleLut, isSigned)

Parameters:
NameTypeDescription
rescaleLutRescaleLut

The associated rescale LUT.

isSignedboolean

Flag to know if the data is signed or not.

Classes

WindowLut

Methods

getLength() → {number}

Get the length of the LUT array.

Returns:

The length of the LUT array.

Type: 
number

getRescaleLut() → {RescaleLut}

Get the rescale lut.

Returns:

The rescale lut.

Type: 
RescaleLut

getValue(offset) → {number}

Get the value of the LUT at the given offset.

Parameters:
NameTypeDescription
offsetnumber

The input offset in [0,2^bitsStored] range.

Returns:

The integer value (default [0,255]) of the LUT at the given offset.

Type: 
number

getWindowLevel() → {WindowCenterAndWidth}

Get the window / level.

Returns:

The window / level.

Type: 
WindowCenterAndWidth

isReady() → {boolean}

Is the lut ready to use or not? If not, the user must call 'update'.

Returns:

True if the lut is ready to use.

Type: 
boolean

isSigned() → {boolean}

Get the signed flag.

Returns:

The signed flag.

Type: 
boolean

setWindowLevel(wl)

Set the window center and width.

Parameters:
NameTypeDescription
wlWindowCenterAndWidth

The window level.

update()

Update the lut if needed..