WindowLut

dwv.image. WindowLut

new WindowLut(rescaleLut, isSigned)

Source:

Window LUT class. Typically converts from float to integer.

Parameters:
Name Type Description
rescaleLut number

The associated rescale LUT.

isSigned boolean

Flag to know if the data is signed or not.

Methods

getLength() → {number}

Source:

Get the length of the LUT array.

Returns:

The length of the LUT array.

Type
number

getRescaleLut() → {object}

Source:

Get the rescale lut.

Returns:

The rescale lut.

Type
object

getValue(offset) → {number}

Source:

Get the value of the LUT at the given offset.

Parameters:
Name Type Description
offset number

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}

Source:

Get the window / level.

Returns:

The window / level.

Type
object

isReady() → {boolean}

Source:

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}

Source:

Get the signed flag.

Returns:

The signed flag.

Type
boolean

setWindowLevel(wl)

Source:

Set the window center and width.

Parameters:
Name Type Description
wl object

The window level.

update()

Source:

Update the lut if needed..