DWVv0.37.0

VoiLut

Source: voiLut.js:182

VOI (Values of Interest) LUT class: apply window centre and width using a VOI LUT function.


Constructor

new VoiLut(wl: WindowLevel, voiLutFunctionName?: string): VoiLut

Parameters

  • wl (WindowLevel) — The window center and width.
  • voiLutFunctionName (string, optional) — The name of the VOI LUT function, defaults to 'LINEAR'.

Instance Methods

getWindowLevel(): WindowLevel

Get the window and level.

Returns

setSignedOffset(offset: number)

Set the signed offset.

Parameters

  • offset (number) — The signed data offset, typically: slope * ( size / 2).

apply(value: number): number

Apply the window level on an input value.

Parameters

  • value (number) — The value to rescale as an integer.

Returns

  • number — The leveled value, in the [0,255] range.