Make the initialization deterministic

This commit is contained in:
Johannes Schönberger
2014-12-16 00:54:32 +01:00
parent 8a790bf884
commit 1da86def59
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -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;
+3
View File
@@ -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++) {