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
/
vgmerode
/
vgmerode.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: vgmerode.h
>>>> Author: Pascal ADAM and Greg DONOHOE
>>>> Date Last Updated: Thu Jul 23 16:04:54 1992
>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
#ifndef _vgmerode_h_
#define _vgmerode_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;
/****************************************************************
*
* vgmerode Argument Structure
*
****************************************************************/
typedef struct _vgmerode {
/*
* 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 */
} vgmerode_struct;
vgmerode_struct *vgmerode;
/* -include_additions */
/* -include_additions_end */
/* -include_macros */
#define READINPUT(image,kernel) \
image = readimage(vgmerode->i_file); \
if (image == NULL) { \
(void) fprintf(stderr, "vgmerode: Can not read input image \n"); \
exit(1); /* Quit if bad image */ \
} \
kernel = readimage(vgmerode->k_file); \
if (kernel == NULL) { \
(void) fprintf(stderr, "vgmerode: 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