## NAME

         divide_Image - divides two images

## SYNOPSIS

          #include "CVIPtoolkit.h"
          #include "CVIPimage.h"
          #include "CVIPmatrix.h"
          #include "CVIPdef.h"
          #include "CVIParithlogic.h"

          Image *divide_Image(Image *inputImage1,Image *inputImage2,
          CVIP_BOOLEAN zero2num)

          <inputImage1> - pointer to an Image structure
          <inputImage2> - pointer to an Image structure
          <zero2num>    - method of handling 0s in denominator

## PATH

         $CVIPHOME/ARITHLOGIC/arithlogic.c

## DESCRIPTION

         This function performs bitwise division of two images.  Data
         type  of each image is promoted to float, where needed. Com-
         plex matrices are supported. If zero2num  ==  CVIP_YES,  the
         numerator  data  is  used in the resulting image in case the
         denominator is 0; otherwise, the resulting image data is set
         to 0.

## TYPES AND CONSTANTS

         NONE

## RETURN VALUES

         The divided  Image  pointer  on  success;  a  (Image  *)NULL
         pointer on failure

## HISTORY

         History information recorded: None

## EXAMPLE

          #include <CVIPtoolkit.h>
          #include <CVIPimage.h>
          #include "CVIParithlogic.h"

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

          setDisplay_Image("picture", "Default");

          print_CVIP("\n\t\tEnter the numerator File Name:");
          inputfile =(char *) getString_CVIP();
          format = getFormat_CVIP(inputfile);
          cvipImage = (Image *)read_Image(inputfile,1);
          view_Image(cvipImage, inputfile);
          free(inputfile);

          print_CVIP("\n\t\tEnter the denominator File Name:");
          inputfile =(char *) getString_CVIP();
          format = getFormat_CVIP(inputfile);
          cvipImage1 = (Image *)read_Image(inputfile,1);
          view_Image(cvipImage1, inputfile);
          free(inputfile);

          /* if the denominator is 0, set the numerator to 0*/
          cvipImage = divide_Image(cvipImage,cvipImage1,CVIP_NO);
          print_CVIP("\n\t\tEnter the Output File Name:  ");
          outputfile = getString_CVIP();
          view_Image(cvipImage,outputfile);
          write_Image(cvipImage,outputfile,CVIP_NO,CVIP_NO,VIP,1);
          free(outputfile);
          }

## SEE ALSO

         libarithlogic

## AUTHOR

         Copyright (C) 1996 SIUE - by Scott E. Umbaugh,  Greg  Hance,
         and Kun Luo.