pydicom.filereader.read_partial¶
- pydicom.filereader.read_partial(fileobj: BinaryIO, stop_when: Callable[[BaseTag, str | None, int], bool] | None = None, defer_size: int | str | float | None = None, force: bool = False, specific_tags: list[BaseTag | int] | None = None) FileDataset [source]¶
Parse a DICOM file until a condition is met.
- Parameters:
Notes
Use
dcmread()
unless you need to stop on some condition other than reaching pixel data.- Returns:
The read dataset.
- Return type:
See also
dcmread
More generic file reading function.