def bounding_box(neurite): '''Get a neurite's X,Y,Z bounding box''' if is_new_style(neurite): if isinstance(neurite, Section): neurite = Neurite(neurite) return geom.bounding_box(neurite) else: return get_bounding_box(neurite)
def test_get_bounding_box(): box = np.array([[-33.25305769, -57.600172 , 0. ], [ 0. , 0. , 49.70137991]]) bb = mtr.get_bounding_box(tree0) nt.ok_(np.allclose(bb, box))