- pydicom.encaps.fragment_frame(frame: bytes, nr_fragments: int = 1) Generator[bytes, None, None] ¶
Yield one or more fragments from frame.
New in version 1.2.
bytes – The fragmented data, with all fragments as an even number of bytes greater than or equal to two.
All items containing an encoded fragment shall be made of an even number of bytes greater than or equal to two.
The last fragment of a frame may be padded, if necessary to meet the sequence item format requirements of the DICOM Standard.
Any necessary padding may be appended after the end of image marker.
Encapsulated Pixel Data has the Value Representation OB.
Values with a VR of OB shall be padded with a single trailing NULL byte value (
0x00) to achieve even length.