next up previous contents
Next: Image Indexing Up: Imrects Previous: Image Regions   Contents

Image Types

The image variable type, specified by the vtype field of the imrect structure, can be any (if supported on the machine) one of the following (also indicated is the AIFF [Aivru Image File Format] id used used for file storage):


Table 7.1: AIFF image types
file id Vartype Meaning  
0 char_v 8 bit character image  
1 uchar_v 8 bit unsigned 8 bit characters  
2 short_v 16 bit integer  
3 ushort_v 16 unsigned integer  
4 int_v 32 bit integer  
5 uint_v 32 bit unsigned integer  
6 float_v 32 bit floating point  
7 double_v 64 bit floating point  
8 complex_v struct complex  
9 ptr_v void *  


More specific information relating to the type of data that an image represents can be carried in the imtype field.

The union varptrptr has the following form

typedef union varptrptr
{
    char **char_v;    
    unsigned char **uchar_v;
    short **short_v;    
    unsigned **ushort_v;    
    int **int_v;    
    unsigned int **uint_v;      
    float **float_v;    
    double **double_v;    
    struct complex **complex_v;   
    void ***ptr_v;
    struct vram **vram_v;
} Varptrptr;

So that if an image, called "im" say, is of vtype ushort_v then its image data must be indexed

    im->data

which is itself a double indirection to an unsigned short integer (ie. unsigned short ** ).

Note that the structure complex is defined as follows

typedef struct tcomplex
  {
      Ts_id   ts_id;            /* Tina structure identifier */
      double   x;               /* Don't introduce numerical */
      double   y;               /* instability NAT 27/4/95   */
  }
Complex;


next up previous contents
Next: Image Indexing Up: Imrects Previous: Image Regions   Contents
root 2017-09-20