.NH 1 "VERROR LIBRARY"
.XS
\s12\*(SN  VERROR LIBRARY\s0
.XE
.sp 2
.NH 2 "INTRODUCTION TO THE VERROR LIBRARY"
.XS
      \*(SN  INTRODUCTION
.XE
.sp 2
.PP
The \fIverror\fP library provides verification routines that perform 
various types of checking of fields in the viff data structure that 
represents Khoros images.  Some routines compare two viff data 
structures to each other, while others compare a characteristic of a 
single viff data structure to a desired value that is passed in. 
They are all frequently used by image processing routines throughout the Khoros image processing library (ipl).
.sp 2
ALL programs that utilize these routines MUST include the statement:
.sp
#include "vinclude.h"
.sp 2
.NH 2 "VERROR UTILITIES"
.XS
      \*(SN  XVERROR UTILITIES
.XE
.sp 2
.NH 3 " match_map_enable()"
.XS
              \*(SN   match_map_enable()
.XE
.sp
.LP
Check to see if two viff files or structures have the same map enable type.
.sp 2
.B
.sp
int match_map_enable(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_map_enable() will return(0).
.LP
=====================================================================
.sp 4
.NH 3 "  match_map_scheme()"
.XS
              \*(SN   match_map_scheme()
.XE
.sp
.LP
Check to see if the two viff data structures have the same mapping scheme.
.sp 2
.B
.sp
int match_map_scheme(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_map_scheme() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 
.NH 3 "  match_map_size()"
.XS
              \*(SN   match_map_size()
.XE
.sp
.LP
Check to see if the two viff data structures have the same row and column size.
.B
.sp
int match_map_size(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_map_size() will return(0).
.br
.LP
=====================================================================
.sp 4
.NH 3 "  match_map_type()"
.XS
              \*(SN   match_map_type()
.XE
.sp
.LP
Check to see if the two viff data structures have the same map data type.
.sp 2
.B
.sp
int match_map_type(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_map_type() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  match_color_model()"
.XS
              \*(SN   match_color_model()
.XE
.sp
.LP
Check to see if the two viff data structures have the same color model.
.sp 2
.B
.sp
int match_color_model(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_color_model() will return(0).
.sp
.LP
=====================================================================
.sp 4
.NH 3 "  match_dim()"
.XS
              \*(SN   match_dim()
.XE
.sp
.LP
Check to see if the two viff data structures have the same location dimension.
.sp 2
.B
.sp
int match_dim(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_dim() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  match_encode_scheme()"
.XS
              \*(SN   match_encode_scheme()
.XE
.sp
.LP
Check to see if the two viff data structures have the same data storage
encoding scheme.
.sp 2
.B
int match_encode_scheme(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_encode_scheme() will return(0).
.sp
.LP
=====================================================================
.sp 4
.NH 3 "  match_loc_type()"
.XS
              \*(SN   match_loc_type()
.XE
.sp
.LP
Check to see if the two viff data structures have the same location type.
.sp 2
.B
int match_loc_type(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_loc_type() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  match_num_bands()"
.XS
              \*(SN   match_num_bands()
.XE
.sp
.LP
Check to see if the two viff data structures number of data bands per image.
.sp 2
.B
int match_num_bands(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_num_bands() will return(0).
.sp
.LP
=====================================================================
.sp 4
.NH 3 "  match_num_images()"
.XS
              \*(SN   match_num_images()
.XE
.sp
.LP
Check to see if the two viff data structures number of images.
.sp 2
.B
int match_num_images(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, match_num_images() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  matchsize()"
.XS
              \*(SN   matchsize()
.XE
.sp
.LP
Check to see if the two viff data structures number are the same size.
.sp 2
.B
int matchsize(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, matchsize() will return(0).
.sp
.LP
=====================================================================
.sp 4
.NH 3 "  matchtype()"
.XS
              \*(SN   matchtype()
.XE
.sp
.LP
Check to see if the two viff data structures number are of the same data type.
.sp 2
.B
int matchtype(prog, img1, img2, exit_flag)
.br
char *prog;
.br
struct xvimage *img1,*img2;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP img1: 
The first viff data structure
.IP img2:
The second viff data structure
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, matchtype() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  proper_map_rowsize()"
.XS
              \*(SN   proper_map_rowsize()
.XE
.sp
.LP
Check to see if map row size is correct.
.sp 2
.B
int proper_map_rowsize(prog, image, proper_row_size, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_row_size;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its row size checked
.IP proper_row_size:
The desired row size
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_map_rowsize() will return(0).
.sp
.LP
=====================================================================
.sp 4
.NH 3 "  proper_map_enable()"
.XS
              \*(SN   proper_map_enable()
.XE
.sp
.LP
Check to see if map enable value is correct.
.sp 2
.B
int proper_map_enable(prog, image, proper_map_enable, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_map_enable;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its map enable value checked
.IP proper_map_enable:
The desired map enable value
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_map_enable() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  proper_map_scheme()"
.XS
              \*(SN   proper_map_scheme()
.XE
.sp
.LP
Check to see if mapping scheme is correct.
.sp 2
.B
int proper_map_scheme(prog, image, proper_map_scheme, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_map_scheme;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its map scheme checked
.IP proper_map_scheme:
The desired mapping scheme
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_map_scheme() will return(0).
.sp
.LP
=====================================================================
.sp
.NH 3 "  proper_map_size()"
.XS
              \*(SN   proper_map_size()
.XE
.sp
.LP
Check to see if map row and column sizes are correct.
.sp 
.B
int proper_map_size(prog, image, proper_col_size, proper_row_size, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_col_size;
.br
unsigned long proper_row_size;
.br
int exit_flag;
.br
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its row and column sizes checked
.IP proper_col_size:
The desired col size
.IP proper_row_size:
The desired row size
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_map_size() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  proper_map_type()"
.XS
              \*(SN   proper_map_type()
.XE
.sp
.LP
Check to see if map data type is correct.
.sp 
.B
int proper_map_type(prog, image, proper_map_type, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_map_type;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its map type checked
.IP proper_map_type:
The desired map data type
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_map_type() will return(0).
.br
.LP
=====================================================================
.sp 4
.NH 3 "  proper_color_model()"
.XS
              \*(SN   proper_color_model()
.XE
.sp
.LP
Check to see if color space model is correct.
.sp 2
.B
int proper_color_model(prog, image, proper_color_model, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_color_model;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its color model checked
.IP proper_color_model:
The desired color model
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_color_model() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  proper_num_bands()"
.XS
              \*(SN   proper_num_bands()
.XE
.sp
.LP
Check to see if number of data bands correct.
.sp 2
.B
int proper_num_bands(prog,image,proper_number,exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_number;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its number of bands checked
.IP proper_number:
The desired number of data bands
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_num_bands() will return(0).
.sp
.LP
=====================================================================
.sp 4
.NH 3 "  proper_num_images()"
.XS
              \*(SN   proper_num_images()
.XE
.sp
.LP
Check to see if map row size is correct.
.sp 2
.B
int proper_num_images(prog, image, proper_number, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_number;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its number of images checked
.IP proper_number:
The desired number of images
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_num_images() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  proper_dim()"
.XS
              \*(SN   proper_dim()
.XE
.sp
.LP
Check to see if location dimension is correct.
.sp 2
.B
int proper_dim(prog, image, proper_loc_dim, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_loc_dim;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its location dimension checked
.IP proper_loc_dim:
The desired location dimension
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_dim() will return(0).
.sp
.LP
=====================================================================
.sp 4
.NH 3 "  proper_encode_scheme()"
.XS
              \*(SN   proper_encode_scheme()
.XE
.sp
.LP
Check to see if encoding scheme is correct.
.sp 2
.B
int proper_encode_scheme(prog, image, proper_enc_scheme, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_enc_scheme;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its encoding scheme checked
.IP proper_enc_scheme:
The desired encoding scheme
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_encode_scheme() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  proper_loc_type()"
.XS
              \*(SN   proper_loc_type()
.XE
.sp
.LP
Check to see if location type is correct - implied or explicit.
.sp 2
.B
int proper_loc_type(prog, image, proper_loc_type, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_loc_type;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have its location type checked
.IP proper_loc_type:
The desired location type
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_loc_type() will return(0).
.sp
.LP
=====================================================================
.sp 2
.NH 3 "  propersize()"
.XS
              \*(SN   propersize()
.XE
.sp
.LP
Check to see if viff data is of the correct size.
.sp 
.B
int propersize(prog, image, proper_col_size, proper_row_size, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_col_size;
.br
unsigned long proper_row_size;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have the size of its data checked
.IP proper_col_size:
The desired column size
.IP proper_row_size:
The desired row size
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, propersize() will return(0).
.sp
.LP
=====================================================================
.bp
.sp 2
.NH 3 "  propertype()"
.XS
              \*(SN   propertype()
.XE
.sp
.LP
Check to see if the viff data is of the correct data type.
.sp 
.B
int proper_map_rowsize(prog, image, proper_data_type, exit_flag)
.br
char *prog;
.br
struct xvimage *image;
.br
unsigned long proper_data_type;
.br
int exit_flag;
.sp
.R 
.LP
-- -- -- -- -- -- -- -- -- -- -- -- -- -- --  explanation of arguments  -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
.sp
.IP prog: 10
Program name, or argv[0]
.IP image: 
The viff data structure to have the type of its data checked
.IP proper_data_type:
The desired data type
.IP exit_flag:
If exit_flag is true and match fails, an error message will be printed and exit
is called.
If exit_flag is false and match fails, proper_map_rowsize() will return(0).
.br
.LP
=====================================================================
