diff --git a/skimage/restoration/unwrap_2d_ljmu.c b/skimage/restoration/unwrap_2d_ljmu.c index 60d0839d..c2c47525 100644 --- a/skimage/restoration/unwrap_2d_ljmu.c +++ b/skimage/restoration/unwrap_2d_ljmu.c @@ -161,6 +161,9 @@ void initialisePIXELs(double *wrapped_image, unsigned char *input_mask, unsigned char *extended_mask_pointer = extended_mask; int i, j; + // Make the initialization deterministic + srand(0); + for (i = 0; i < image_height; i++) { for (j = 0; j < image_width; j++) { pixel_pointer->increment = 0; diff --git a/skimage/restoration/unwrap_3d_ljmu.c b/skimage/restoration/unwrap_3d_ljmu.c index a6c9f464..2f498f66 100644 --- a/skimage/restoration/unwrap_3d_ljmu.c +++ b/skimage/restoration/unwrap_3d_ljmu.c @@ -166,6 +166,9 @@ void initialiseVOXELs(double *WrappedVolume, unsigned char *input_mask, unsigned char *extended_mask_pointer = extended_mask; int n, i, j; + // Make the initialization deterministic + srand(0); + for (n = 0; n < volume_depth; n++) { for (i = 0; i < volume_height; i++) { for (j = 0; j < volume_width; j++) {