Header file for common definitions and function prototypes. More...
#include <stdlib.h>
#include <stdio.h>
#include <malloc.h>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <float.h>
#include <sys/time.h>
#include <xmmintrin.h>
Go to the source code of this file.
Classes | |
union | gft::_voxel |
struct | gft::_pixel |
Namespaces | |
gft | |
Base namespace for common definitions and prototypes. | |
Macros | |
#define | MSG1 "Cannot allocate memory space" |
#define | MSG2 "Cannot open file" |
#define | MSG3 "Invalid option" |
#define | MSG4 "Could not locate nifti header" |
#define | MSG5 "Nifti-1 data type not supported" |
#define | PI 3.1415926536 |
#define | INTERIOR 0 |
#define | EXTERIOR 1 |
#define | BOTH 2 |
#define | WHITE 0 |
#define | GRAY 1 |
#define | BLACK 2 |
#define | NIL -1 |
#define | INCREASING 1 |
#define | DECREASING 0 |
#define | Epsilon 1E-05 |
#define | MAX(x, y) (((x) > (y))?(x):(y)) |
A macro that returns the maximum of x and y. More... | |
#define | MIN(x, y) (((x) < (y))?(x):(y)) |
A macro that returns the minimum of x and y. More... | |
#define | ROUND(x) ((x < 0)?(int)(x-0.5):(int)(x+0.5)) |
#define | SIGN(x) ((x >= 0)?1:-1) |
Typedefs | |
typedef enum gft::boolean | gft::bool |
typedef unsigned short | gft::ushort |
typedef unsigned int | gft::uint |
typedef unsigned char | gft::uchar |
typedef struct timeval | gft::timer |
typedef float | gft::v4sf |
Vector of four single floats. More... | |
typedef int | gft::v4si |
Vector of four single integers. More... | |
typedef uchar | gft::v8qi |
Vector of eight unsigned 8-bit integers. More... | |
typedef uchar | gft::v16qi |
Vector of sixteen unsigned 8-bit integers. More... | |
typedef ushort | gft::v8hi |
Vector of eight unsigned short integers. More... | |
typedef union gft::_voxel | gft::Voxel |
typedef struct gft::_pixel | gft::Pixel |
Enumerations | |
enum | gft::boolean { gft::false, gft::true } |
Functions | |
char * | gft::AllocCharArray (int n) |
uchar * | gft::AllocUCharArray (int n) |
It allocates 1D array of n characters. More... | |
ushort * | gft::AllocUShortArray (int n) |
It allocates 1D array of n ushorts. More... | |
uint * | gft::AllocUIntArray (int n) |
int * | gft::AllocIntArray (int n) |
It allocates 1D array of n integers. More... | |
float * | gft::AllocFloatArray (int n) |
It allocates 1D array of n floats. More... | |
double * | gft::AllocDoubleArray (int n) |
void | gft::FreeIntArray (int **a) |
void | gft::FreeFloatArray (float **a) |
void | gft::FreeUCharArray (uchar **a) |
void | gft::FreeUShortArray (ushort **a) |
void | gft::Error (char *msg, char *func) |
It prints error message and exits the program. More... | |
void | gft::Warning (char *msg, char *func) |
It prints warning message and leaves the routine. More... | |
void | gft::SwapInt (int *a, int *b) |
It changes content between a and b. More... | |
void | gft::SwapFloat (float *a, float *b) |
It changes content between a and b. More... | |
int | gft::NCFgets (char *s, int m, FILE *f) |
int | gft::RandomInteger (int low, int high) |
void | gft::RandomSeed () |
Header file for common definitions and function prototypes.
#define BLACK 2 |
#define BOTH 2 |
#define DECREASING 0 |
#define Epsilon 1E-05 |
#define EXTERIOR 1 |
#define GRAY 1 |
#define INCREASING 1 |
#define INTERIOR 0 |
#define MAX | ( | x, | |
y | |||
) | (((x) > (y))?(x):(y)) |
A macro that returns the maximum of x and y.
#define MIN | ( | x, | |
y | |||
) | (((x) < (y))?(x):(y)) |
A macro that returns the minimum of x and y.
#define MSG1 "Cannot allocate memory space" |
#define MSG2 "Cannot open file" |
#define MSG3 "Invalid option" |
#define MSG4 "Could not locate nifti header" |
#define MSG5 "Nifti-1 data type not supported" |
#define NIL -1 |
#define PI 3.1415926536 |
#define ROUND | ( | x | ) | ((x < 0)?(int)(x-0.5):(int)(x+0.5)) |
#define SIGN | ( | x | ) | ((x >= 0)?1:-1) |
#define WHITE 0 |