home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 343_01 / cips.h < prev    next >
C/C++ Source or Header  |  1992-03-16  |  2KB  |  84 lines

  1.  
  2.  
  3.       /************************************************************
  4.       *
  5.       *   file d:\cips\cips.h
  6.       *
  7.       *       Functions: This file contains no functions. It
  8.       *          contains declarations of the data structures used
  9.       *          by the C Image Processing Systems CIPS.
  10.       *
  11.       *   Purpose:
  12.       *      To declare data structures.
  13.       *
  14.       *   Modifications:
  15.       *      June 1990 = created
  16.       *
  17.       **********************************************************/
  18.  
  19. #include <stdio.h>
  20. #include <graph.h>
  21. #include <io.h>
  22. #include <fcntl.h>
  23. #include <dos.h>
  24. #include <math.h>
  25. #include <string.h>
  26. #include <sys\types.h>
  27. #include <sys\stat.h>
  28.  
  29. #define MAX_NAME_LENGTH       80
  30. #define ROWS                 100
  31. #define COLS                 100
  32. #define GRAY_LEVELS          255
  33. #define PREWITT                1
  34. #define KIRSCH                 2
  35. #define SOBEL                  3
  36.  
  37.  
  38.  
  39.  
  40.       /**************************************************
  41.       *
  42.       *   The following struct defines the information
  43.       *   you need to read from the tiff file
  44.       *   header.
  45.       *
  46.       ***************************************************/
  47.  
  48. struct tiff_header_struct{
  49.    short lsb;
  50.    long  bits_per_pixel;
  51.    long  image_length;
  52.    long  image_width;
  53.    long  strip_offset;
  54. };
  55.  
  56.                 /*********************************************
  57.                 *
  58.                 *       The following four unions are used
  59.                 *       to put the bytes from the header
  60.                 *       into either an integer or a floating
  61.                 *       point number.
  62.                 *
  63.                 **********************************************/
  64.  
  65. union short_char_union{
  66.         short s_num;
  67.         char  s_alpha[2];
  68. };
  69.  
  70. union int_char_union{
  71.         int  i_num;
  72.    char i_alpha[2];
  73. };
  74.  
  75. union long_char_union{
  76.         long  l_num;
  77.         char  l_alpha[4];
  78. };
  79.  
  80. union float_char_union{
  81.         float f_num;
  82.         char  f_alpha[4];
  83. };
  84.