NAME

     view_Image - choose the appropriate viewer and  displays  an
     image

SYNOPSIS

      #include "CVIPtoolkit.h"
      #include "CVIPview.h"

      void view_Image( Image *inputImage, char *imagename)
      <inputImage> - pointer to the input Image structure
      <imagename> - character string as the image name

PATH

     $CVIPHOME/DISPLAY/view.c

DESCRIPTION

     The view_Image function is a dispatcher of  display_Image(3)
     and  display_RAMImage(3) functions. If the current viewer is
     RamViewer,   the   image    is    displayed    by    calling
     display_RAMImage(3);  otherwise,  it writes the image to the
     disk, and calls display_Image(3). When writing to the  disk,
     it  uses  the  $HOME/.cvip_temp  directory. When used within
     cvipwish/tcl, the temporary images will be removed upon nor-
     mal  termination  of  the program; when used in CVIPlab, the
     temporary images won't be removed automatically, so the user
     is  responsible  to  remove the temporary files on the disk.
     This function WON'T destroy the input Image structure, i.e.,
     it is not necessary to duplicate the image structure.

TYPES AND CONSTANTS

     NONE

RETURN VALUES

     NONE

HISTORY

     History information recorded: None

EXAMPLE

      #include <CVIPtoolkit.h>
      #include <CVIPimage.h>
      #include <CVIPconvert.h>
      #include <CVIPview.h>

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

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

      /* We don't copy the Image structure.
         Stick to this function, it is nice and easy.
       */

      setDisplay_Image("picture", "Default");
      view_Image(cvipImage, inputfile);
      free(inputfile);
      }

SEE ALSO

     libgui, display_Image,  display_RAMImage,  getDisplay_Image,
     setDisplay_Image

AUTHOR

     Copyright (C) 1996 SIUE - by Scott E. Umbaugh  and  Yansheng
     Wei.