aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-22 22:27:40 -0700
committerChristian C <cc@localhost>2025-03-22 22:27:40 -0700
commit16422831ed49c573c1b8a43ba907bceb00fd5eea (patch)
tree1c2d86d5eecf6d1b7b4951f0b20f8c86e6939ac2 /src
parent123464e36f2a151d820e08db7b4b426ca2b3657a (diff)
Named Types
Diffstat (limited to 'src')
-rw-r--r--src/prog.c10
-rw-r--r--src/visual.c14
2 files changed, 12 insertions, 12 deletions
diff --git a/src/prog.c b/src/prog.c
index f23da54..57bb93d 100644
--- a/src/prog.c
+++ b/src/prog.c
@@ -86,8 +86,8 @@ int main(int argc, char** argv)
//-----------------------------------------------
char** file_list = NULL;
uint32_t width, height;
- uint16_t starting_label = 1;
- uint16_t *masks = NULL;
+ ImageMaskData_t starting_label = 1;
+ ImageMaskData_t *masks = NULL;
// Expect a directory to be passed as the first argument
if (directory != NULL) {
// Ensure the directory exists
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
//-----------------------------------------------
//-PROCESS-TIFF-TO-LABELS------------------------
//-----------------------------------------------
- uint16_t *file_labels = tif_to_labels(fpath, &width, &height, &starting_label);
+ ImageMaskData_t *file_labels = tif_to_labels(fpath, &width, &height, &starting_label);
if (file_labels == NULL) {
free(fpath);
free(file_list[index]);
@@ -198,12 +198,12 @@ int main(int argc, char** argv)
//-SAVE-MASK-AS-BINARY-AND-PNG-------------------
//-----------------------------------------------
if (masks != NULL) {
- struct bitmap_t* bitmap = uint16_to_bitmap(masks, width, height);
+ struct bitmap_t* bitmap = image_mask_data_to_bitmap(masks, width, height);
if (bitmap != NULL) {
save_png(bitmap, png_file);
free(bitmap);
}
- write_array(bin_file, masks, width*height*sizeof(uint16_t));
+ write_array(bin_file, masks, width*height*sizeof(ImageMaskData_t));
free(masks);
}
TIME(ts_g_end);
diff --git a/src/visual.c b/src/visual.c
index ac6f63d..b41267b 100644
--- a/src/visual.c
+++ b/src/visual.c
@@ -87,8 +87,8 @@ int main(int argc, char** argv)
//-----------------------------------------------
char** file_list = NULL;
uint32_t width, height;
- uint16_t starting_label = 1;
- uint16_t *masks = NULL;
+ ImageMaskData_t starting_label = 1;
+ ImageMaskData_t *masks = NULL;
// Expect a directory to be passed as the first argument
if (directory != NULL) {
// Ensure the directory exists
@@ -118,7 +118,7 @@ int main(int argc, char** argv)
//-----------------------------------------------
//-PROCESS-TIFF-TO-LABELS------------------------
//-----------------------------------------------
- uint16_t *file_labels = tif_to_labels(fpath, &width, &height, &starting_label);
+ ImageMaskData_t *file_labels = tif_to_labels(fpath, &width, &height, &starting_label);
if (file_labels == NULL) {
free(fpath);
free(file_list[index]);
@@ -280,12 +280,12 @@ int main(int argc, char** argv)
masks[x + y*width] >>= 4;
}
}
- struct bitmap_t* bitmap = uint16_to_bitmap(masks, width, height);
+ struct bitmap_t* bitmap = image_mask_data_to_bitmap(masks, width, height);
if (bitmap != NULL) {
save_png(bitmap, png_file);
free(bitmap);
}
- write_array(bin_file, masks, width*height*sizeof(uint16_t));
+ write_array(bin_file, masks, width*height*sizeof(ImageMaskData_t));
free(masks);
}
CloseWindow();
@@ -294,12 +294,12 @@ int main(int argc, char** argv)
//-SAVE-MASK-AS-BINARY-AND-PNG-------------------
//-----------------------------------------------
if (masks != NULL) {
- struct bitmap_t* bitmap = uint16_to_bitmap(masks, width, height);
+ struct bitmap_t* bitmap = image_mask_data_to_bitmap(masks, width, height);
if (bitmap != NULL) {
save_png(bitmap, png_file);
free(bitmap);
}
- write_array(bin_file, masks, width*height*sizeof(uint16_t));
+ write_array(bin_file, masks, width*height*sizeof(ImageMaskData_t));
free(masks);
}
#endif