Rev 209 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 209 | Rev 264 | ||
---|---|---|---|
1 | #ifndef _H2D_H_ |
1 | #ifndef _H2D_H_ |
2 | #define _H2D_H_ |
2 | #define _H2D_H_ |
3 | 3 | ||
4 | 4 | ||
5 | #ifdef _CVI_ |
5 | #ifdef _CVI_ |
6 | #include <cvidef.h> |
6 | #include <cvidef.h> |
7 | #include <ivi.h> |
7 | #include <ivi.h> |
8 | #include <userint.h> |
8 | #include <userint.h> |
9 | #include "toolbox.h" |
9 | #include "toolbox.h" |
10 | 10 | ||
11 | #ifndef _HCOLORMAP_ |
11 | #ifndef _HCOLORMAP_ |
12 | #define _HCOLORMAP_ |
12 | #define _HCOLORMAP_ |
13 | typedef struct { |
13 | typedef struct { |
14 | ColorMapEntry *array; |
14 | ColorMapEntry *array; |
15 | int numberofColors; |
15 | int numberofColors; |
16 | int HiColor; |
16 | int HiColor; |
17 | } HColorMap; |
17 | } HColorMap; |
18 | #endif |
18 | #endif |
19 | 19 | ||
20 | HColorMap _VI_FUNC *H2D_GetColorMap(void); |
20 | HColorMap _VI_FUNC *H2D_GetColorMap(void); |
21 | 21 | ||
22 | #else |
22 | #else |
23 | #define _VI_FUNC |
23 | #define _VI_FUNC |
24 | #endif |
24 | #endif |
25 | 25 | ||
26 | #include <stdio.h> |
26 | #include <stdio.h> |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | #ifdef __CINT__ |
31 | #ifdef __CINT__ |
32 | #define HALIGN 41 |
32 | #define HALIGN 41 |
33 | #else |
33 | #else |
34 | #define HALIGN 40 |
34 | #define HALIGN 40 |
35 | #endif |
35 | #endif |
36 | 36 | ||
37 | 37 | ||
38 | /* 2d histogramming */ |
38 | /* 2d histogramming */ |
- | 39 | #define H2DMAX 500 |
|
39 | #define H2D_ID 0x10 |
40 | #define H2D_ID 0x10 |
40 | #pragma pack(4) |
41 | #pragma pack(4) |
41 | typedef struct { |
42 | typedef struct { |
42 | unsigned int id,len; |
43 | unsigned int id,len; |
43 | unsigned int nx; |
44 | unsigned int nx; |
44 | unsigned int ny; |
45 | unsigned int ny; |
45 | int nentries; |
46 | int nentries; |
46 | unsigned int size; // 6*4 |
47 | unsigned int size; // 6*4 |
47 | double min; |
48 | double min; |
48 | double max; |
49 | double max; |
49 | double minx; |
50 | double minx; |
50 | double miny; |
51 | double miny; |
51 | double stepx; |
52 | double stepx; |
52 | double stepy; // 6*8 |
53 | double stepy; // 6*8 |
53 | char name[20]; |
54 | char name[20]; |
54 | char title[100]; |
55 | char title[100]; |
55 | char titlex[40]; |
56 | char titlex[40]; |
56 | char titley[HALIGN]; // 196 |
57 | char titley[HALIGN]; // 196 |
57 | double *data; |
58 | double *data; |
58 | } H2D; |
59 | } H2D; |
59 | #pragma pack() |
60 | #pragma pack() |
60 | 61 | ||
61 | double _VI_FUNC H2D_GetYBinCenter(int h2d,int ybin); |
62 | double _VI_FUNC H2D_GetYBinCenter(int h2d,int ybin); |
62 | double _VI_FUNC |
63 | double _VI_FUNC H2D_GetXBinCenter(int h2d,int xbin); |
63 | 64 | ||
64 | int _VI_FUNC H2D_Clear(int h2d); |
65 | int _VI_FUNC H2D_Clear(int h2d); |
65 | int _VI_FUNC H2D_Print(int h2d); |
66 | int _VI_FUNC H2D_Print(int h2d); |
66 | int _VI_FUNC H2D_Exist(int h2d); |
67 | int _VI_FUNC H2D_Exist(int h2d); |
67 | int _VI_FUNC H2D_CalculateBin(int h2d, int axis, double value); |
68 | int _VI_FUNC H2D_CalculateBin(int h2d, int axis, double value); |
68 | int _VI_FUNC H2D_GetBin(int h2d,int x, int y); |
69 | int _VI_FUNC H2D_GetBin(int h2d,int x, int y); |
69 | int _VI_FUNC H2D_Fill(int h2d,double x, double y, double val); |
70 | int _VI_FUNC H2D_Fill(int h2d,double x, double y, double val); |
70 | int _VI_FUNC H2D_SetBinContent(int h2d,int x, int y, double val); |
71 | int _VI_FUNC H2D_SetBinContent(int h2d,int x, int y, double val); |
71 | double _VI_FUNC H2D_GetBinContent(int h2d,int atx, int aty); |
72 | double _VI_FUNC H2D_GetBinContent(int h2d,int atx, int aty); |
72 | int _VI_FUNC H2D_Init(int h2d,const char *name,const char *title,int nx, double minx, double maxx, int ny, double miny, double maxy); |
73 | int _VI_FUNC H2D_Init(int h2d,const char *name,const char *title,int nx, double minx, double maxx, int ny, double miny, double maxy); |
73 | int _VI_FUNC H2D_Write(int h2d,const char *fname,const char*opt); |
74 | int _VI_FUNC H2D_Write(int h2d,const char *fname,const char*opt); |
74 | int _VI_FUNC H2D_Write2File(int h2d,FILE *fp); |
75 | int _VI_FUNC H2D_Write2File(int h2d,FILE *fp); |
75 | int _VI_FUNC H2D_SetTitle(int h2d,const char *title); |
76 | int _VI_FUNC H2D_SetTitle(int h2d,const char *title); |
76 | int _VI_FUNC H2D_SetTitleX(int h2d,const char *title); |
77 | int _VI_FUNC H2D_SetTitleX(int h2d,const char *title); |
77 | int _VI_FUNC H2D_SetTitleY(int h2d,const char *title); |
78 | int _VI_FUNC H2D_SetTitleY(int h2d,const char *title); |
78 | int _VI_FUNC H2D_SetName(int h2d,const char *title); |
79 | int _VI_FUNC H2D_SetName(int h2d,const char *title); |
79 | 80 | ||
80 | int _VI_FUNC H2D_GetNbinsY(int h); |
81 | int _VI_FUNC H2D_GetNbinsY(int h); |
81 | int _VI_FUNC H2D_GetNbinsX(int h); |
82 | int _VI_FUNC H2D_GetNbinsX(int h); |
82 | double _VI_FUNC H2D_GetMinY(int h); |
83 | double _VI_FUNC H2D_GetMinY(int h); |
83 | double _VI_FUNC H2D_GetMinX(int h); |
84 | double _VI_FUNC H2D_GetMinX(int h); |
84 | double _VI_FUNC H2D_GetMaxX(int h); |
85 | double _VI_FUNC H2D_GetMaxX(int h); |
85 | double _VI_FUNC H2D_GetMaxY(int h); |
86 | double _VI_FUNC H2D_GetMaxY(int h); |
86 | double _VI_FUNC H2D_GetStepY(int h); |
87 | double _VI_FUNC H2D_GetStepY(int h); |
87 | double _VI_FUNC H2D_GetStepX(int h); |
88 | double _VI_FUNC H2D_GetStepX(int h); |
88 | double _VI_FUNC H2D_GetMin(int h); |
89 | double _VI_FUNC H2D_GetMin(int h); |
89 | double _VI_FUNC H2D_GetMax(int h); |
90 | double _VI_FUNC H2D_GetMax(int h); |
90 | double * _VI_FUNC H2D_GetData(int h); |
91 | double * _VI_FUNC H2D_GetData(int h); |
91 | 92 | ||
92 | 93 | ||
93 | int _VI_FUNC H2D_SetRangeColors(double min, double max); |
94 | int _VI_FUNC H2D_SetRangeColors(double min, double max); |
94 | int _VI_FUNC H2D_Draw(int histogram,int panel, int control, int *plothandle); |
95 | int _VI_FUNC H2D_Draw(int histogram,int panel, int control, int *plothandle); |
95 | 96 | ||
96 | 97 | ||
97 | #endif /* _H2D_H_ */ |
98 | #endif /* _H2D_H_ */ |
98 | 99 |