diff options
author | Christian C <cc@localhost> | 2025-03-23 15:43:59 -0700 |
---|---|---|
committer | Christian C <cc@localhost> | 2025-03-23 15:43:59 -0700 |
commit | 3cfdec959d9ae00d6b44391cc8daec5ded831295 (patch) | |
tree | 32839f739b9fa8c268c3a339fe79e88f8e50a1f7 /lib/seg | |
parent | 22c32ae8649e8540198942b33d4bab72c4ea7238 (diff) |
Refactor mask field
Diffstat (limited to 'lib/seg')
-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) { |