diff options
author | Christian C <cc@localhost> | 2025-03-23 15:34:48 -0700 |
---|---|---|
committer | Christian C <cc@localhost> | 2025-03-23 15:34:48 -0700 |
commit | 22c32ae8649e8540198942b33d4bab72c4ea7238 (patch) | |
tree | 946e173c4ab362ec88f21854e8613a21c330a6e1 /lib/seg/util.c | |
parent | 981e8bfd12f79cb469bb54a915230eda6dafab41 (diff) |
Userspace types
Diffstat (limited to 'lib/seg/util.c')
-rw-r--r-- | lib/seg/util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/seg/util.c b/lib/seg/util.c index 2952952..6eee1a2 100644 --- a/lib/seg/util.c +++ b/lib/seg/util.c @@ -202,7 +202,7 @@ void closeup(ImageMaskData_t** mask, uint32_t width, uint32_t height, size_t num // Combine Label Masks // For all empty spaces in the destination, put the extra label if it exists // Allocates an array if destination is unallocated -struct ImageMask* combine_masks(struct ImageMask *destination, struct ImageMask *extra_labels) +ImageMask* combine_masks(ImageMask *destination, ImageMask *extra_labels) { if (destination == NULL) { destination = create_image_mask(extra_labels->width, extra_labels->height); @@ -220,7 +220,7 @@ struct ImageMask* combine_masks(struct ImageMask *destination, struct ImageMask // Process Tif File to Labels // width, height will be overwritten with image dimensions // starting_label_p will be incremented for each label found in the image -struct ImageMask* tif_to_labels(char* tif_file_name, uint32_t *width, uint32_t *height, ImageMaskData_t *starting_label_p) +ImageMask* tif_to_labels(char* tif_file_name, uint32_t *width, uint32_t *height, ImageMaskData_t *starting_label_p) { TIFFSetWarningHandler(TiffDummyHandler); //-TIFF-IMAGE-OPEN------------------------------- @@ -268,7 +268,7 @@ struct ImageMask* tif_to_labels(char* tif_file_name, uint32_t *width, uint32_t * //-FLOOD-FILL-SEGMENTATION----------------------- //-CONTIGUOUS-REGION-FINDING--------------------- - struct ImageMask *im_data = create_image_mask((size_t)*width, (size_t)*height); + ImageMask *im_data = create_image_mask((size_t)*width, (size_t)*height); if (im_data == NULL) { fprintf(stderr, "Memory allocation error\n"); free(image_data); @@ -316,13 +316,13 @@ struct ImageMask* tif_to_labels(char* tif_file_name, uint32_t *width, uint32_t * } // Convert mask to bitmap -struct bitmap_t* image_mask_data_to_bitmap(ImageMaskData_t* buffer, uint32_t width, uint32_t height) +Bitmap* image_mask_data_to_bitmap(ImageMaskData_t* buffer, uint32_t width, uint32_t height) { - struct pixel_t* out_buffer = (struct pixel_t*)calloc(width*height, sizeof(struct pixel_t)); + Pixel* out_buffer = (Pixel*)calloc(width*height, sizeof(Pixel)); if (out_buffer == NULL) { return NULL; } - struct bitmap_t* bitmap = (struct bitmap_t*)malloc(sizeof(struct bitmap_t)); + Bitmap* bitmap = (Bitmap*)malloc(sizeof(Bitmap)); if (bitmap == NULL) { free(out_buffer); return NULL; |