Openholo  v4.0
Open Source Digital Holographic Library
ophACPAS.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef __ophACPAS_h
4 #define __ophACPAS_h
5 
6 #include "ophGen.h"
7 
8 
9 #define PI (3.14159265358979323846f)
10 #define M2_PI (PI*2.0)
11 #define RADIANS (PI/180.0) // Angle in radians
12 // DEGREE*asin(mytheta)
13 #define DEGREE2 (180./PI) // sin(RADIANS*DEGREE*asin(mytheta))
14 
15 #define NUMTBL 1024
16 #define NUMTBL2 (NUMTBL-1)
17 #define MAX_STR_LEN 4000
18 #define FFT_SEG_SIZE 64
19 #define SEG_SIZE 8
20 
22 {
23  int CghWidth; // cgh width
24  int CghHeight; // cgh height
27  float rWaveLength; // red laser lambda
28  float rWaveNumber; // red laser lambda
29  float ThetaX;
30  float ThetaY;
31  float DefaultDepth;
32  float xInterval;
33  float yInterval;
34  float xiInterval;
35  float etaInterval;
36  float CGHScale;
37 };
38 
40 {
43  int SegSize_x;
44  int SegSize_y;
45  int hSegSize_x; // Half size
46  int hSegSize_y; // Half size
47  double CenterX;
48  double CenterY;
50 };
51 
52 using namespace oph;
53 
54 class GEN_DLL ophACPAS : public ophGen
55 {
56 public:
57  explicit ophACPAS();
58 protected:
59  virtual ~ophACPAS();
60 
61 public:
62  bool readConfig(const char* fname);
63  int loadPointCloud(const char* pc_file);
64  int save(const char * fname, uint8_t bitsperpixel, uchar* src, uint px, uint py);
65 
66  void DataInit();
67  int ACPASCalcuation(unsigned char *cghfringe); // ÆÐÅÏ°è»ê void ACPAS(); double *m_pHologram; float m_COStbl[NUMTBL]; float m_SINtbl[NUMTBL]; private: int n_points; OphPointCloudConfig pc_config_; OphPointCloudData pc_data_; CGHEnvironmentData env; }; #endif // !__ophPAS_h
68  void ACPAS();
69 
70  double *m_pHologram;
71 
72  float m_COStbl[NUMTBL];
73  float m_SINtbl[NUMTBL];
74 private:
75  int n_points;
76  OphPointCloudConfig pc_config_;
77  OphPointCloudData pc_data_;
79 };
80 
81 
82 
83 #endif // !__ophPAS_h
float DefaultDepth
Definition: ophACPAS.h:31
unsigned char uchar
Definition: typedef.h:64
bool WorkingFlag
Definition: ophACPAS.h:41
#define NUMTBL
Definition: ophACPAS.h:15
double CenterX
Definition: ophACPAS.h:47
double CenterY
Definition: ophACPAS.h:48
double * m_pHologram
Definition: ophACPAS.h:70
#define GEN_DLL
Definition: ophGen.h:61
int hSegSize_y
Definition: ophACPAS.h:46
Configuration for Point Cloud.
Definition: ophGen.h:556
long SegmentIndex
Definition: ophACPAS.h:42
Data for Point Cloud.
Definition: ophGen.h:583
int SegSize_x
Definition: ophACPAS.h:43
int hSegSize_x
Definition: ophACPAS.h:45
int fftSegmentationSize
Definition: ophACPAS.h:26
int SegSize_y
Definition: ophACPAS.h:44
Definition: Bitmap.h:49
double FrequencySlope
Definition: ophACPAS.h:49
unsigned int uint
Definition: typedef.h:62
Definition: ophGen.h:76