|
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: 4189 (0x105d) Types: TextFile Names: »vartools.h++«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki └─ ⟦this⟧ »EUUGD11/euug-87hel/sec1/image/vartools/vartools.h++«
/* This is the header file for all the utilities supplied in the vartools library assumes that stdio.h has been included */ #ifndef VARTOOLS_H #define VARTOOLS_H // needs this include file to have the image routines definition make sense #include <double_image.h++> #include <long_image.h++> /* 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); /* 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); /* 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); /* 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 ); /* This is a version of var2ascii that takes an input file rather than an initialized image */ void var2ascii(FILE *input, FILE *output , char *format); /* 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 ); /* 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); /* 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); /* 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); /* 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); /* 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); /* 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); /* 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); /* This code is like upper_bound2 but with files (for C) */ void upper_bound(double bound, FILE * input_file, FILE * output_file, char *comment); /* This code is like lower_bound2 but with files (for C) */ void lower_bound(double bound, FILE * input_file, FILE * output_file, char *comment); #endif VARTOOLS_H /* Copyright (C) 1986, David Sher in the University of Rochester Permission is granted to any individual or institution to use, copy, or redistribute this software so long as it is not sold for profit, provided this copyright notice is retained. */