Bulk Data Encapsulation Utilities (pydicom.encaps
)¶
Functions for parsing and applying encapsulation to bulk data elements such as (7FE0,0010) Pixel Data.
Parsing Encapsulated Data¶
|
Read encapsulated data and return a list of bytes. |
|
Read encapsulated data and return the fragments as one continuous bytes. |
|
Yield an encapsulated pixel data frame. |
Yield the encapsulated pixel data fragments. |
|
|
Yield complete frames from buffer as |
Return a list of the fragment offsets from the Basic Offset Table. |
|
|
Read and return a single Item in the fragmented data stream. |
|
Return the encapsulated pixel data's basic offset table frame offsets. |
|
Return the number of fragments and their positions in buffer. |
|
Yield frame fragments from the encapsulated pixel data in buffer. |
|
Yield fragmented pixel data frames from buffer. |
|
Yield complete pixel data frames from buffer. |
|
Return the specified frame at index. |
Creating Encapsulated Data¶
|
Return encapsulated frames. |
|
Return an |
|
Return encapsulated image data and values for the Extended Offset Table elements. |
|
Return |
|
Yield one or more fragments from frame. |
|
Return an itemized fragment. |
|
Yield items generated from frame. |
Management class for encapsulating buffers:
- class pydicom.encaps.EncapsulatedBuffer(buffers: list[BufferedIOBase], use_bot: bool = False)[source]¶
Convenience class for managing the encapsulation of one or more buffers containing compressed Pixel Data.
Added in version 3.0.
- property extended_lengths: bytes¶
Return an encoded Extended Offset Table Lengths value from lengths
- Returns:
The encoded lengths of the frame.
- Return type:
- property extended_offsets: bytes¶
Return an encoded Extended Offset Table value from offsets
- Returns:
The encoded offsets to the first byte of the item tag of the first fragment for every frame, as measured from the first byte of the first item tag following the empty Basic Offset Table Item.
- Return type:
- property offsets: list[int]¶
Return the encapsulated item offsets, starting at 0 for the first item.
- read(size: int | None = 8192, /) bytes [source]¶
Read up to size bytes of data from the encapsulated buffers.