imageio.plugins.pydicom.PydicomPlugin.lut_linear#
- PydicomPlugin.lut_linear(colors: ArrayLike, indices: ArrayLike, first_mapped: int = 0) None[source]#
Set a piecewise linear gradient as the image’s LUT.
Builds a gradient LUT using DICOM’s segmented palette tags. This allows more efficient storage of a gradient palette. The palette is defined by a sequence of knot points at different pixel intensities.
- Parameters:
- colorsArrayLike
Knot colors as a 2D array of shape (K, 3) or (K, 4).
- indicesArrayLike
0-based indicies of pixel intensities where each knot is located. Assumed to be strictly increasing.
- first_mappedint
Offset subtracted from stored pixel values before indexing the LUT.