mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-13 17:45:20 +08:00
Make the initialization deterministic
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user