Go to most recent revision | Details | 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 */ |
||
26 | #define H3D_ID 0x12 |
||
27 | #pragma pack(4) |
||
28 | typedef struct |
||
29 | { |
||
30 | unsigned int id,len; |
||
31 | unsigned int nx; |
||
32 | unsigned int ny; |
||
33 | unsigned int nz; |
||
34 | int nentries; |
||
35 | unsigned int size; |
||
36 | double min; |
||
37 | double max; |
||
38 | double minx; |
||
39 | double miny; |
||
40 | double minz; |
||
41 | double stepx; |
||
42 | double stepy; |
||
43 | double stepz; |
||
44 | char name[20]; |
||
45 | char title[100]; |
||
46 | char titlex[40]; |
||
47 | char titley[40]; |
||
48 | char titlez[40]; |
||
49 | double *data; |
||
50 | }H3D; |
||
51 | #pragma pack() |
||
52 | |||
53 | |||
54 | |||
55 | int _VI_FUNC H3D_SliXY(int histogram,int slice, int direction); |
||
56 | |||
57 | double _VI_FUNC H3D_GetYBinCenter(int h3d,int ybin); |
||
58 | double _VI_FUNC H3D_GetYBinCenter(int h3d,int xbin); |
||
59 | |||
60 | int _VI_FUNC H3D_Clear(int h3d); |
||
61 | int _VI_FUNC H3D_Print(int h3d); |
||
62 | int _VI_FUNC H3D_Exist(int h3d); |
||
63 | int _VI_FUNC H3D_CalculateBin(int h3d, int axis, double value); |
||
64 | int _VI_FUNC H3D_GetBin(int h3d,int x, int y, int z); |
||
65 | int _VI_FUNC H3D_Fill(int h3d,double x, double y, double z, double val); |
||
66 | int _VI_FUNC H3D_FillBin(int h3d,int x, int y, int z, double val); |
||
67 | double _VI_FUNC H3D_GetBinContent(int h3d,int atx, int aty, int atz); |
||
68 | 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); |
||
69 | int _VI_FUNC H3D_Write(int h3d,const char *fname,const char*opt); |
||
70 | int _VI_FUNC H3D_Write2File(int h3d,FILE *fp); |
||
71 | int _VI_FUNC H3D_SetTitle(int h3d,char *title); |
||
72 | int _VI_FUNC H3D_SetTitleX(int h3d,char *title); |
||
73 | int _VI_FUNC H3D_SetTitleY(int h3d,char *title); |
||
74 | int _VI_FUNC H3D_SetTitleZ(int h3d,char *title); |
||
75 | int _VI_FUNC H3D_SetName(int h3d,char *title); |
||
76 | |||
77 | int _VI_FUNC H3D_GetNbinsY(int h); |
||
78 | int _VI_FUNC H3D_GetNbinsX(int h); |
||
79 | int _VI_FUNC H3D_GetNbinsZ(int h); |
||
80 | |||
81 | double _VI_FUNC H3D_GetMaxX(int h); |
||
82 | double _VI_FUNC H3D_GetMaxY(int h); |
||
83 | double _VI_FUNC H3D_GetMaxZ(int h); |
||
84 | |||
85 | double _VI_FUNC H3D_GetMinX(int h); |
||
86 | double _VI_FUNC H3D_GetMinY(int h); |
||
87 | double _VI_FUNC H3D_GetMinZ(int h); |
||
88 | |||
89 | double _VI_FUNC H3D_GetStepX(int h); |
||
90 | double _VI_FUNC H3D_GetStepY(int h); |
||
91 | double _VI_FUNC H3D_GetStepZ(int h); |
||
92 | |||
93 | double _VI_FUNC H3D_GetMin(int h); |
||
94 | double _VI_FUNC H3D_GetMax(int h); |
||
95 | double * _VI_FUNC H3D_GetSliceXYData(int h, int slice); |
||
96 | double * _VI_FUNC H3D_GetData(int h); |
||
97 | |||
98 | #endif |