RescaleLut

dwv.image. RescaleLut

new RescaleLut(rsi, bitsStored)

Source:

Rescale LUT class. Typically converts from integer to float.

Parameters:
Name Type Description
rsi object

The rescale slope and intercept.

bitsStored number

The number of bits used to store the data.

Methods

getLength() → {number}

Source:

Get the length of the LUT array.

Returns:

The length of the LUT array.

Type
number

getRSI() → {object}

Source:

Get the Rescale Slope and Intercept (RSI).

Returns:

The rescale slope and intercept object.

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 float32 value of the LUT at the given offset.

Type
number

initialise()

Source:

Initialise the LUT.

isReady() → {boolean}

Source:

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

Returns:

True if the lut is ready to use.

Type
boolean