NAME

     display_Image, setDisplay_Image, getDisplay_Image - function
     suites  for displaying an image by executing a shell command
     or internal function call

SYNOPSIS

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

      void  display_Image(const  char  *image_name,  IMAGE_FORMAT
     format);
      <image_name> - name of the image file
      <format> - the image format

      void setDisplay_Image(char *viewer, char *format);
      <viewer> - viewer name
      <format> - intermediate image format for display

      char *getDisplay_Image(void);

PATH

     $(CVIPHOME)/DISPLAY/display.c

DESCRIPTION

     These three functions are usually used in  conjunction  with
     view_Image(3)  and  display_RAMImage(3)  for  the purpose of
     displaying     an     image.     setDisplay_Image(3)     and
     getDisplay_Image(3)  are  used  to  set  and get the program
     (viewer) used to display an image.  display_Image(3) is used
     to  display  an image stored on the disk using the specified
     viewer.

     Since usual external  viewers  can  not  display  some  CVIP
     specific  image  formats  (such  as  FFT spectrum with float
     data), The second parameter for setDisplay_Image(3) is  used
     to   perform   necessary  conversion  before  the  image  is
     displayed. With  a  fully  functional  viewer,   the  second
     parameter can be set to "Default", or a NULL pointer, and no
     conversion will be performed.

     One special case is when the display program is set as "Ram-
     Viewer", the RAM viewer is used. The currently available RAM
     viewer is display_RAMImage(3) for the X windows system.

     Usually, the user doesn't dirrectly call display_Image(3) or
     display_RAMImage(3).    Instead,   view_Image(3)  should  be
     called, which automatically decides which function should be
     called based on the viewer choice.

TYPES AND CONSTANTS

     NONE

RETURN VALUES

     getDisplay_Image(3):  a string of the current  viewer;  oth-
     ers: void

HISTORY

     History information recorded: None

EXAMPLE

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

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

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

      /* Note the difference with view_Image & display_RAMImage,
         The image is not even read, and the only thing that
         display_Image does is call a shell command to display
         the image. Usually you should call view_Image(3),
         instead of display_Image(3).
       */

      setDisplay_Image("picture", "Default");
      /* You can use setDisplay_Image("xv", "JPG") to sepcify
         that you want to use "xv" as the viewer, and use JPG
         as the image format for display. If the second
         parameter is NULL or "Default", the original image
         format of the image is used, which might not be
         displable on some systems. For example, there is
         currently no viewer on Windows95/NT to display VIP
         images.
       */
      display_Image(inputfile, format);
      free(inputfile);
      }

BUGS

     None at this time

SEE ALSO

     libdisplay, view_Image(3), display_RAMImage(3).

AUTHOR

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