Skip to content

Commit

Permalink
fix: handle different types of input to cross sectional area
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Aug 2, 2024
1 parent a1d20f8 commit 3a289bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kimimaro/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,14 @@ def cross_sectional_area_helper(skel, binimg, roi):
cross_sectional_area_helper
)

for skel in skeletons.values():
if isinstance(skeletons, Skeleton):
skelitr = [ skeletons ]
elif isinstance(skeletons, dict):
skelitr = skeletons.values()
else:
skelitr = iter(skeletons)

for skel in skelitr:
add_property(skel, xs_prop)
add_property(skel, xs_contact_prop)

Expand Down

0 comments on commit 3a289bc

Please sign in to comment.