Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add property to count number of tile frames (#116)
* Add property to count number of tile frames The "NumberOfFrames" attribute on a dataset takes into account not just the number of frames corresponding to tiles, but also the number of focal planes and optical paths (for example, see [here](https://github.com/imi-bigpicture/wsidicom/blob/774fe3ca00096e3fd2556fc956520dbfabc81311/wsidicom/instance/dataset.py#L651-L655)). When I was trying to view a dataset with multiple optical paths, I would encounter errors in the `image_size` property since it did not distinguish frames that came from optical paths and tiles. This fixes viewing [this example](https://imagingdatacommons.github.io/slim/studies/2.25.23897195960526781231486877255455994829/series/2.25.83282858720704132758110891374375550907) via DICOMweb in [large_image](https://github.com/girder/large_image). I am new to the field, so please feel free to correct any naming issues or misconceptions... Signed-off-by: Patrick Avery <[email protected]> * Add option to provide a session to the web client (#117) * Add option to provide web client a session We would like to create the `requests.Session` object on our own and pass it into `WsiDicomWebClient`, since we are not using an object derived from `AuthBase` to create it. This PR adds support to pass a session to `WsiDicomWebClient` directly. Signed-off-by: Patrick Avery <[email protected]> * Refactor __init__ method of WsiDicomWebClient The `__init__` method now accepts a `DICOMwebClient` object. The previous `__init__` method was moved into a `create_client()` class method. Signed-off-by: Patrick Avery <[email protected]> * Remove `WsiDicomFileClient` and update README.md Signed-off-by: Patrick Avery <[email protected]> --------- Signed-off-by: Patrick Avery <[email protected]> * Dicomweb get multiple frames (#121) * Get multiple frames from dicom web * Allow loading multiple series with DICOMweb (#122) * Allow loading multiple series with DICOMweb `WsiDicom.open_web()` was modified to be able to either take a single series uid (as before) or a list of series uids. If a list of series uids is passed, their instances are all loaded together. This can be useful for cases where, for instance, different optical paths are located in different series. This also loosens the UID matching to only check the frame of references. This also adds `TotalPixelMatrixOriginSequence` matching when comparing datasets. Fixes: #118 Signed-off-by: Patrick Avery <[email protected]> * Fix `isinstance()` check for series uids Signed-off-by: Patrick Avery <[email protected]> * Fix logic in `SlideUids.matches()` Signed-off-by: Patrick Avery <[email protected]> * Remove unused import Signed-off-by: Patrick Avery <[email protected]> --------- Signed-off-by: Patrick Avery <[email protected]> * Remove unsafe number_of_focal_planes and number_of_optical_paths properties * FIx if * Skip frame count check for concatenated instances --------- Signed-off-by: Patrick Avery <[email protected]> Co-authored-by: Erik O Gabrielsson <[email protected]> Co-authored-by: Erik O Gabrielsson <[email protected]>
- Loading branch information