Skip to content

Commit

Permalink
Saving in conf_path subfolders as specified in knossos_path
Browse files Browse the repository at this point in the history
- needed for multi-layer datasets (e.g. rgb)
  • Loading branch information
Jolanda Rößner committed Sep 27, 2023
1 parent 77ade67 commit d06c2bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions knossos_utils/knossosdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2434,7 +2434,13 @@ def _write_cubes(args):
self._print(f'end_cube: {end}')

multithreading_params = []

conf_folder = os.path.dirname(self._conf_path)
conf_folder_name = "/" + Path(conf_folder).name
index = self.knossos_path.rfind(conf_folder_name)
if index != -1:
conf_folder = Path(conf_folder) / self.knossos_path[index + len(conf_folder_name):]

for z in range(start[2], end[2]):
for y in range(start[1], end[1]):
for x in range(start[0], end[0]):
Expand Down

0 comments on commit d06c2bc

Please sign in to comment.