ModalityLut

Modality LUT class: compensates for any modality-specific presentation. Typically consists of a rescale slope and intercept to rescale the data range.

Ref: https://dicom.nema.org/medical/dicom/2022a/output/chtml/part03/sect_C.11.html.

Constructor

new ModalityLut(rsi, bitsStored)

Parameters:
NameTypeDescription
rsiRescaleSlopeAndIntercept

The rescale slope and intercept.

bitsStorednumber

The number of bits used to store the data.

Classes

ModalityLut

Methods

getLength() → {number}

Get the length of the LUT array.

Returns:

The length of the LUT array.

Type: 
number

getRSI() → {RescaleSlopeAndIntercept}

Get the Rescale Slope and Intercept (RSI).

Returns:

The rescale slope and intercept object.

Type: 
RescaleSlopeAndIntercept

getValue(offset) → {number}

Get the value of the LUT at the given offset.

Parameters:
NameTypeDescription
offsetnumber

The input offset in [0,2^bitsStored] range or full range for ID rescale.

Returns:

The float32 value of the LUT at the given offset.

Type: 
number