dwv.image. WindowLut

new WindowLut(rescaleLut, isSigned)

Window LUT class. Typically converts from float to integer.

Parameters:
NameTypeDescription
rescaleLutnumber

The associated rescale LUT.

isSignedboolean

Flag to know if the data is signed or not.

Methods

getLength() → {number}

Get the length of the LUT array.

Returns:

The length of the LUT array.

Type: 
number

getRescaleLut() → {object}

Get the rescale lut.

Returns:

The rescale lut.

Type: 
object

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() → {object}

Get the window / level.

Returns:

The window / level.

Type: 
object

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
wlobject

The window level.

update()

Update the lut if needed..