NAME
display_RAMImage - an X-based image viewer used in CVIPtools
SYNOPSIS
#include "CVIPtoolkit.h"
#include "CVIPdef.h"
#include "CVIPview.h"
void display_RAMImage(Image *inputImage, char *name)
<inputImage> - pointer to the input Image structure
<name> - character string as the image name
PATH
$CVIPHOME/DISPLAY/xview.c
DESCRIPTION
display_RAMImage(3) is the X-based image viewer used in
CVIPtools. This function will not release the input Image
structure, so there is no need to duplicate the Image before
calling this function. The functionalities available at this
point include: resize, change the aspect-ratio, revert to
original image, rotate the image by 90 degrees clockwise or
counter-clockwise, horizontal and vertical flip. Most com-
mands are made compatible with xv(1) to favor users familar
with xv(1).
Button 1 press and drag
--- draw a selection box
Button 1 click out of the selection box
--- unselect of subimage
Button 1 press and drag on selection box
--- move selection box
Button 2 press
--- display information about the image
right/left arrow
--- move selection box one pixel right/left
up/down arrow
--- move selection box one pixel up/down
shift right/left arrow
--- enlarge/shrink selection box one pixel horizontally
shift up/down
--- enlarge/shrink selection box one pixel vertically
Resizing image:
m maximize image to whole screen
M maximize image and retains original aspect-ratio
> double size image
< half size image
. enlarge image by 10%
, shrink image by 10%
Changing aspect-ratio:
a re-aspect-ratio using shorter side
A re-aspect-ratio using longer side
4 re-aspect-ratio to 43 using shorter side
$ re-aspect-ratio to 43 using longer side
Rotation:
t turn image 90 degrees clockwise
T turn image 90 degrees counter-clockwise
Flip:
h horizontal flip
v vertical flip
Others:
n, <Enter> revert to original image
q,Q,Ctr-C quit the RamViewer
?, i, H display the help message
In addition, the event of mounse clicks and movement are
also sent to the window manager, and this infomation can be
used for communication with other software. Here, it is used
for the copy_paste, feature extraction, ang geometry
transformation in the GUI.
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);
/* Hmm, I don't copy the Image structure.
We can also view the image by calling view_Image, but
we want to use display_RAMImage intentionally.
Enjoy the image, and play the commands with
this image.
*/
display_RAMImage(cvipImage, inputfile);
free(inputfile);
}
SEE ALSO
libdisplay, display_Image(3), getDisplay_Image(3),
setDisplay_Image(3), view_Image(3), picture(1)
AUTHOR
Copyright (C) 1996 SIUE - by Scott E. Umbaugh, Kun Luo and
Yansheng Wei.