Skip to content

Commit

Permalink
custom atlasing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
PolarBean committed Aug 21, 2024
1 parent 78ea94a commit 97219b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion PyNutil/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def __init__(
alignment_json=None,
colour=None,
atlas_name=None,
atlas_path=None,
label_path=None,
atlas_resolution_micron=None,
settings_file=None,
) -> None:
Expand Down Expand Up @@ -109,7 +111,12 @@ def __init__(
self.alignment_json = alignment_json
self.colour = colour
self.atlas_name = atlas_name
self.atlas_volume, self.atlas_labels = self.load_atlas_data(atlas_name=atlas_name)
if (atlas_path or label_path) and atlas_name:
raise ValueError("Please only specify an atlas_path and a label_path or an atlas_name, atlas and label paths are only used for loading custom atlases")
if atlas_path and label_path:
self.atlas_volume, self.atlas_labels = self.load_custom_atlas(atlas_path, label_path)
else:
self.atlas_volume, self.atlas_labels = self.load_atlas_data(atlas_name=atlas_name)
###This is just because of the migration to BrainGlobe

def load_atlas_data(self, atlas_name):
Expand Down

0 comments on commit 97219b1

Please sign in to comment.