NAME

     create_image - functions to create simple images

SYNOPSIS

      #include "CVIPtoolkit.h"
      #include "CVIPdrawimg.h"

      Image  *create_rectangle(int  im_width,  int  im_height,int
     start_c,int start_r,int rect_width, int rect_height)
      <im_width> - image width, number of columns
      <im_height> - image height, number of rows
      <start_c> - first column for rectangle
      <start_r> - first row for rectangle
      <rect_width> - width of rectangle
      <rect_height> - rectangle height

      Image  *create_circle(int   im_width,   int   im_height,int
     center_c,int center_r,int radius)
      <im_width> - image width, number of columns
      <im_height> - image height, number of rows
      <center_c> - circle center column coordinate
      <center_r> - circle center rwo coordinate
      <radius> - radius of circle

      Image   *create_line(int   im_width,   int    im_height,int
     start_c,int start_r,int end_c, int end_r)
      <im_width> - image width, number ofcolumns
      <im_height> - image height, number of rows
      <start_c> - first column coordinate of line
      <start_r> - first row coordinate of line
      <end_c> - last column of line
      <end_r> - last row of line

      Image *create_checkboard(int  im_width,  int  im_height,int
     first_c,int first_r,int block_c,int block_r)
      <im_width> - image width, number of columns
      <im_height> - image height, number of rows
      <first_c> - first column of checkerboard
      <first_r> - first row fo checkerboard
      <block_c> - width of checkerboard blocks
      <block_r> - height of checkerboard blocks

PATH

     $CVIPHOME/GEOMETRY/create_image.c

DESCRIPTION

     These functions allow the user to  create  simple  geometric
     binary  images. Each has an associated setup function of the
     form create_<shape>_setup that can be called to  obtain  the
     needed inputs.

TYPES AND CONSTANTS


RETURN VALUES

     An image containing the desired shape.

HISTORY

     History information recorded: None

EXAMPLE

      #include <CVIPtoolkit.h>
      #include <CVIPimage.h>
      #include <CVIPdef.h>
      #include <CVIPdrawimg.h>
      #include <CVIPconvert.h>
      #include <CVIPview.h>
      #define VIEWER "picture"
      #define VIDEO_APP "SunVideo &"

      void main()
      {
      Image *cvipImage;
      IMAGE_FORMAT format;
      char *outputfile;

      setDisplay_Image(VIEWER, "Default");
      /* the following call creates a  image of size 100x100 with
     the rectangle starting at location 8,8 and the width and the
     height of the rectangle equals 64. */
      cvipImage = create_rectangle(100,100,8,8,64,64);
      print_CVIP("\n\t\tEnter the Output File Name:  ");
      outputfile = getString_CVIP();
      view_Image(cvipImage,outputfile);
      write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
      free(outputfile);
      /* the following call creates a image of size 100x100  with
     the  center  of the circle being 25,25 and the radius of the
     circle equals 10 */
      cvipImage = create_circle(100,100,25,25,10);
      print_CVIP("\n\t\tEnter the Output File Name:  ");
      outputfile = getString_CVIP();
      view_Image(cvipImage,outputfile);
      write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
      free(outputfile);
      /* the following call creates a image of size 100x100  with
     the line starting at location 10,10 and ending at 50,50 */
      cvipImage = create_line(100,100,10,10,50,50);
      print_CVIP("\n\t\tEnter the Output File Name:  ");
      outputfile = getString_CVIP();
      view_Image(cvipImage,outputfile);
      write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
      free(outputfile);
      /* the following call creates a image of size 100x100  with
     the checkboard starting at location 10,10 and the width
      and the height of the checkerboard equals 5 */
      cvipImage = create_checkboard(100,100,10,10,5,5);
      print_CVIP("\n\t\tEnter the Output File Name:  ");
      outputfile = getString_CVIP();
      view_Image(cvipImage,outputfile);
      write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,format,1);
      free(outputfile);
      }

SEE ALSO

     libgeometry

AUTHOR

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