home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
m
/
morpho.zip
/
morpho
/
src
/
vgmopen
/
vgmopen.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-26
|
4KB
|
117 lines
/*
* Khoros: $Id$
*/
/*
* $Log$
*/
/*
*----------------------------------------------------------------------
*
* Copyright 1992, University of New Mexico. All rights reserved.
* Permission to copy and modify this software and its documen-
* tation only for internal use in your organization is hereby
* granted, provided that this notice is retained thereon and
* on all copies. UNM makes no representations as to the sui-
* tability and operability of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*
* UNM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
* NESS. IN NO EVENT SHALL UNM BE LIABLE FOR ANY SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHAT-
* SOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER-
* FORMANCE OF THIS SOFTWARE.
*
* No other rights, including, for example, the right to redis-
* tribute this software and its documentation or the right to
* prepare derivative works, are granted unless specifically
* provided in a separate license agreement.
*---------------------------------------------------------------------
*/
#include "unmcopyright.h" /* Copyright 1992 by UNM */
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>
>>>> File Name: vgmopen.h
>>>> Author: Pascal ADAM and Greg DONOHOE
>>>> Date Last Updated: Sat Jul 25 11:37:02 1992
>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
#ifndef _vgmopen_h_
#define _vgmopen_h_
#include "vinclude.h"
/* -include_includes */
/* -include_includes_end */
char **av, /* argv and argc used by gparams */
*program; /* a pointer to the program name argv[0] */
int ac;
/****************************************************************
*
* vgmopen Argument Structure
*
****************************************************************/
typedef struct _vgmopen {
/*
* input image (Required infile)
*/
char *i_file; /* input image FILENAME */
int i_flag; /* input image FLAG */
/*
* input kernel (Required infile)
*/
char *k_file; /* input kernel FILENAME */
int k_flag; /* input kernel FLAG */
/*
* output image (Required outfile)
*/
char *o_file; /* output image FILENAME */
int o_flag; /* output image FLAG */
} vgmopen_struct;
vgmopen_struct *vgmopen;
/* -include_additions */
/* -include_additions_end */
/* -include_macros */
#define READINPUT(image,kernel) \
image = readimage(vgmopen->i_file); \
if (image == NULL) { \
(void) fprintf(stderr, "vgmopen: Can not read input image \n"); \
exit(1); /* Quit if bad image */ \
} \
kernel = readimage(vgmopen->k_file); \
if (kernel == NULL) { \
(void) fprintf(stderr, "vgmopen: Can not read input kernel\n"); \
exit(1); /* Quit if bad kernel */ \
}
#define CHECKINPUT(program, image,kernel) \
propertype(program,image,VFF_TYP_1_BYTE,TRUE); \
proper_num_images(program,image,1,TRUE); \
proper_num_bands(program,image,1,TRUE); \
proper_map_enable(program,image,VFF_MAP_OPTIONAL,TRUE); \
propertype(program,kernel,VFF_TYP_4_BYTE,TRUE) ; \
proper_num_images(program,kernel,1,TRUE); \
proper_num_bands(program,kernel,1,TRUE); \
proper_map_enable(program,kernel,VFF_MAP_OPTIONAL,TRUE); \
/* -include_macros_end */
#endif