morphsnake#
- checkerboard_level_set(shape, square_size=5)#
Return a binary checkerboard level‑set the same shape as shape.
- compute_force(abs_du, image, c0, c1, lambda1, lambda2)#
Return the geodesic force term.
- compute_means(image, mask)#
Compute mean intensity outside/inside the mask.
- morphological_chan_vese(image, shape, num_iter, lambda1=1.0, lambda2=1.0)#
Segment image using MorphACWE.
- Parameters:
image (ndarray[float32] (Z, Y, X)) – 3‑D scalar field to segment. Values should be scaled 0‑1.
num_iter (int) – Number of iterations.
lambda1 (float) – Chan–Vese region weight parameters.
lambda2 (float) – Chan–Vese region weight parameters.
- update_curve(u, aux)#
Binary threshold update of the level‑set function.