46 #ifndef _OphCascadedPropagation_h 47 #define _OphCascadedPropagation_h 192 bool save(
const wchar_t* pathname, uint8_t bitsperpixel);
197 virtual bool saveAsOhc(
const char *fname);
202 virtual bool loadAsOhc(
const char *fname);
219 vector<oph::Complex<Real>*> wavefield_SLM;
224 vector<oph::Complex<Real>*> wavefield_pupil;
229 vector<oph::Complex<Real>*> wavefield_retina;
234 bool ready_to_propagate;
239 wstring hologram_path;
258 void deallocateMem();
265 bool loadInputImg(
string hologram_path_str);
357 vector<oph::Complex<Real>*> getRetinaWavefieldAll();
369 bool propagateSlmToPupil();
376 bool propagatePupilToRetina();
389 #define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) 390 #define PRINT_ERROR(errorMsg) { cout << "Error(" << __FILENAME__ << ":" << __LINE__ << "): " << ( errorMsg ) << endl; }
oph::uint getResX()
Returns horizontal resolution.
Real field_lens_focal_length
Real getPupilDiameter()
Returns diameter of pupil in meter.
Real getDistPupilToRetina()
Returns distance from pupil plane to retina plane in meter.
Real getFieldLensFocalLength()
Returns focal length of field lens in meter.
virtual void ophFree(void)
Pure virtual function for override in child classes.
Real dist_pupil_to_retina
oph::uint getResY()
Returns vertical resolution.
OphCascadedPropagationConfig()
oph::vec3 getWavelengths()
Returns wavelengths in meter.
bool isReadyToPropagate()
Returns if all data are prepared.
structure for 3-dimensional Real type vector and its arithmetic.
Real getPixelPitchY()
Returns vertical pixel pitch in meter.
bool save(const char *fname, uint8_t bitsperpixel, uchar *src, uint px, uint py)
virtual bool loadAsOhc(const char *fname)
Function to read OHC file.
Cascaded propagation module.
virtual bool saveAsOhc(const char *fname)
Function to write OHC file
bool readConfig(const char *fname)
Real getPixelPitchX()
Returns horizontal pixel pitch in meter.
Real getDistObjectToPupil()
Returns distance from reconstruction plane to pupil plane in meter.
oph::uint getNumColors()
Returns number of colors.
Real dist_reconstruction_plane_to_pupil
Real getNor()
Returns Nor, which affects the range of output intensity.