Rev 209 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
209 | f9daq | 1 | #ifndef _H3D_H_ |
2 | #define _H3D_H_ |
||
3 | |||
4 | #ifdef _CVI_ |
||
5 | #include <cvidef.h> |
||
6 | #include <ivi.h> |
||
7 | #include "toolbox.h" |
||
8 | |||
9 | #ifndef _HCOLORMAP_ |
||
10 | #define _HCOLORMAP_ |
||
11 | typedef struct { |
||
12 | ColorMapEntry *array; |
||
13 | int numberofColors; |
||
14 | int HiColor; |
||
15 | } HColorMap; |
||
16 | #endif |
||
17 | |||
18 | HColorMap * _VI_FUNC H3D_GetColorMap(void); |
||
19 | #else |
||
20 | #define _VI_FUNC |
||
21 | #endif |
||
22 | |||
23 | #include <stdio.h> |
||
24 | |||
25 | /* 2d histogramming */ |
||
264 | f9daq | 26 | #define H3DMAX 500 |
209 | f9daq | 27 | #define H3D_ID 0x12 |
28 | #pragma pack(4) |
||
29 | typedef struct |
||
30 | { |
||
31 | unsigned int id,len; |
||
32 | unsigned int nx; |
||
33 | unsigned int ny; |
||
34 | unsigned int nz; |
||
35 | int nentries; |
||
36 | unsigned int size; |
||
37 | double min; |
||
38 | double max; |
||
39 | double minx; |
||
40 | double miny; |
||
41 | double minz; |
||
42 | double stepx; |
||
43 | double stepy; |
||
44 | double stepz; |
||
45 | char name[20]; |
||
46 | char title[100]; |
||
47 | char titlex[40]; |
||
48 | char titley[40]; |
||
49 | char titlez[40]; |
||
50 | double *data; |
||
51 | }H3D; |
||
52 | #pragma pack() |
||
53 | |||
54 | |||
55 | |||
56 | int _VI_FUNC H3D_SliXY(int histogram,int slice, int direction); |
||
57 | |||
264 | f9daq | 58 | double _VI_FUNC H3D_GetZBinCenter(int h3d,int zbin); |
209 | f9daq | 59 | double _VI_FUNC H3D_GetYBinCenter(int h3d,int ybin); |
264 | f9daq | 60 | double _VI_FUNC H3D_GetXBinCenter(int h3d,int xbin); |
209 | f9daq | 61 | |
62 | int _VI_FUNC H3D_Clear(int h3d); |
||
63 | int _VI_FUNC H3D_Print(int h3d); |
||
64 | int _VI_FUNC H3D_Exist(int h3d); |
||
65 | int _VI_FUNC H3D_CalculateBin(int h3d, int axis, double value); |
||
66 | int _VI_FUNC H3D_GetBin(int h3d,int x, int y, int z); |
||
67 | int _VI_FUNC H3D_Fill(int h3d,double x, double y, double z, double val); |
||
68 | int _VI_FUNC H3D_FillBin(int h3d,int x, int y, int z, double val); |
||
69 | double _VI_FUNC H3D_GetBinContent(int h3d,int atx, int aty, int atz); |
||
70 | int _VI_FUNC H3D_Init(int h3d,char *name, char *title,int nx, double minx, double maxx, int ny, double miny, double maxy,int nz, double minz, double maxz); |
||
71 | int _VI_FUNC H3D_Write(int h3d,const char *fname,const char*opt); |
||
72 | int _VI_FUNC H3D_Write2File(int h3d,FILE *fp); |
||
73 | int _VI_FUNC H3D_SetTitle(int h3d,char *title); |
||
74 | int _VI_FUNC H3D_SetTitleX(int h3d,char *title); |
||
75 | int _VI_FUNC H3D_SetTitleY(int h3d,char *title); |
||
76 | int _VI_FUNC H3D_SetTitleZ(int h3d,char *title); |
||
77 | int _VI_FUNC H3D_SetName(int h3d,char *title); |
||
78 | |||
79 | int _VI_FUNC H3D_GetNbinsY(int h); |
||
80 | int _VI_FUNC H3D_GetNbinsX(int h); |
||
81 | int _VI_FUNC H3D_GetNbinsZ(int h); |
||
82 | |||
83 | double _VI_FUNC H3D_GetMaxX(int h); |
||
84 | double _VI_FUNC H3D_GetMaxY(int h); |
||
85 | double _VI_FUNC H3D_GetMaxZ(int h); |
||
86 | |||
87 | double _VI_FUNC H3D_GetMinX(int h); |
||
88 | double _VI_FUNC H3D_GetMinY(int h); |
||
89 | double _VI_FUNC H3D_GetMinZ(int h); |
||
90 | |||
91 | double _VI_FUNC H3D_GetStepX(int h); |
||
92 | double _VI_FUNC H3D_GetStepY(int h); |
||
93 | double _VI_FUNC H3D_GetStepZ(int h); |
||
94 | |||
95 | double _VI_FUNC H3D_GetMin(int h); |
||
96 | double _VI_FUNC H3D_GetMax(int h); |
||
97 | double * _VI_FUNC H3D_GetSliceXYData(int h, int slice); |
||
98 | double * _VI_FUNC H3D_GetData(int h); |
||
99 | |||
100 | #endif |