diff options
Diffstat (limited to 'lib/seg/util.c')
-rw-r--r-- | lib/seg/util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/seg/util.c b/lib/seg/util.c index 6eee1a2..afced0a 100644 --- a/lib/seg/util.c +++ b/lib/seg/util.c @@ -209,8 +209,8 @@ ImageMask* combine_masks(ImageMask *destination, ImageMask *extra_labels) } for (size_t y = 0; y < destination->height; y++) { for (size_t x = 0; x < destination->width; x++) { - if (destination->mask[y][x] == 0) { - destination->mask[y][x] = extra_labels->mask[y][x]; + if (destination->image[y][x] == 0) { + destination->image[y][x] = extra_labels->image[y][x]; } } } @@ -275,21 +275,21 @@ ImageMask* tif_to_labels(char* tif_file_name, uint32_t *width, uint32_t *height, TIFFClose(tif); return NULL; } - if (im_data->mask == NULL) { + if (im_data->image == NULL) { fprintf(stderr, "Memory allocation error\n"); free_image_mask(im_data); free(image_data); TIFFClose(tif); return NULL; } - if (im_data->mask[0] == NULL) { + if (im_data->image[0] == NULL) { fprintf(stderr, "Memory allocation error\n"); free_image_mask(im_data); free(image_data); TIFFClose(tif); return NULL; } - ImageMaskData_t *labels = im_data->mask[0]; + ImageMaskData_t *labels = im_data->image[0]; /* labels = (ImageMaskData_t*)calloc((*width)*(*height),sizeof(ImageMaskData_t)); if (labels == NULL) { |