|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T v ┃
Length: 7405 (0x1ced) Types: TextFile Names: »vartools.3«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─ ⟦this⟧ »EUUGD11/euug-87hel/sec1/image/man/vartools.3«
.TH VARTOOLS 3 8/25/86 .CM 1 .SH "NAME" vartools \- iff2var var2iff ascii2var var2ascii trunc scale correlate trunc2 scale2 correlate2 .SH "SYNOPSIS" .nf Compile with -lvartools -lvar -liff -lC (C) Compile with -lvartools -lvar -liff (C++) #include <vartools.h> (C) #include <vartools.h++> (C++) /* This routine gets information from an iff file and constructs a var file from it comments is a null terminated string that sets up the comments for the var file */ void iff2var(FILE *iff_file, FILE *var_file, char *comments); .sp /* This routine gets information from a var file and constructs an iff file from it. This only works with graytone (integer) var files To make a double var file into a graytone one use trunc */ void var2iff(FILE *var_file, FILE *iff_file); .sp /* This converts a file in ascii format to a double var file ascii format is 2 dimensions followed by an appropriate number of doubles followed by comments input is a file pointer to the input file output is a file pointer open for output */ void ascii2var(FILE *input , FILE *output); .sp /* This takes an initialized double image and outputs a file in ascii format described above input is an initialized image output is a file pointer open for output format is the format to output each number */ void var2ascii2(double_image& input , FILE *output , char *format ); .sp /* This is a version of var2ascii that takes an input file rather than an initialized image */ void var2ascii(FILE *input, FILE *output , char *format); .sp /* Truncates an input image (takes floating point to long) needs a file to be output to but does not write to file instead returns the truncated image */ long_image& trunc2( double_image& input , FILE *outfile ); .sp /* Truncates a double image into a graytone (integer image) Takes two files and reads from one to write to the other comment is a comment to be placed on the image */ void trunc( FILE *infile , FILE *outfile, char *comment); .sp /* This takes an image as input and creates another It takes every pixel of the image and multiplies it by the scale and then adds to it the increment. */ double_image& scale2(double scale, double increment, double_image& input, FILE *output_file); .sp /* This takes two files and takes one and puts a scaled and incremented version into the other comment will be placed in the comment for the output image */ void scale(double scale, double increment, FILE *input, FILE *output, char * comment); .sp /* this one takes 2 images and returns an image containing the correlation of the input image with the template image it only returns values for the point where the template lies entirely within the input */ double_image& correlate2(double_image& template, double_image& input, FILE *output_file); .sp /* this one takes 2 image files and returns an image file containing the correlation of the input image with the template image it only returns values for the point where the template lies entirely within the input */ void correlate(FILE *template_file, FILE *input_file, FILE *output_file, char *comment); .sp /* This code places an upper bound on the values of the pixels. If a pixel exceeds the bound it is set to the bound. */ double_image& upper_bound2(double bound, double_image& input, FILE * output_file); .sp /* This code places an lower bound on the values of the pixels. If a pixel exceeds the bound it is set to the bound. */ double_image& lower_bound2(double bound, double_image& input, FILE * output_file); .sp /* This code is like upper_bound2 but with files (for C) */ void upper_bound(double bound, FILE * input_file, FILE * output_file, char *comment); .sp /* This code is like lower_bound2 but with files (for C) */ void lower_bound(double bound, FILE * input_file, FILE * output_file, char *comment); .fi .SH "DESCRIPTION" This is a package of tools to do useful things with var files. I make no claims about the completeness or consistency of this package. It is meant to be used with the var(3) routines and to be called either from C or C++. At the moment it is considerably more convinient to use from C++ with the image(5) package. The routines are as shown below, routines that end with 2 are meant only to be called from C++ with the image(5) package. .IP "iff2var" This is a routine written in C that takes 2 file pointers and retrieves a valid iff file from the first and sends a valid var file with the same information into the second. Any annotation in the iff file is lost. .IP "var2iff" This is the inverse operation to iff2var. It reads a varfile and writes an iff file. Any comments in the varfile are lost. It is also written in C. .IP "ascii2var" This reads in a file in an ascii format. The ascii format is to have the first two things in the file be the length and width of the image. Then each pixel of the image is read in as the ascii representation of a floating point number. Aftern a sufficient number of numbers are read in the rest of the file is considerred to be comments. This ascii format is convinient when constructing templates or transfering data between machines with different floating point formats. .IP "var2ascii" This is the inverse operation of ascii2var, reading in a var file and writing out an ascii file using a supplied format string to format the floating point numbers being output. .IP "var2ascii2" This command is the same as var2ascii except instead of being given a file to work on it takes an image data structure (which may be constructed rather than read in from a file). .IP "trunc2" This command takes in a double image data structure and truncates each of the floating point pixels into and integral pixel. It outputs a graytone image data structure. .IP "trunc" This is the version that works with files instead of data structures. .IP "scale2" This routine takes every pixel of an input data structures, multiplies it by a scaling constant and increments it with an incrementation constant. The combination scale2 trunc2 and var2iff are supposed to be particularly useful for displaying var files. .IP "scale" This is like scale2 but with files instead of data structures. .IP "correlate2" This correlates an image with a template. Both are entered as double image data structures. The output only contains the points where the template did not fall off the edge. .IP "correlate" This is the version of correlate2 with files instead of data structures. .IP "lower_bound2" This routine goes through the pixels of a var image and sets any that go below the bound to the bound. It is meant to limit the range of values of the pixels for inspection or error control. .IP "lower_bound" This is like lowerbound2 but with files instead of image data structures. .IP "upper_bound2" This routine goes through the pixels of a var image and sets any that exceed the bound to the bound. It is meant to limit the range of values of the pixels for inspection or error control. .IP "upper_bound" This is like upper_bound2 but with files instead of image data structures. .SH "FILES" /usr/local/include/vartools.h /usr/local/include/vartools.h++ .SH "SEE ALSO" var(3) var(5) image(5) .SH "DIAGNOSTICS" When something goes wrong in general it will print an error message and dump core. .SH "BUGS" Probably.