Skip to content

Commit

Permalink
bug: integrate upds to whole-brain (#88)
Browse files Browse the repository at this point in the history
Co-authored-by: anna-grim <[email protected]>
  • Loading branch information
anna-grim and anna-grim authored Apr 1, 2024
1 parent 7895460 commit 9c77a88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/deep_neurographs/neurograph.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def generate_proposals(
"""
self.init_kdtree()
self.reset_proposals()
self.proposals = dict()
existing_connections = dict()
doubles = set()
Expand Down Expand Up @@ -223,6 +224,10 @@ def generate_proposals(
if optimize:
self.run_optimization()

def reset_proposals(self):
for i in self.nodes:
self.nodes[i]["proposals"] = set()

def set_proposals_per_leaf(self, proposals_per_leaf):
self.proposals_per_leaf = proposals_per_leaf

Expand Down
4 changes: 4 additions & 0 deletions src/deep_neurographs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ def open_tensorstore(path, driver):
).result()
if driver == "neuroglancer_precomputed":
return arr[ts.d["channel"][0]]
elif driver == "zarr":
arr = arr[0, 0, :, :, :]
arr = arr[ts.d[0].transpose[2]]
arr = arr[ts.d[0].transpose[1]]
return arr


Expand Down

0 comments on commit 9c77a88

Please sign in to comment.