pydicom.encaps.generate_pixel_data_frame

pydicom.encaps.generate_pixel_data_frame(bytestream: bytes, nr_frames: int | None = None) Iterator[bytes][source]

Yield complete frames from buffer as bytes.

Deprecated since version 3.0: This function will be remove in v4.0, please use generate_frames() instead

Parameters:
  • bytestream (bytes) – The value of the (7FE0,0010) Pixel Data element from an encapsulated dataset. The Basic Offset Table item should be present and the Sequence Delimiter item may or may not be present.

  • nr_frames (int, optional) – Required for multi-frame data when the Basic Offset Table is empty and there are multiple frames. This should be the value of (0028,0008) Number of Frames.

Yields:

bytes – A frame contained in the encapsulated pixel data.

References

DICOM Standard Part 5, Annex A