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