Skip to content

Commit 4169d77

Browse files
committed
test: big images found in real folder
1 parent c582c3c commit 4169d77

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ZooProcess_lib/ZooscanFolder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, drive_path: Path) -> None:
3434

3535
def list(self) -> Generator[Path, None, None]:
3636
# Get all subdirectories in the drive
37-
for item in self.path.iterdir():
37+
for item in self.path.iterdir(): # TODO: protect
3838
if not item.is_dir():
3939
continue
4040
if item.name in ("Zooprocess", "Zooscan", "Background"):
@@ -119,7 +119,7 @@ def list_scans_with_state(self) -> List[str]:
119119
"""
120120
return [
121121
an_entry.name
122-
for an_entry in self.zooscan_scan.work.path.iterdir()
122+
for an_entry in self.zooscan_scan.work.path.iterdir() # TODO: protect
123123
if an_entry.is_dir()
124124
]
125125

@@ -149,7 +149,7 @@ def read_lut(self) -> LutFile:
149149
return LutFile.read(config_file)
150150

151151
def list(self) -> List[Path]:
152-
return list(self.path.iterdir())
152+
return list(self.path.iterdir()) # TODO: protect
153153

154154

155155
class ZooscanMetaFolder:
@@ -201,7 +201,7 @@ def get_8bit_file(self, sample_name: str, index: int) -> Path:
201201
def list_samples(self) -> Generator[str, None, None]:
202202
"""Not really samples, rather scans i.e. subsamples, but kept with
203203
same name until a rename TODO"""
204-
for a_file in self.path.iterdir():
204+
for a_file in self.path.iterdir(): # TODO: protect
205205
if a_file.suffix == ".tif":
206206
yield a_file.name[:-6]
207207

src/ZooProcess_lib/img_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .LegacyMeta import LutFile
1616
from .tools import timeit
1717

18-
Image.MAX_IMAGE_PIXELS = 375000000
18+
Image.MAX_IMAGE_PIXELS = 512_000_000
1919

2020
debug = True # False
2121

0 commit comments

Comments
 (0)