next up previous contents index
Next: Related file (external) types Up: Shapes Previous: Shapes   Contents   Index

The structure Shapes

The meaning of the fields is explained above. The fields data_size and data are left to the user.

typedef struct shapes
  char cmt[mw_cmtsize];   /* Comments */
  char name[mw_namesize]; /* Name of the set */
  int nrow;               /* Number of rows (dy) of the image */
  int ncol;               /* Number of columns (dx) of the image */
  int interpolation;      /* Interpolation used for the level lines:
                             0=nearest neighbor, 1=bilinear */
  Shape the_shapes; /* Array of the shapes.
                       The root of the tree is at index 0 */
  int nb_shapes; /* The number of shapes (the size of the array the_shapes) */
  /* Link between pixels and shapes */
  Shape *smallest_shape; /* An image giving for each pixel
                            the smallest shape containing it */
  int data_size;     /* size of data[] in bytes */
  void* data;        /* User defined field (saved). A pointer to something */
} *Shapes;

mw 2004-05-05