-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoder #126
Merged
erikogabrielsson
merged 71 commits into
imi-bigpicture:main
from
sectra-medical:Decoder
Nov 29, 2023
Merged
Decoder #126
erikogabrielsson
merged 71 commits into
imi-bigpicture:main
from
sectra-medical:Decoder
Nov 29, 2023
+4,134
−613
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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]>
* Get multiple frames from dicom web
* 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: imi-bigpicture#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]>
* 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 (imi-bigpicture#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 (imi-bigpicture#121) * Get multiple frames from dicom web * Allow loading multiple series with DICOMweb (imi-bigpicture#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: imi-bigpicture#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]>
# Conflicts: # CHANGELOG.md # wsidicom/instance/image_data.py # wsidicom/web/wsidicom_web_client.py # wsidicom/web/wsidicom_web_image_data.py
# Conflicts: # CHANGELOG.md
This was referenced Nov 29, 2023
@erikogabrielsson Awesome! Excited to try these changes out. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
open_web()
to take a list of acceptable transfer syntaxes.