pydicom.pixels.apply_voi¶
- pydicom.pixels.apply_voi(arr: np.ndarray, ds: Dataset, index: int = 0) np.ndarray[source]¶
Apply a VOI lookup table to arr.
Added in version 2.1.
See
apply_voi_lut()for applying Window Width/Window Center as a fallback if no VOI LUT Sequence is present.- Parameters:
arr (numpy.ndarray) – The
ndarrayto apply the VOI LUT to.ds (dataset.Dataset) – A dataset containing a VOI LUT Module. If (0028,3010) VOI LUT Sequence is present then returns an array of
np.uint8ornp.uint16, depending on the 3rd value of (0028,3002) LUT Descriptor, otherwise arr will be returned unchanged.index (int, optional) – When the VOI LUT Module contains multiple alternative views, this is the index of the view to return (default
0).
- Returns:
An array with applied VOI LUT.
- Return type:
See also
References
DICOM Standard, Part 3, Annex C.11.2
DICOM Standard, Part 3, Annex C.8.11.3.1.5
DICOM Standard, Part 4, Annex N.2.1.1