def test_sd_from_ball(): dom = domain_from_array(np.ones((10, 10))) radii = np.array([2, 2, 2]) positions = np.array([[3, 3], [3, 7], [7, 7]]) subdomain = subdomain_from_balls(dom, positions, radii) assert subdomain.k == 3 assert (subdomain.size == np.array([9, 9, 9])).all()
def test_from_ball(): """Test the creation of mulitple rois from balls """ dom = domain_from_array(np.ones((10, 10))) radii = np.array([2, 2, 2]) positions = np.array([[3, 3], [3, 7], [7, 7]]) mroi = mroi_from_balls(dom, positions, radii) assert mroi.k == 3 assert (mroi.size == np.array([9, 9, 9])).all()