00001
#ifndef _ATTRIBUTES_H_
00002
#define _ATTRIBUTES_H_
00003
00004
00005
00006
00007
00008
00018
struct Attributes
00019 {
00020
int nLabel;
00021
Rectangle4i rRect;
00022
int nArea;
00023
int nPeaks;
00024
Peak2i seed;
00025
00026
float dTIC;
00027
float dMaxAbundance;
00028 };
00029
00030
typedef struct Attributes Attributes;
00031
00032
int Attributes_init(Attributes* attr);
00033
int Attributes_cmpByNPeaks(
const void *p1,
const void *p2);
00034 Attributes Attributes_readline(
char* line);
00035
int Attributes_updateRectangle(Attributes* attr,
Map2D* map,
Peak2i peak);
00036
00037
void Attributes_fprint (FILE* fp, Attributes *attr);
00038
void Attributes_fprintWithPeaks(FILE* fp, Attributes *attr);
00039
00040
int AttributesArray_init(Attributes* attr,
int nattr);
00041 Attributes* AttributesArray_load(
char* filename,
int* size);
00042
void AttributesArray_sortByNPeaks(Attributes* attr,
long nsize);
00043 Attributes* AttributesArray_create(
int size);
00044
00045
void AttributesArray_fprint (FILE* fp, Attributes *attr,
int nsize);
00046
void AttributesArray_fprintWithPeaks (FILE* fp, Attributes *attr,
int nsize);
00047
00048
Rectangle4i* AttributesArray_getRectangleArray(Attributes* attr,
int nAttr,
struct Map2D* map);
00049
int* AttributesArray_getLabelArray(Attributes* attr,
int nAttr);
00050 MQString* AttributesArray_toStringArray(Attributes* attr,
int nAttr,
const char* format);
00051
00052
#endif
00053