voxel.HttpReader
- class voxel.HttpReader(verbose: bool = False, block_size: int = 1000000, **kwargs)[source]
A class for reading DICOMs from HTTP requests with DICOMweb support.
- Variables:
verbose (bool, optional) – If
True, show loading progress bar.block_size (int, optional) – Block size for reading data.
**kwargs – Keyword arguments for
DicomReader.
Examples
>>> hr = HttpReader() >>> hr.read("https://server.com/dicom.zip") >>> hr.read("https://server.com/dicom.dcm") >>> hr.read("https://server.com/dicom-web/studies/x/series/y") >>> hr.close()
>>> with HttpReader() as hr: >>> hr.session.auth = ("username", "password") >>> hr.read("https://server.com/dicom", params={"x": "y"})
Methods
__init__([verbose, block_size])close()Close the current HTTP session.
load(url[, params, data_format, verbose])Load data from HTTP request.
load_state_dict(state_dict)Loads the state dictionary into the object.
read(url[, params, data_format, verbose])Load data from HTTP request.
state_dict()Returns the state dictionary for an object.
Attributes
data_format_code