AllocMem.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ALLOC_MEM_H
00025 #define ALLOC_MEM_H
00026
00027 typedef struct pixel_struct {
00028 double r,g,b;
00029 } pixel_type;
00030
00031 typedef struct node_struct {
00032 pixel_type color;
00033 int rank;
00034
00035 int parent;
00036 int area;
00037 float maxw;
00038 } node_type;
00039
00040 typedef struct edge_struct {
00041 float w;
00042 short r,c;
00043 unsigned char dir;
00044 } edge_type;
00045
00046 typedef struct blob_struct {
00047 double area,
00048 cogx,
00049 cogy;
00050 long label;
00051 int minx,maxx,miny,maxy;
00052 int perim;
00053 } blob_type;
00054
00055
00056
00057
00058 void** alloc_vec_vec(size_t NStrings, size_t *strings, size_t TypeSize);
00059
00060
00061 void free_vec_vec(void *pPointer);
00062
00063
00064
00065
00066
00067 char* alloc_vec_char(int);
00068 char** alloc_mat_char(int, int);
00069 char ***allocCubeChar ( unsigned uDepth, unsigned uHeight, unsigned uWidth );
00070
00071
00072
00073 void release_vec_char(char*);
00074 void release_mat_char(char**);
00075 void releaseCubeChar (char ***);
00076
00077
00078
00079
00080 unsigned char* alloc_vec_uchar(int);
00081 unsigned char** alloc_mat_uchar(int, int);
00082 unsigned char ***allocCubeUchar ( unsigned uDepth, unsigned uHeight, unsigned uWidth );
00083
00084
00085
00086 void release_vec_uchar(unsigned char*);
00087 void release_mat_uchar(unsigned char**);
00088 void releaseCubeUchar (unsigned char***);
00089
00090 int **alloc_mat(int , int);
00091 int * alloc_vec_int(int );
00092 void release_vec_int(int* v);
00093 void release_mat_int(int** M);
00094 long* alloc_vec_long(int);
00095 long** alloc_mat_long(int, int);
00096 void release_vec_long(long*);
00097 void release_mat_long(long**);
00098 float* alloc_vec_float(int);
00099 void release_vec_float(float*);
00100 double* alloc_vec_double(int);
00101 double** alloc_mat_double(int, int);
00102 void release_vec_double(double*);
00103 void release_mat_double(double**);
00104 pixel_type* alloc_vec_pixel(int);
00105 pixel_type** alloc_mat_pixel(int, int);
00106 void release_vec_pixel(pixel_type*);
00107 void release_mat_pixel(pixel_type**);
00108 blob_type* alloc_vec_blob(int);
00109 void release_vec_blob(blob_type*);
00110 node_type* alloc_vec_node(int);
00111 node_type** alloc_mat_node(int, int);
00112 void release_vec_node(node_type*);
00113 void release_mat_node(node_type**);
00114 edge_type* alloc_vec_edge(int);
00115 void release_vec_edge(edge_type*);
00116
00117 #endif //ALLOC_MEM_H
Generated on Wed Jul 14 17:25:04 2004 for Segmentation by
1.3.7