imageio.plugins.pydicom.PydicomPlugin.write#
- PydicomPlugin.write(ndimage: ArrayLike | List[ArrayLike], *, metadata: Dict[str, Any] | None = None, is_planar: bool = False, **kwargs) bytes | None[source]#
Write an image stack to DICOM.
- Parameters:
- ndimageArrayLike
The ndimage to write.
- metadatadict
Global metadata (instance-level) to write to the file.
- is_planarbool
If True, the provided ndimage is assumed to use planar color layout ([Frame, Channel], Height, Width). Otherwise, it is assumed to be interleaved ([Frame], Height, Width, [Channel]). Stored as DICOM
PlanarConfiguration.- kwargsAny
Additional kwargs are forwarded to
pydicom.dcmwrite.
- Returns:
- bytes or None
Encoded bytes when the URI is
"<bytes>", elseNone.