Skip to content
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

New wsireader #4147

Merged
merged 33 commits into from
Apr 20, 2022
Merged

New wsireader #4147

merged 33 commits into from
Apr 20, 2022

Conversation

bhashemian
Copy link
Member

Fixes #4071
Fixes #4098

Description

This PR is a re-design and re-implementation of WSIReader with similar API but not provide full backward compatibility. This PR implements BaseWSIReader, WSIReader, and CuCIMWSIReader. It also make sure that the current dependencies on the legacy WSIReader is correctly satisfied.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

bhashemian and others added 30 commits April 12, 2022 01:18
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
* Redesign BaseWSIReader,  WSIReader, CuCIMWSIReader

Signed-off-by: Behrooz <[email protected]>

* Add unittests for WSIReader

Signed-off-by: Behrooz <[email protected]>

* Add image mode for output validation

Signed-off-by: Behrooz <[email protected]>

* Update docs

Signed-off-by: Behrooz <[email protected]>

* Update references to new WSIReader

Signed-off-by: Behrooz <[email protected]>

* Remove legacy WSIReader

Signed-off-by: Behrooz <[email protected]>

* Update unittests

Signed-off-by: Behrooz <[email protected]>

* Update docs

Signed-off-by: Behrooz <[email protected]>

* sort imports

Signed-off-by: Behrooz <[email protected]>

* Clean up imports

Signed-off-by: Behrooz <[email protected]>

* Update docstrings

Signed-off-by: Behrooz <[email protected]>

* Update docs and docstrings

Signed-off-by: Behrooz <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix a typo

Signed-off-by: Behrooz <[email protected]>

* Remove redundant checking

Signed-off-by: Behrooz <[email protected]>

* Update read and other methods

Signed-off-by: Behrooz <[email protected]>

* Update wsireader to support multi image and update docstrings

Signed-off-by: Behrooz <[email protected]>

* Make workaround for CuImage objects

Signed-off-by: Behrooz <[email protected]>

* Add unittests for multi image reading

Signed-off-by: Behrooz <[email protected]>

* Update a note about cucim

Signed-off-by: Behrooz <[email protected]>

* Update type hints and docstrings

Signed-off-by: Behrooz <[email protected]>
Signed-off-by: Behrooz <[email protected]>
@bhashemian
Copy link
Member Author

bhashemian commented Apr 19, 2022

Hi @Nic-Ma, This PR is the same as the PR #4107 that you reviewed except that I brought back the legacy WSIReader to have backward compatibility. Later, once we have all the component ready we can deprecate the legacy components.

@bhashemian bhashemian requested a review from Nic-Ma April 19, 2022 22:33
Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Thanks for the quick update.

@bhashemian bhashemian enabled auto-merge (squash) April 19, 2022 22:36
@Nic-Ma
Copy link
Contributor

Nic-Ma commented Apr 19, 2022

/build

@bhashemian bhashemian merged commit cb9040e into Project-MONAI:dev Apr 20, 2022
Can-Zhao added a commit to Can-Zhao/MONAI that referenced this pull request May 10, 2022
Add padding to filter to ensure same size after anti-aliasing

Use replicate padding insteadof zero padding to avoid artifacts for non-zero boundary

Reuse GaussianSmooth

4073 Enhance DynUNet doc-strings (Project-MONAI#4102)

* Fix doc strings error

Signed-off-by: Yiheng Wang <[email protected]>

* remove duplicate places

Signed-off-by: Yiheng Wang <[email protected]>

4105 drops pt16 support (Project-MONAI#4106)

* update sys req

Signed-off-by: Wenqi Li <[email protected]>

* temp test

Signed-off-by: Wenqi Li <[email protected]>

* update code for torch>=1.7

Signed-off-by: Wenqi Li <[email protected]>

* temp tests

Signed-off-by: Wenqi Li <[email protected]>

* fixes tests

Signed-off-by: Wenqi Li <[email protected]>

* autofix

Signed-off-by: Wenqi Li <[email protected]>

* fixes import

Signed-off-by: Wenqi Li <[email protected]>

* clear cache

Signed-off-by: Wenqi Li <[email protected]>

* update based on comments

Signed-off-by: Wenqi Li <[email protected]>

* remove temp cmd

Signed-off-by: Wenqi Li <[email protected]>

Make `pixelshuffle` scriptable (Project-MONAI#4109)

* Update the existing functionality to comply with the `torchscript.jit.script` function.

Signed-off-by: Ramon Emiliani <[email protected]>

meta tensor (Project-MONAI#4077)

* meta tensor

Signed-off-by: Richard Brown <[email protected]>

4084 Add kwargs for `Tensor.to()` in engines (Project-MONAI#4112)

* [DLMED] add kwargs for to() API

Signed-off-by: Nic Ma <[email protected]>

* [MONAI] python code formatting

Signed-off-by: monai-bot <[email protected]>

* [DLMED] fix typo

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] fix flake8

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <[email protected]>

Co-authored-by: monai-bot <[email protected]>

fixes pytorch version tests (Project-MONAI#4127)

Signed-off-by: Wenqi Li <[email protected]>

update meta tensor api (Project-MONAI#4131)

* update meta tensor api

Signed-off-by: Wenqi Li <[email protected]>

* update based on comments

Signed-off-by: Wenqi Li <[email protected]>

runtests.sh isort (Project-MONAI#4134)

Signed-off-by: Richard Brown <[email protected]>

update citation (Project-MONAI#4133)

Signed-off-by: Wenqi Li <[email protected]>

`ToMetaTensor` and `FromMetaTensor` transforms (Project-MONAI#4115)

to and from meta

no skip if before pytorch 1.7 (Project-MONAI#4139)

* no skip if before pytorch 1.7

Signed-off-by: Richard Brown <[email protected]>

* fix

Signed-off-by: Richard Brown <[email protected]>

* fix

Signed-off-by: Richard Brown <[email protected]>

[DLMED] fix file name in meta (Project-MONAI#4145)

Signed-off-by: Nic Ma <[email protected]>

4116 Add support for advanced args of AMP (Project-MONAI#4132)

* [DLMED] fix typo in bundle scripts

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] add support for AMP args

Signed-off-by: Nic Ma <[email protected]>

* [MONAI] python code formatting

Signed-off-by: monai-bot <[email protected]>

* [DLMED] fix flake8

Signed-off-by: Nic Ma <[email protected]>

Co-authored-by: monai-bot <[email protected]>

New wsireader (Project-MONAI#4147)

`MetaTensor`: collate; decollate; dataset; dataloader; out=; indexing and iterating across batches (Project-MONAI#4137)

`MetaTensor`: collate; decollate; dataset; dataloader; out=; indexing and iterating across batches (Project-MONAI#4137)
@bhashemian bhashemian deleted the new-wsireader branch February 22, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WSIReader to return patch information Redesign of WSIReader
2 participants