46 #ifndef __OphReconstruction_h 47 #define __OphReconstruction_h 52 #define RECON_DLL __declspec(dllexport) 54 #define RECON_DLL __declspec(dllimport) 77 bool SimulationPos[3];
101 vector<Real *> m_vecEncoded;
102 vector<uchar *> m_vecNormalized;
104 std::vector<Complex<Real>*> field_set_;
105 std::vector<double*> field_ret_set_;
107 std::vector<double*> res_set_;
108 std::vector<double*> res_set_norm_255_;
110 std::vector<ivec2> pn_set_;
111 std::vector<vec2> pp_set_;
112 std::vector<ivec2> pn_ret_set_;
113 std::vector<vec2> pp_ret_set_;
114 std::vector<vec2> ss_ret_set_;
116 std::vector<Real*> recon_set;
117 std::vector<uchar*> img_set;
118 std::vector<ivec2> img_size;
119 std::vector<Real*> focus_recon_set;
120 std::vector<uchar*> focus_img_set;
121 std::vector<ivec2> focus_img_size;
137 void GetPupilFieldFromHologram();
138 void GetPupilFieldFromVWHologram();
139 void Propagation_Fresnel_FFT(
int chnum);
140 void ASM_Propagation();
141 void ASM_Propagation_GPU();
142 void GetPupilFieldImage(
Complex<Real>* src,
double* dst,
int pnx,
int pny,
double ppx,
double ppy,
double scaleX,
double scaleY);
143 void getVarname(
int vtr,
vec3& var_vals, std::string& varname2);
145 void SaveImage(
const char* path,
const char* ext =
"bmp");
147 void SetMode(
unsigned int mode) { m_mode = mode; }
149 bool ReconstructImage();
150 bool readConfig(
const char* fname);
151 bool readImage(
const char* path);
152 bool readImagePNA(
const char* phase,
const char* amplitude);
153 bool readImageRNI(
const char* real,
const char* imaginary);
154 void Perform_Simulation();
156 bool save(
const char * fname, uint8_t bitsperpixel,
uchar* src,
uint px,
uint py);
165 #endif // !__OphReconstruction_h
void SetMode(unsigned int mode)
void normalize(const Complex< T > *src, Complex< T > *dst, const int &size)
Normalize all elements of Complex<T>* src from 0 to 1.
void setConfig(OphRecConfig config)
OphRecConfig & getConfig()
structure for 2-dimensional Real type vector and its arithmetic.
structure for 3-dimensional Real type vector and its arithmetic.
virtual void ophFree(void)
Pure virtual function for override in child classes.