Skip to content
Snippets Groups Projects
Commit 300429c4 authored by Harry Carey's avatar Harry Carey
Browse files

moved build_quantifier logic into __init__

parent 07264a86
No related branches found
No related tags found
No related merge requests found
...@@ -44,8 +44,6 @@ class PyNutil: ...@@ -44,8 +44,6 @@ class PyNutil:
self.colour = colour self.colour = colour
self.atlas = volume_path self.atlas = volume_path
# load the metadata json as well as the path to stored data files # load the metadata json as well as the path to stored data files
def build_quantifier(self):
# this could potentially be moved into init # this could potentially be moved into init
atlas_root_path = self.config["annotation_volume_directory"] atlas_root_path = self.config["annotation_volume_directory"]
current_atlas_path = self.config["annotation_volumes"][self.atlas]["volume"] current_atlas_path = self.config["annotation_volumes"][self.atlas]["volume"]
...@@ -59,6 +57,7 @@ class PyNutil: ...@@ -59,6 +57,7 @@ class PyNutil:
self.atlas_labels = pd.read_csv(atlas_root_path + atlas_label_path) self.atlas_labels = pd.read_csv(atlas_root_path + atlas_label_path)
print("atlas labels loaded ✅") print("atlas labels loaded ✅")
def get_coordinates(self, nonLinear=True, method="all"): def get_coordinates(self, nonLinear=True, method="all"):
if not hasattr(self, "atlas_volume"): if not hasattr(self, "atlas_volume"):
raise ValueError( raise ValueError(
......
from PyNutil import PyNutil from PyNutil import PyNutil
pnt = PyNutil(settings_file=r"test/test4_2017.json") pnt = PyNutil(settings_file=r"test/test4_2017.json")
pnt.build_quantifier() # pnt.build_quantifier()
pnt.get_coordinates() pnt.get_coordinates()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment