ImagingDataCommons / dicomweb-client

Python client for DICOMweb RESTful services
https://dicomweb-client.readthedocs.io
MIT License
109 stars 38 forks source link

Read frames in parallel using multiple threads #65

Closed hackermd closed 2 years ago

hackermd commented 2 years ago

This PR introduces a change to the image file reader that is used by the DICOMfileClient to read individual frames from multi-frame images. So far, frames have been read sequentially. Now, we'll use a multiprocessing.pool.ThreadPool to read multiple frames in parallel. We use threads instead of processes, because the read operation is I/O bound rather than CPU bound and the GIL should thus not be a bottleneck.