Skip to content

Commit 8eb70e6

Browse files
authored
Improve knossos conversion (#271)
* make file listing in knossos conversion more precise * format
1 parent 54f7bf0 commit 8eb70e6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

wkcuber/convert_knossos.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ def convert_knossos(
9494
with get_executor_for_args(args) as executor:
9595
knossos_cubes = list(source_knossos.list_cubes())
9696
if len(knossos_cubes) == 0:
97-
logging.error("No input KNOSSOS cubes found.")
97+
logging.error(
98+
"No input KNOSSOS cubes found. Make sure to pass the path which points to a KNOSSOS magnification (e.g., testdata/knossos/color/1)."
99+
)
98100
exit(1)
99101

100102
knossos_cubes.sort()

wkcuber/knossos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __get_only_raw_file_path(self, cube_xyz: Tuple[int, ...]) -> Optional[str]:
7979
return raw_files[0] if len(raw_files) > 0 else None
8080

8181
def list_files(self) -> Iterator[str]:
82-
return iglob(path.join(self.root, "**", "*.raw"), recursive=True)
82+
return iglob(path.join(self.root, "*", "*", "*", "*.raw"), recursive=True)
8383

8484
def __parse_cube_file_name(self, filename: str) -> Optional[Tuple[int, int, int]]:
8585
m = CUBE_REGEX.search(filename)

0 commit comments

Comments
 (0)