diff --git a/kimimaro/utility.py b/kimimaro/utility.py index c01d177..ab64dfc 100644 --- a/kimimaro/utility.py +++ b/kimimaro/utility.py @@ -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)