imageio.plugins.pydicom.PydicomPlugin.read#

PydicomPlugin.read(*, index: int | None = None, raw: bool = False, **kwargs) → ndarray[source]#

Read pixel data from the DICOM instance.

Parameters:
indexint or Ellipsis or None

None (default) returns the full array. int selects one frame. ... ensures a leading batch axis (shape (frames, rows, cols[, channels])).

rawbool

If False (default), return a fully reconstructed image: pydicom decode (including YBR→RGB), then palette LUT or modality rescale / modality LUT followed by VOI LUT / windowing. Otherwise, return stored pixel values only.

kwargsAny

Additional kwargs are forwarded to pydicom pixel_array.

Returns:
ndimagenp.ndarray

Decoded pixels (always channel-last).