libtpcimgp
 All Data Structures Files Functions Variables Typedefs Defines
Defines | Functions | Variables
libtpcimgp.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include "img.h"
#include "imgfile.h"
#include "include/imgproc.h"
Include dependency graph for libtpcimgp.c:

Go to the source code of this file.

Defines

#define LIB_NAME   "libtpcimgp"
#define IMGARITHM   1
#define IMGTRANSFORM   2
#define IMGFILTER   3
#define MAXVAL   100000;
#define ARITHMERROR   100
#define TRANSFORMERROR   200

Functions

int test_imgArithm (IMG *img1, IMG *img2)
int test_imgTransform (IMG *img1, IMG *img2, int zoom)
void drawCross (IMG *img)
void drawUnSymmetricCross (IMG *img)
void print_usage ()
int main (int argc, char *argv[])

Variables

int VERBOSE = 0

Define Documentation

#define ARITHMERROR   100

Definition at line 50 of file libtpcimgp.c.

Referenced by test_imgArithm().

#define IMGARITHM   1

Serial numbers for function names.

Definition at line 30 of file libtpcimgp.c.

Referenced by main().

#define IMGFILTER   3

Definition at line 32 of file libtpcimgp.c.

#define IMGTRANSFORM   2

Definition at line 31 of file libtpcimgp.c.

Referenced by main().

#define LIB_NAME   "libtpcimgp"

Copyright (c) 2004-2007 by Turku PET Centre

File: libtpcimgp.c

Purpose: methods for testing functions in the library libtpcimgp, and for printing out libtpcimgp information, such as Readme, History and build information.

NOTICE! This program should always have the same version with the library.

Version:

2005-02-22 1.0.0 Jarkko Johansson 2005-04-26 1.1.0 Jarkko Johansson 2005-06-09 1.2.0 Kaisa Sederholm 2006-06-19 1.2.1 KS 2006-08-08 1.3.0 KS 2006-10-30 1.3.1 VO 2007-02-02 1.3.2 VO Library name.

Definition at line 27 of file libtpcimgp.c.

Referenced by print_usage().

#define MAXVAL   100000;

Definition at line 48 of file libtpcimgp.c.

#define TRANSFORMERROR   200

Definition at line 51 of file libtpcimgp.c.

Referenced by test_imgTransform().


Function Documentation

void drawCross ( IMG *  img)

Function for testing library functions related to image transforms. imgGaussKernel, imgFreeKernel, imgConvolute

Returns:
0 if testing was successfull Function for drawing a cros on the center of the image region, of width 2 pixels and value 1.

Definition at line 665 of file libtpcimgp.c.

void drawUnSymmetricCross ( IMG *  img)

Function for drawing an unsymmetric cross for testing image transformation functions.

Definition at line 685 of file libtpcimgp.c.

Referenced by test_imgArithm(), and test_imgTransform().

int main ( int  argc,
char *  argv[] 
)

Definition at line 199 of file libtpcimgp.c.

References IMGARITHM, IMGTRANSFORM, libtpcimgp_print_build(), libtpcimgp_print_dhistory(), libtpcimgp_print_dreadme(), libtpcimgp_print_history(), libtpcimgp_print_readme(), print_usage(), test_imgArithm(), test_imgTransform(), and VERBOSE.

Here is the call graph for this function:

void print_usage ( )

Function for printing the usage information of the libtpcimgp test program.

Definition at line 723 of file libtpcimgp.c.

References LIB_NAME, and libtpcimgp_print_build().

Referenced by main().

Here is the call graph for this function:

int test_imgArithm ( IMG *  img1,
IMG *  img2 
)

Function for testing library functions related to image arithmetics.

Definition at line 326 of file libtpcimgp.c.

References ARITHMERROR, drawUnSymmetricCross(), imgArithm(), imgArithmConst(), and VERBOSE.

Referenced by main().

Here is the call graph for this function:

int test_imgTransform ( IMG *  img1,
IMG *  img2,
int  zoom 
)

Function for testing library functions related to image transforms.

Definition at line 607 of file libtpcimgp.c.

References drawUnSymmetricCross(), imgScale(), and TRANSFORMERROR.

Referenced by main().

Here is the call graph for this function:


Variable Documentation

int VERBOSE = 0

Definition at line 197 of file libtpcimgp.c.

Referenced by main(), and test_imgArithm().