ModalityLut
Source: modalityLut.js:31
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/2024a/output/chtml/part03/sect_C.11.html.
Constructor
new ModalityLut(
rsi: RescaleSlopeAndIntercept,
bitsStored?: number,
): ModalityLutParameters
rsi(RescaleSlopeAndIntercept) — The rescale slope and intercept.bitsStored(number, optional) — The number of bits used to store the data. No LUT length is set (seegetLength) if undefined or larger than the maximum LUT bits stored (16).
Instance Methods
getRSI(): RescaleSlopeAndIntercept
Get the Rescale Slope and Intercept (RSI).
Returns
RescaleSlopeAndIntercept— The rescale slope and intercept object.
getLength(): number | undefined
Get the length of the LUT array.
Returns
number | undefined— The length of the LUT array, undefined if the bits stored do not allow to create a LUT.
getValue(offset: number): number
Get the value of the LUT at the given offset.
Parameters
offset(number) — The input offset in [0,2^bitsStored] range or full range for ID rescale.
Returns
number— The float32 value of the LUT at the given offset.