/*********************************************** * * file d:\cips\segment2.c * * Functions: This file contains * * * * * * * * Purpose: * * External Calls: * wtiff.c - round_off_image_size * create_file_if_needed * write_array_into_tiff_image * tiff.c - read_tiff_header * rtiff.c - read_tiff_image * numcvrt.c - get_integer * * * Modifications: * 5 December 1992 - created * *************************************************/ #include "cips.h" short skeleton01[3][3] = {{1, 1, 1}, {0, 1, 1}, {0, 0, 1}}; short skeleton02[3][3] = {{1, 0, 0}, {1, 1, 0}, {1, 1, 1}}; short skeleton03[3][3] = {{0, 0, 1}, {0, 1, 1}, {1, 1, 1}}; short skeleton04[3][3] = {{1, 1, 1}, {1, 1, 0}, {1, 0, 0}}; short skeleton05[3][3] = {{1, 1, 1}, {0, 1, 0}, {0, 0, 0}}; short skeleton06[3][3] = {{1, 0, 0}, {1, 1, 0}, {1, 0, 0}}; short skeleton07[3][3] = {{0, 0, 1}, {0, 1, 1}, {0, 0, 1}}; short skeleton08[3][3] = {{0, 0, 0}, {0, 1, 0}, {1, 1, 1}}; short skeleton09[3][3] = {{1, 1, 1}, {1, 1, 1}, {0, 0, 0}}; short skeleton10[3][3] = {{0, 0, 0}, {1, 1, 1}, {1, 1, 1}}; short skeleton11[3][3] = {{1, 1, 0}, {1, 1, 0}, {1, 1, 0}}; short skeleton12[3][3] = {{0, 1, 1}, {0, 1, 1}, {0, 1, 1}}; short skeleton13[3][3] = {{1, 1, 0}, {1, 1, 0}, {0, 0, 0}}; short skeleton14[3][3] = {{0, 1, 1}, {0, 1, 1}, {0, 0, 0}}; short skeleton15[3][3] = {{0, 0, 0}, {1, 1, 0}, {1, 1, 0}}; short skeleton16[3][3] = {{0, 0, 0}, {0, 1, 1}, {0, 1, 1}}; short skeleton17[3][3] = {{0, 1, 0}, {1, 1, 0}, {0, 0, 0}}; short skeleton18[3][3] = {{0, 1, 0}, {0, 1, 1}, {0, 0, 0}}; short skeleton19[3][3] = {{0, 0, 0}, {1, 1, 0}, {0, 1, 0}}; short skeleton20[3][3] = {{0, 0, 0}, {0, 1, 1}, {0, 1, 0}}; /******************************************* * * skeleton(.. * * This function performs the range operation. * *******************************************/ skeleton(in_name, out_name, the_image, out_image, il, ie, ll, le, value) char in_name[], out_name[]; int il, ie, ll, le; short the_image[ROWS][COLS], out_image[ROWS][COLS], value; { char namme[80]; int a, b, big_count, count, i, j, k, l, not_finished, length, width; short temp[3][3]; struct tiff_header_struct image_header; /********************************************** * * Allocate the elements array large enough * to hold size*size shorts. * **********************************************/ create_file_if_needed(in_name, out_name, out_image); read_tiff_image(in_name, the_image, il, ie, ll, le); /*************************** * * Loop over image array * ****************************/ big_count = 0; not_finished = 1; while(not_finished){ count = 0; printf("\n"); for(i=1; i