Skip to content

Commit 5473bfc

Browse files
committed
Fixing dependencies
1 parent 84cb9ea commit 5473bfc

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ test_database/dicom_leica_anonymized
3333
test_database/dicom_wsidicomizer
3434
mask_ihc.ipynb
3535
test_output
36+
debug*
37+
idc*

pathopatch/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,9 @@ def store_config(self) -> None:
683683
for k, v in config_repr_str.items():
684684
config_repr[k] = v
685685
# convert the string to Path
686-
log_path = Path(self.preprocessing.log_path)
686+
log_path = Path(self.preprocessconfig.log_path)
687687

688-
#using the / to join paths
688+
# using the / to join paths
689689
config_file_path = log_path / "config.yaml"
690690

691691
# store in log directory

pathopatch/patch_extraction/patch_extraction.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,7 @@ def process_queue(
12111211
patch_mask = np.zeros(
12121212
(tile_size, tile_size), dtype=np.uint8
12131213
) # TODO: continue missing?
1214+
continue
12141215
else:
12151216
intersected_labels, ratio, patch_mask = get_intersected_labels(
12161217
tile_size=tile_size,

pathopatch/utils/masking.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,12 @@ def apply_otsu_thresholding(tile: np.ndarray) -> np.ndarray:
238238
otsu_masking = masked_image_gray < thresh
239239
# improving mask
240240
otsu_masking = sk_morphology.remove_small_objects(otsu_masking, 60)
241-
otsu_masking = sk_morphology.dilation(otsu_masking, sk_morphology.square(12))
242-
otsu_masking = sk_morphology.closing(otsu_masking, sk_morphology.square(5))
241+
with warnings.catch_warnings():
242+
warnings.filterwarnings(
243+
"ignore", category=FutureWarning, message=".*square.*deprecated.*"
244+
)
245+
otsu_masking = sk_morphology.dilation(otsu_masking, sk_morphology.square(12))
246+
otsu_masking = sk_morphology.closing(otsu_masking, sk_morphology.square(5))
243247
otsu_masking = sk_morphology.remove_small_holes(otsu_masking, 250)
244248
tile = mask_rgb(tile, otsu_masking).astype(np.uint8)
245249

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pathopatch"
7-
version = "1.0.6"
7+
version = "1.0.8"
88
authors = [
99
{name = "Fabian Hörst", email = "[email protected]"},
1010
]
@@ -25,26 +25,26 @@ license = { text = "CC-BY-ND-4.0" }
2525
dependencies = [
2626
"Pillow>=9.5.0",
2727
"PyYAML",
28-
"Shapely==1.8.5.post1",
28+
"Shapely>=1.8.5.post1,<=2.0.5",
2929
"colorama",
3030
"future",
3131
"geojson>=3.0.0",
3232
"matplotlib",
3333
"natsort",
34-
"numpy>1.22,<1.24",
34+
"numpy<2.0.0",
3535
"opencv_python_headless",
3636
"openslide_python",
3737
"pandas",
3838
"pydantic==1.10.4",
3939
"rasterio==1.3.5.post1",
4040
"requests",
41-
"scikit-image",
41+
"scikit-image<0.27",
4242
"setuptools<=65.6.3",
4343
"tqdm",
4444
"torchvision",
4545
"torch",
46-
"wsidicom==0.20.4",
47-
"wsidicomizer==0.14.1",
46+
"wsidicom",
47+
"wsidicomizer",
4848
"pydicom==2.4.4",
4949
]
5050

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pandas
1515
pydantic==1.10.4
1616
rasterio==1.3.5.post1
1717
requests
18-
scikit-image
18+
scikit-image<0.27
1919
setuptools<=65.6.3
2020
tqdm
2121
torchvision

0 commit comments

Comments
 (0)