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

WSIReader read by power and mpp #6244

Merged
merged 41 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
008ed39
Implement read by magnification power and mpp
drbeh Feb 9, 2023
622b19a
update defaults and comments
drbeh Feb 14, 2023
10c39af
merge dev
drbeh Mar 22, 2023
01e7687
update defaults and add test cases
drbeh Mar 22, 2023
1814396
update error msg:
drbeh Mar 22, 2023
8a3d66f
Merge branch 'dev' of github.com:Project-MONAI/MONAI into wsireader-mpp
drbeh Mar 27, 2023
67ce0cb
formatting
drbeh Mar 27, 2023
c5bf655
arrange params
drbeh Mar 27, 2023
82da62e
micor docstring update
drbeh Mar 27, 2023
008f9dc
update docstring
drbeh Mar 27, 2023
cfd20e1
add defaults
drbeh Mar 27, 2023
d2595ef
Merge branch 'dev' into wsireader-mpp
drbeh Mar 28, 2023
b4c2dd1
update mpp, power and add several unittests to cover them
drbeh Mar 29, 2023
8894dbd
Merge branch 'wsireader-mpp' of github.com:drbeh/MONAI into wsireader…
drbeh Mar 29, 2023
3d2ad49
remove redundant check
drbeh Mar 29, 2023
45145aa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 29, 2023
91da7d7
update unit tests with new wsi key
drbeh Mar 29, 2023
93ae205
Merge branch 'wsireader-mpp' of github.com:drbeh/MONAI into wsireader…
drbeh Mar 29, 2023
db809dc
update docsting and mmp for cucim
drbeh Mar 29, 2023
20180dc
update docstring
drbeh Mar 29, 2023
ac1e7d6
Merge branch 'dev' into wsireader-mpp
drbeh Mar 30, 2023
d757ee8
address comments
drbeh Mar 30, 2023
556d865
Merge branch 'wsireader-mpp' of github.com:drbeh/MONAI into wsireader…
drbeh Mar 30, 2023
886163a
Merge branch 'dev' into wsireader-mpp
drbeh Mar 30, 2023
5221ddc
update error msg
drbeh Mar 30, 2023
9c52f65
make get_valid_level public and upate docstrings
drbeh Mar 30, 2023
dc385ef
Merge branch 'dev' into wsireader-mpp
drbeh Mar 31, 2023
6349376
Merge branch 'dev' into wsireader-mpp
Nic-Ma Apr 3, 2023
833f619
Merge branch 'dev' into wsireader-mpp
drbeh Apr 3, 2023
3453d7c
Merge branch 'dev' of github.com:Project-MONAI/MONAI into wsireader-mpp
drbeh Apr 3, 2023
14b6df4
address comments and implement ConverUnits
drbeh Apr 3, 2023
4da71ef
Merge branch 'wsireader-mpp' of github.com:drbeh/MONAI into wsireader…
drbeh Apr 3, 2023
914f358
merge dev
drbeh Apr 3, 2023
0a46908
correct removed files
drbeh Apr 3, 2023
1a1757e
Merge branch 'dev' into wsireader-mpp
drbeh Apr 4, 2023
ad20310
Merge branch 'dev' into wsireader-mpp
drbeh Apr 4, 2023
ce8c49a
simplify find closest level
drbeh Apr 4, 2023
8094e03
Merge branch 'wsireader-mpp' of github.com:drbeh/MONAI into wsireader…
drbeh Apr 4, 2023
9529e98
Merge branch 'dev' into wsireader-mpp
drbeh Apr 5, 2023
3779bff
Merge branch 'dev' into wsireader-mpp
drbeh Apr 6, 2023
d7e61ae
Merge branch 'dev' into wsireader-mpp
wyli Apr 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
665 changes: 452 additions & 213 deletions monai/data/wsi_reader.py
drbeh marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions tests/test_masked_inference_wsi_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
_, has_cim = optional_import("cucim", name="CuImage")
_, has_osl = optional_import("openslide")

FILE_KEY = "wsi_img"
FILE_KEY = "wsi_generic_tiff"
wyli marked this conversation as resolved.
Show resolved Hide resolved
FILE_URL = testing_data_config("images", FILE_KEY, "url")
base_name, extension = os.path.basename(f"{FILE_URL}"), ".tiff"
FILE_NAME = f"temp_{base_name}"
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", FILE_NAME + extension)
FILE_NAME = f"temp_{FILE_KEY}"
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", FILE_NAME + ".tiff")

MASK1, MASK2, MASK4 = "mask1.npy", "mask2.npy", "mask4.npy"

Expand Down
5 changes: 2 additions & 3 deletions tests/test_masked_patch_wsi_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
_, has_codec = optional_import("imagecodecs")
has_tiff = has_tiff and has_codec

FILE_KEY = "wsi_img"
FILE_KEY = "wsi_generic_tiff"
FILE_URL = testing_data_config("images", FILE_KEY, "url")
base_name, extension = os.path.basename(f"{FILE_URL}"), ".tiff"
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension)
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", f"temp_{FILE_KEY}.tiff")

TEST_CASE_0 = [
{"data": [{"image": FILE_PATH, WSIPatchKeys.LEVEL: 8, WSIPatchKeys.SIZE: (2, 2)}], "mask_level": 8},
Expand Down
5 changes: 2 additions & 3 deletions tests/test_patch_wsi_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
_, has_codec = optional_import("imagecodecs")
has_tiff = has_tiff and has_codec

FILE_KEY = "wsi_img"
FILE_KEY = "wsi_generic_tiff"
FILE_URL = testing_data_config("images", FILE_KEY, "url")
base_name, extension = os.path.basename(f"{FILE_URL}"), ".tiff"
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension)
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", f"temp_{FILE_KEY}.tiff")

TEST_CASE_DEP_0 = [
{
Expand Down
5 changes: 2 additions & 3 deletions tests/test_sliding_patch_wsi_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
_, has_codec = optional_import("imagecodecs")
has_tiff = has_tiff and has_codec

FILE_KEY = "wsi_img"
FILE_KEY = "wsi_generic_tiff"
FILE_URL = testing_data_config("images", FILE_KEY, "url")
base_name, extension = os.path.basename(f"{FILE_URL}"), ".tiff"
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension)
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", f"temp_{FILE_KEY}.tiff")

FILE_PATH_SMALL_0 = os.path.join(os.path.dirname(__file__), "testing_data", "temp_wsi_inference_0.tiff")
FILE_PATH_SMALL_1 = os.path.join(os.path.dirname(__file__), "testing_data", "temp_wsi_inference_1.tiff")
Expand Down
5 changes: 2 additions & 3 deletions tests/test_smartcache_patch_wsi_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
_cucim, has_cim = optional_import("cucim")
has_cim = has_cim and hasattr(_cucim, "CuImage")

FILE_KEY = "wsi_img"
FILE_KEY = "wsi_generic_tiff"
FILE_URL = testing_data_config("images", FILE_KEY, "url")
base_name, extension = os.path.basename(f"{FILE_URL}"), ".tiff"
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", "temp_" + base_name + extension)
FILE_PATH = os.path.join(os.path.dirname(__file__), "testing_data", f"temp_{FILE_KEY}.tiff")

TEST_CASE_0 = [
{
Expand Down
Loading