odf = np.clip(odf, 0, np.inf)
values, indices = local_maxima(odf, sphere.edges)
// If there is only one peak return
if len(indices) == 1:
After Change
// If there is only one peak return
n = len(values)
if n == 0 or (values[0] < 0.):
return np.zeros((0, 3)), np.zeros(0), np.zeros(0, dtype=int)
elif n == 1:
return sphere.vertices[indices], values, indices
odf_min = odf.min()