NAME

     display_mesh - draw the mesh corresponding to the given mesh
     structure on a given image

SYNOPSIS

      #include "mesh.h"

      int display_mesh(Image* inputImage,struct mesh *inmesh);

PATH

     $CVIPHOME/GEOMETRY/warp.c

DESCRIPTION

     The display_mesh() draws the input mesh on  an  image.   The
     "inmesh"  is  a  pointer points to the input mesh structure.
     The "inputImage" is a pointer points to the image structure.

TYPES AND CONSTANTS

     struct mesh_node {
          int x;
          int y;
     };

     struct mesh {
          int width;
          int height;
          struct mesh_node** nodes;
     };

     struct float_pair {
          float x;
          float y;
     };

RETURN VALUES

     The display_mesh() returns  1  when  succeeded  and  0  when
     failed.

EXAMPLE

      #include "mesh.h"
      #include <CVIPio.h>

      main ()
      {
          char           *inputfile;
          Image          *inputImage;
          int       width, height;
          struct mesh    *inmesh;
          print_CVIP("0Input   the   mesh    file    name:    ");
     /*OPTIONAL1*/
          inputfile = getString_CVIP();           /*get a*/
          inmesh = file_to_mesh(inputfile);  /*mesh structure*/

          print_CVIP("0Width of the image: "); /*OPTIONAL2, get*/
          width = getInt_CVIP(10, 1, 1024);       /*an image*/
          print_CVIP("0Height of the image: ");
          height = getInt_CVIP(10, 1, 1024);      /*OPTIONAL2*/
          inputImage = black_pgm(width, height);  /*OPTIONAL2*/

          display_mesh(inputImage, inmesh);
      }

BUGS

     None at this time

SEE ALSO

     file_to_mesh(),     keyboard_to_mesh(),      mesh_to_file(),
     print_mesh();

AUTHOR

     Copyright (C) 1995 SIUE - by Scott Umbaugh and Jianxin Tan.