8 #define PI (3.14159265358979323846f) 10 #define RADIANS (PI/180.0) // Angle in radians 12 #define DEGREE2 (180./PI) // sin(RADIANS*DEGREE*asin(mytheta)) 15 #define NUMTBL2 (NUMTBL-1) 16 #define MAX_STR_LEN 4000 18 #define FFT_SEGMENT_SIZE 64 31 float cx, cy, cz, amplitude;
55 bool readConfig(
const char* fname);
56 int loadPoint(
const char* _filename);
59 int save(
const char * fname, uint8_t bitsperpixel,
uchar* src,
uint px,
uint py);
60 void save(
const char* fname);
73 void DataInit(
int segsize,
int cghwidth,
int cghheight,
float xiinter,
float etainter);
75 void MemoryRelease(
void);
77 void generateHologram();
81 void CalcSpatialFrequency(
float cx,
float cy,
float cz,
float amp,
int segnumx,
int segnumy,
int segsize,
int hsegsize,
float sf_base,
float * xc,
float * yc,
float * sf_cx,
float * sf_cy,
int * pp_cx,
int * pp_cy,
int * cf_cx,
int * cf_cy,
float xiint,
float etaint,
OphPointCloudConfig& conf);
83 void CalcCompensatedPhase(
float cx,
float cy,
float cz,
float amp,
int segnumx,
int segnumy,
int segsize,
int hsegsize,
float sf_base,
float *xc,
float *yc,
int *cf_cx,
int *cf_cy,
float *COStbl,
float *SINtbl,
float **inRe,
float **inIm,
OphPointCloudConfig& conf);
85 void RunFFTW(
int segnumx,
int segnumy,
int segsize,
int hsegsize,
float **inRe,
float **inIm, fftw_complex *in, fftw_complex *out, fftw_plan *plan,
double *pHologram,
OphPointCloudConfig& conf);
87 void encodeHologram(
const vec2 band_limit,
const vec2 spectrum_shift);
89 void encoding(
unsigned int ENCODE_FLAG);
105 float *m_SFrequency_cx;
106 float *m_SFrequency_cy;
109 int *m_Coefficient_cx;
110 int *m_Coefficient_cy;
113 unsigned char* cgh_fringe;
118 fftw_complex *m_in, *m_out;
137 float& cx,
float& cy,
float& cz,
float& amp,
ivec3& seg);
143 #endif // !__ophPAS_h
structure for 2-dimensional Real type vector and its arithmetic.
Configuration for Point Cloud.
structure for 3-dimensional integer vector and its arithmetic.
void cuda_Wrapper_phaseCalc(float *inRe, float *inIm, constValue val, float &cx, float &cy, float &cz, float &, ivec3 &seg)