Skip to content

Commit

Permalink
fix: if all boundaries are volume bounds, don't repair contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Feb 22, 2025
1 parent 2e34782 commit 6079466
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions igneous/tasks/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,18 @@ def compute_cross_sectional_area(self, vol, bbox, skeletons):
def repair_cross_sectional_area_contacts(self, vol, bbox, skeletons):
from dbscan import DBSCAN

boundaries = [
bbox.minpt.x == vol.bounds.minpt.x,
bbox.maxpt.x == vol.bounds.maxpt.x,
bbox.minpt.y == vol.bounds.minpt.y,
bbox.maxpt.y == vol.bounds.maxpt.y,
bbox.minpt.z == vol.bounds.minpt.z,
bbox.maxpt.z == vol.bounds.maxpt.z,
]

if all(boundaries):
return skeletons

repair_skels = [
skel for skel in skeletons.values()
if np.any(skel.cross_sectional_area_contacts > 0)
Expand Down

0 comments on commit 6079466

Please sign in to comment.