Openholo  v4.2
Open Source Digital Holographic Library
ophRec Class Reference

#include <ophRec.h>

Inheritance diagram for ophRec:
Collaboration diagram for ophRec:

Public Member Functions

 ophRec (void)
 Constructor. More...
 
void SaveImage (const char *path, const char *ext="bmp")
 
void setConfig (OphRecConfig config)
 
void SetMode (unsigned int mode)
 
OphRecConfiggetConfig ()
 
bool ReconstructImage ()
 
bool readConfig (const char *fname)
 
bool readImage (const char *path)
 
bool readImagePNA (const char *phase, const char *amplitude)
 
bool readImageRNI (const char *real, const char *imaginary)
 
void Perform_Simulation ()
 
void Initialize ()
 
bool save (const char *fname, uint8_t bitsperpixel, uchar *src, uint px, uint py)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y, T max, T min)
 
 ophRec (void)
 Constructor. More...
 
void SaveImage (const char *path, const char *ext="bmp")
 
void setConfig (OphRecConfig config)
 
void SetMode (unsigned int mode)
 
OphRecConfiggetConfig ()
 
bool ReconstructImage ()
 
bool readConfig (const char *fname)
 
bool readImage (const char *path)
 
bool readImagePNA (const char *phase, const char *amplitude)
 
bool readImageRNI (const char *real, const char *imaginary)
 
void Perform_Simulation ()
 
void Initialize ()
 
bool save (const char *fname, uint8_t bitsperpixel, uchar *src, uint px, uint py)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y, T max, T min)
 
vector< uchar * > & getNormalizedBuffer ()
 
 ophRec (void)
 Constructor. More...
 
void SaveImage (const char *path, const char *ext="bmp")
 
void setConfig (OphRecConfig config)
 
void SetMode (unsigned int mode)
 
OphRecConfiggetConfig ()
 
bool ReconstructImage ()
 
bool readConfig (const char *fname)
 
bool readImage (const char *path)
 
bool readImagePNA (const char *phase, const char *amplitude)
 
bool readImageRNI (const char *real, const char *imaginary)
 
void Perform_Simulation ()
 
void Initialize ()
 
bool save (const char *fname, uint8_t bitsperpixel, uchar *src, uint px, uint py)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y, T max, T min)
 
 ophRec (void)
 Constructor. More...
 
void SaveImage (const char *path, const char *ext="bmp")
 
void setConfig (OphRecConfig config)
 
void SetMode (unsigned int mode)
 
OphRecConfiggetConfig ()
 
bool ReconstructImage ()
 
bool readConfig (const char *fname)
 
bool readImage (const char *path)
 
bool readImagePNA (const char *phase, const char *amplitude)
 
bool readImageRNI (const char *real, const char *imaginary)
 
void Perform_Simulation ()
 
void Initialize ()
 
bool save (const char *fname, uint8_t bitsperpixel, uchar *src, uint px, uint py)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y)
 
template<typename T >
void normalize (T *src, uchar *dst, int x, int y, T max, T min)
 
vector< uchar * > & getNormalizedBuffer ()
 
- Public Member Functions inherited from Openholo
 Openholo (void)
 Constructor. More...
 
virtual bool saveAsImg (const char *fname, uint8_t bitsperpixel, uchar *src, int width, int height)
 Function for creating image files. More...
 
virtual ucharloadAsImg (const char *fname)
 Function for loading image files. More...
 
virtual bool saveAsOhc (const char *fname)
 Function to write OHC file
More...
 
virtual bool loadAsOhc (const char *fname)
 Function to read OHC file. More...
 
Complex< Real > ** getComplexField (void)
 Function for getting the complex field. More...
 
OphConfiggetContext (void)
 Function for getting the current context. More...
 
ImageConfiggetImageConfig ()
 Function for getting the image config. More...
 
void setPixelNumber (ivec2 n)
 Function for setting the output resolution. More...
 
void setPixelNumber (int width, int height)
 
void setPixelPitch (vec2 p)
 Function for setting the output pixel pitch. More...
 
void setPixelPitch (Real pitchX, Real pitchY)
 
void setWaveLength (Real w, const uint idx=0)
 Function for setting the wave length. More...
 
void setWaveNum (int num)
 Function for setting the wave number. More...
 
void setOffset (ivec2 offset)
 Function for setting the offset. More...
 
void setImageMerge (bool merge)
 Function for setting the image merge(true or false) More...
 
void setImageRotate (bool rotate)
 Function for setting the image rotate(true or false) More...
 
void setImageFlip (int flip)
 Function for setting the image flip. More...
 
void setMaxThreadNum (int num)
 Function for setting the max thread num. More...
 
int getMaxThreadNum ()
 Function for getting the max thread num. More...
 
bool mergeColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate RGB image from each grayscale image. More...
 
bool separateColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate each grayscale image from RGB image. More...
 
 Openholo (void)
 Constructor. More...
 
virtual bool saveAsImg (const char *fname, uint8_t bitsperpixel, uchar *src, int width, int height)
 Function for creating image files. More...
 
virtual ucharloadAsImg (const char *fname)
 Function for loading image files. More...
 
virtual bool saveAsOhc (const char *fname)
 Function to write OHC file
More...
 
virtual bool loadAsOhc (const char *fname)
 Function to read OHC file. More...
 
Complex< Real > ** getComplexField (void)
 Function for getting the complex field. More...
 
OphConfiggetContext (void)
 Function for getting the current context. More...
 
ImageConfiggetImageConfig ()
 Function for getting the image config. More...
 
void setPixelNumber (ivec2 n)
 Function for setting the output resolution. More...
 
void setPixelNumber (int width, int height)
 
void setPixelPitch (vec2 p)
 Function for setting the output pixel pitch. More...
 
void setPixelPitch (Real pitchX, Real pitchY)
 
void setWaveLength (Real w, const uint idx=0)
 Function for setting the wave length. More...
 
void setWaveNum (int num)
 Function for setting the wave number. More...
 
void setOffset (ivec2 offset)
 Function for setting the offset. More...
 
void setImageMerge (bool merge)
 Function for setting the image merge(true or false) More...
 
void setImageRotate (bool rotate)
 Function for setting the image rotate(true or false) More...
 
void setImageFlip (int flip)
 Function for setting the image flip. More...
 
void setMaxThreadNum (int num)
 Function for setting the max thread num. More...
 
int getMaxThreadNum ()
 Function for getting the max thread num. More...
 
bool mergeColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate RGB image from each grayscale image. More...
 
bool separateColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate each grayscale image from RGB image. More...
 
 Openholo (void)
 Constructor. More...
 
virtual bool saveAsImg (const char *fname, uint8_t bitsperpixel, uchar *src, int width, int height)
 Function for creating image files. More...
 
virtual ucharloadAsImg (const char *fname)
 Function for loading image files. More...
 
virtual bool saveAsOhc (const char *fname)
 Function to write OHC file
More...
 
virtual bool loadAsOhc (const char *fname)
 Function to read OHC file. More...
 
Complex< Real > ** getComplexField (void)
 Function for getting the complex field. More...
 
OphConfiggetContext (void)
 Function for getting the current context. More...
 
ImageConfiggetImageConfig ()
 Function for getting the image config. More...
 
void setPixelNumber (ivec2 n)
 Function for setting the output resolution. More...
 
void setPixelNumber (int width, int height)
 
void setPixelPitch (vec2 p)
 Function for setting the output pixel pitch. More...
 
void setPixelPitch (Real pitchX, Real pitchY)
 
void setWaveLength (Real w, const uint idx=0)
 Function for setting the wave length. More...
 
void setWaveNum (int num)
 Function for setting the wave number. More...
 
void setOffset (ivec2 offset)
 Function for setting the offset. More...
 
void setImageMerge (bool merge)
 Function for setting the image merge(true or false) More...
 
void setImageRotate (bool rotate)
 Function for setting the image rotate(true or false) More...
 
void setImageFlip (int flip)
 Function for setting the image flip. More...
 
void setMaxThreadNum (int num)
 Function for setting the max thread num. More...
 
int getMaxThreadNum ()
 Function for getting the max thread num. More...
 
bool mergeColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate RGB image from each grayscale image. More...
 
bool separateColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate each grayscale image from RGB image. More...
 
 Openholo (void)
 Constructor. More...
 
virtual bool saveAsImg (const char *fname, uint8_t bitsperpixel, uchar *src, int width, int height)
 Function for creating image files. More...
 
virtual ucharloadAsImg (const char *fname)
 Function for loading image files. More...
 
virtual bool saveAsOhc (const char *fname)
 Function to write OHC file
More...
 
virtual bool loadAsOhc (const char *fname)
 Function to read OHC file. More...
 
Complex< Real > ** getComplexField (void)
 Function for getting the complex field. More...
 
OphConfiggetContext (void)
 Function for getting the current context. More...
 
ImageConfiggetImageConfig ()
 Function for getting the image config. More...
 
void setPixelNumber (ivec2 n)
 Function for setting the output resolution. More...
 
void setPixelNumber (int width, int height)
 
void setPixelPitch (vec2 p)
 Function for setting the output pixel pitch. More...
 
void setPixelPitch (Real pitchX, Real pitchY)
 
void setWaveLength (Real w, const uint idx=0)
 Function for setting the wave length. More...
 
void setWaveNum (int num)
 Function for setting the wave number. More...
 
void setOffset (ivec2 offset)
 Function for setting the offset. More...
 
void setImageMerge (bool merge)
 Function for setting the image merge(true or false) More...
 
void setImageRotate (bool rotate)
 Function for setting the image rotate(true or false) More...
 
void setImageFlip (int flip)
 Function for setting the image flip. More...
 
void setMaxThreadNum (int num)
 Function for setting the max thread num. More...
 
int getMaxThreadNum ()
 Function for getting the max thread num. More...
 
bool mergeColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate RGB image from each grayscale image. More...
 
bool separateColor (int idx, int width, int height, uchar *src, uchar *dst)
 Function for generate each grayscale image from RGB image. More...
 
- Public Member Functions inherited from Base
 Base (void)
 Constructor. More...
 
unsigned long addRef (void)
 If referenced this(Base's child, not abstract class) instance, must call this method. More...
 
unsigned long release (void)
 Call release() when reference is finished. More...
 
 Base (void)
 Constructor. More...
 
unsigned long addRef (void)
 If referenced this(Base's child, not abstract class) instance, must call this method. More...
 
unsigned long release (void)
 Call release() when reference is finished. More...
 
 Base (void)
 Constructor. More...
 
unsigned long addRef (void)
 If referenced this(Base's child, not abstract class) instance, must call this method. More...
 
unsigned long release (void)
 Call release() when reference is finished. More...
 
 Base (void)
 Constructor. More...
 
unsigned long addRef (void)
 If referenced this(Base's child, not abstract class) instance, must call this method. More...
 
unsigned long release (void)
 Call release() when reference is finished. More...
 

Protected Member Functions

virtual ~ophRec (void)
 Destructor. More...
 
virtual void ophFree (void)
 Pure virtual function for override in child classes. More...
 
void Clear ()
 
void GetPupilFieldFromHologram ()
 
void GetPupilFieldFromVWHologram ()
 
void Propagation_Fresnel_FFT (int chnum)
 
void ASM_Propagation ()
 
void ASM_Propagation_GPU ()
 
void GetPupilFieldImage (Complex< Real > *src, double *dst, int pnx, int pny, double ppx, double ppy, double scaleX, double scaleY)
 
void getVarname (int vtr, vec3 &var_vals, std::string &varname2)
 
virtual ~ophRec (void)
 Destructor. More...
 
virtual void ophFree (void)
 Pure virtual function for override in child classes. More...
 
void Clear ()
 
void GetPupilFieldFromHologram ()
 
void GetPupilFieldFromVWHologram ()
 
void Propagation_Fresnel_FFT (int chnum)
 
void ASM_Propagation ()
 
void ASM_Propagation_GPU ()
 
void GetPupilFieldImage (Complex< Real > *src, double *dst, int pnx, int pny, double ppx, double ppy, double scaleX, double scaleY)
 
void getVarname (int vtr, vec3 &var_vals, std::string &varname2)
 
virtual ~ophRec (void)
 Destructor. More...
 
virtual void ophFree (void)
 Pure virtual function for override in child classes. More...
 
void Clear ()
 
void GetPupilFieldFromHologram ()
 
void GetPupilFieldFromVWHologram ()
 
void Propagation_Fresnel_FFT (int chnum)
 
void ASM_Propagation ()
 
void ASM_Propagation_GPU ()
 
void GetPupilFieldImage (Complex< Real > *src, double *dst, int pnx, int pny, double ppx, double ppy, double scaleX, double scaleY)
 
void getVarname (int vtr, vec3 &var_vals, std::string &varname2)
 
virtual ~ophRec (void)
 Destructor. More...
 
virtual void ophFree (void)
 Pure virtual function for override in child classes. More...
 
void Clear ()
 
void GetPupilFieldFromHologram ()
 
void GetPupilFieldFromVWHologram ()
 
void Propagation_Fresnel_FFT (int chnum)
 
void ASM_Propagation ()
 
void ASM_Propagation_GPU ()
 
void GetPupilFieldImage (Complex< Real > *src, double *dst, int pnx, int pny, double ppx, double ppy, double scaleX, double scaleY)
 
void getVarname (int vtr, vec3 &var_vals, std::string &varname2)
 
- Protected Member Functions inherited from Openholo
virtual ~Openholo (void)=0
 Destructor. More...
 
bool checkExtension (const char *fname, const char *ext)
 Functions for extension checking. More...
 
bool loadAsImgUpSideDown (const char *fname, uchar *dst)
 Function for loading image files | Output image data upside down. More...
 
bool getImgSize (int &w, int &h, int &bytesperpixel, const char *fname)
 Function for getting the image size. More...
 
void imgScaleBilinear (uchar *src, uchar *dst, int w, int h, int neww, int newh, int channels=1)
 Function for change image size. More...
 
void convertToFormatGray8 (uchar *src, uchar *dst, int w, int h, int bytesperpixel)
 Function for convert image format to gray8. More...
 
void fft1 (int n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 1-dimension operations inside Openholo. More...
 
void fft2 (ivec2 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 2-dimension operations inside Openholo. More...
 
void fft3 (ivec3 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 3-dimension operations inside Openholo. More...
 
void fftExecute (Complex< Real > *out, bool bReverse=false)
 Execution functions to be called after fft1, fft2, and fft3. More...
 
void fftFree (void)
 Resource release method. More...
 
void fftInit2D (ivec2 size, int sign, unsigned int flag)
 initialize method for 2D FFT More...
 
void fft2 (Complex< Real > *src, Complex< Real > *dst, int nx, int ny, int type, bool bNormalized=false)
 Convert data from the spatial domain to the frequency domain using 2D FFT on CPU. More...
 
void fftShift (int nx, int ny, Complex< Real > *input, Complex< Real > *output)
 Swap the top-left quadrant of data with the bottom-right , and the top-right quadrant with the bottom-left. More...
 
void setPixelNumberOHC (const ivec2 pixel_number)
 getter/setter for OHC file read and write More...
 
void setPixelPitchOHC (const vec2 pixel_pitch)
 
void setWavelengthOHC (const Real wavelength, const LenUnit wavelength_unit)
 
void setWaveLengthNumOHC (const uint wavelength_num)
 
void setColorTypeOHC (const ColorType color_type)
 
void setColorArrangeOHC (const ColorArran color_arrange)
 
void setWaveLengthUnitOHC (const LenUnit length_unit)
 
void setFieldEncodingOHC (const FldStore field_store, const FldCodeType field_code_type)
 
void setPhaseEncodingOHC (const BPhaseCode phase_code, const vec2 phase_code_range)
 
void addWaveLengthNComplexFieldDataOHC (const Real wavelength, const OphComplexField &complex_field)
 Function to add ComplexField when adding wavelength data. More...
 
void addWaveLengthOHC (const Real wavelength)
 
void addComplexFieldDataOHC (const OphComplexField &complex_field)
 
void getPixelNumberOHC (ivec2 &pixel_number)
 
void getPixelPitchOHC (vec2 &pixel_pitch)
 
void getWavelengthOHC (vector< Real > &wavelength)
 
void getWaveLengthNumOHC (uint &wavelength_num)
 
void getColorTypeOHC (ColorType &color_type)
 
void getColorArrangeOHC (ColorArran &color_arrange)
 
void getWaveLengthUnitOHC (LenUnit &length_unit)
 
void getComplexFieldDataOHC (Complex< Real > **cmplx, uint wavelen_idx)
 
void getComplexFieldDataOHC (OphComplexField &cmplx, uint wavelen_idx)
 
virtual ~Openholo (void)=0
 Destructor. More...
 
bool checkExtension (const char *fname, const char *ext)
 Functions for extension checking. More...
 
bool loadAsImgUpSideDown (const char *fname, uchar *dst)
 Function for loading image files | Output image data upside down. More...
 
bool getImgSize (int &w, int &h, int &bytesperpixel, const char *fname)
 Function for getting the image size. More...
 
void imgScaleBilinear (uchar *src, uchar *dst, int w, int h, int neww, int newh, int channels=1)
 Function for change image size. More...
 
void convertToFormatGray8 (uchar *src, uchar *dst, int w, int h, int bytesperpixel)
 Function for convert image format to gray8. More...
 
void fft1 (int n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 1-dimension operations inside Openholo. More...
 
void fft2 (ivec2 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 2-dimension operations inside Openholo. More...
 
void fft3 (ivec3 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 3-dimension operations inside Openholo. More...
 
void fftExecute (Complex< Real > *out, bool bReverse=false)
 Execution functions to be called after fft1, fft2, and fft3. More...
 
void fftFree (void)
 Resource release method. More...
 
void fftInit2D (ivec2 size, int sign, unsigned int flag)
 initialize method for 2D FFT More...
 
void fft2 (Complex< Real > *src, Complex< Real > *dst, int nx, int ny, int type, bool bNormalized=false)
 Convert data from the spatial domain to the frequency domain using 2D FFT on CPU. More...
 
void fftShift (int nx, int ny, Complex< Real > *input, Complex< Real > *output)
 Swap the top-left quadrant of data with the bottom-right , and the top-right quadrant with the bottom-left. More...
 
void setPixelNumberOHC (const ivec2 pixel_number)
 getter/setter for OHC file read and write More...
 
void setPixelPitchOHC (const vec2 pixel_pitch)
 
void setWavelengthOHC (const Real wavelength, const LenUnit wavelength_unit)
 
void setWaveLengthNumOHC (const uint wavelength_num)
 
void setColorTypeOHC (const ColorType color_type)
 
void setColorArrangeOHC (const ColorArran color_arrange)
 
void setWaveLengthUnitOHC (const LenUnit length_unit)
 
void setFieldEncodingOHC (const FldStore field_store, const FldCodeType field_code_type)
 
void setPhaseEncodingOHC (const BPhaseCode phase_code, const vec2 phase_code_range)
 
void addWaveLengthNComplexFieldDataOHC (const Real wavelength, const OphComplexField &complex_field)
 Function to add ComplexField when adding wavelength data. More...
 
void addWaveLengthOHC (const Real wavelength)
 
void addComplexFieldDataOHC (const OphComplexField &complex_field)
 
void getPixelNumberOHC (ivec2 &pixel_number)
 
void getPixelPitchOHC (vec2 &pixel_pitch)
 
void getWavelengthOHC (vector< Real > &wavelength)
 
void getWaveLengthNumOHC (uint &wavelength_num)
 
void getColorTypeOHC (ColorType &color_type)
 
void getColorArrangeOHC (ColorArran &color_arrange)
 
void getWaveLengthUnitOHC (LenUnit &length_unit)
 
void getComplexFieldDataOHC (Complex< Real > **cmplx, uint wavelen_idx)
 
void getComplexFieldDataOHC (OphComplexField &cmplx, uint wavelen_idx)
 
virtual ~Openholo (void)=0
 Destructor. More...
 
bool checkExtension (const char *fname, const char *ext)
 Functions for extension checking. More...
 
bool loadAsImgUpSideDown (const char *fname, uchar *dst)
 Function for loading image files | Output image data upside down. More...
 
bool getImgSize (int &w, int &h, int &bytesperpixel, const char *fname)
 Function for getting the image size. More...
 
void imgScaleBilinear (uchar *src, uchar *dst, int w, int h, int neww, int newh, int channels=1)
 Function for change image size. More...
 
void convertToFormatGray8 (uchar *src, uchar *dst, int w, int h, int bytesperpixel)
 Function for convert image format to gray8. More...
 
void fft1 (int n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 1-dimension operations inside Openholo. More...
 
void fft2 (ivec2 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 2-dimension operations inside Openholo. More...
 
void fft3 (ivec3 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 3-dimension operations inside Openholo. More...
 
void fftExecute (Complex< Real > *out, bool bReverse=false)
 Execution functions to be called after fft1, fft2, and fft3. More...
 
void fftFree (void)
 Resource release method. More...
 
void fftInit2D (ivec2 size, int sign, unsigned int flag)
 initialize method for 2D FFT More...
 
void fft2 (Complex< Real > *src, Complex< Real > *dst, int nx, int ny, int type, bool bNormalized=false)
 Convert data from the spatial domain to the frequency domain using 2D FFT on CPU. More...
 
void fftShift (int nx, int ny, Complex< Real > *input, Complex< Real > *output)
 Swap the top-left quadrant of data with the bottom-right , and the top-right quadrant with the bottom-left. More...
 
void setPixelNumberOHC (const ivec2 pixel_number)
 getter/setter for OHC file read and write More...
 
void setPixelPitchOHC (const vec2 pixel_pitch)
 
void setWavelengthOHC (const Real wavelength, const LenUnit wavelength_unit)
 
void setWaveLengthNumOHC (const uint wavelength_num)
 
void setColorTypeOHC (const ColorType color_type)
 
void setColorArrangeOHC (const ColorArran color_arrange)
 
void setWaveLengthUnitOHC (const LenUnit length_unit)
 
void setFieldEncodingOHC (const FldStore field_store, const FldCodeType field_code_type)
 
void setPhaseEncodingOHC (const BPhaseCode phase_code, const vec2 phase_code_range)
 
void addWaveLengthNComplexFieldDataOHC (const Real wavelength, const OphComplexField &complex_field)
 Function to add ComplexField when adding wavelength data. More...
 
void addWaveLengthOHC (const Real wavelength)
 
void addComplexFieldDataOHC (const OphComplexField &complex_field)
 
void getPixelNumberOHC (ivec2 &pixel_number)
 
void getPixelPitchOHC (vec2 &pixel_pitch)
 
void getWavelengthOHC (vector< Real > &wavelength)
 
void getWaveLengthNumOHC (uint &wavelength_num)
 
void getColorTypeOHC (ColorType &color_type)
 
void getColorArrangeOHC (ColorArran &color_arrange)
 
void getWaveLengthUnitOHC (LenUnit &length_unit)
 
void getComplexFieldDataOHC (Complex< Real > **cmplx, uint wavelen_idx)
 
void getComplexFieldDataOHC (OphComplexField &cmplx, uint wavelen_idx)
 
virtual ~Openholo (void)=0
 Destructor. More...
 
bool checkExtension (const char *fname, const char *ext)
 Functions for extension checking. More...
 
bool loadAsImgUpSideDown (const char *fname, uchar *dst)
 Function for loading image files | Output image data upside down. More...
 
bool getImgSize (int &w, int &h, int &bytesperpixel, const char *fname)
 Function for getting the image size. More...
 
void imgScaleBilinear (uchar *src, uchar *dst, int w, int h, int neww, int newh, int channels=1)
 Function for change image size. More...
 
void convertToFormatGray8 (uchar *src, uchar *dst, int w, int h, int bytesperpixel)
 Function for convert image format to gray8. More...
 
void fft1 (int n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 1-dimension operations inside Openholo. More...
 
void fft2 (ivec2 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 2-dimension operations inside Openholo. More...
 
void fft3 (ivec3 n, Complex< Real > *in, int sign=OPH_FORWARD, uint flag=OPH_ESTIMATE)
 Functions for performing fftw 3-dimension operations inside Openholo. More...
 
void fftExecute (Complex< Real > *out, bool bReverse=false)
 Execution functions to be called after fft1, fft2, and fft3. More...
 
void fftFree (void)
 Resource release method. More...
 
void fftInit2D (ivec2 size, int sign, unsigned int flag)
 initialize method for 2D FFT More...
 
void fft2 (Complex< Real > *src, Complex< Real > *dst, int nx, int ny, int type, bool bNormalized=false)
 Convert data from the spatial domain to the frequency domain using 2D FFT on CPU. More...
 
void fftShift (int nx, int ny, Complex< Real > *input, Complex< Real > *output)
 Swap the top-left quadrant of data with the bottom-right , and the top-right quadrant with the bottom-left. More...
 
void setPixelNumberOHC (const ivec2 pixel_number)
 getter/setter for OHC file read and write More...
 
void setPixelPitchOHC (const vec2 pixel_pitch)
 
void setWavelengthOHC (const Real wavelength, const LenUnit wavelength_unit)
 
void setWaveLengthNumOHC (const uint wavelength_num)
 
void setColorTypeOHC (const ColorType color_type)
 
void setColorArrangeOHC (const ColorArran color_arrange)
 
void setWaveLengthUnitOHC (const LenUnit length_unit)
 
void setFieldEncodingOHC (const FldStore field_store, const FldCodeType field_code_type)
 
void setPhaseEncodingOHC (const BPhaseCode phase_code, const vec2 phase_code_range)
 
void addWaveLengthNComplexFieldDataOHC (const Real wavelength, const OphComplexField &complex_field)
 Function to add ComplexField when adding wavelength data. More...
 
void addWaveLengthOHC (const Real wavelength)
 
void addComplexFieldDataOHC (const OphComplexField &complex_field)
 
void getPixelNumberOHC (ivec2 &pixel_number)
 
void getPixelPitchOHC (vec2 &pixel_pitch)
 
void getWavelengthOHC (vector< Real > &wavelength)
 
void getWaveLengthNumOHC (uint &wavelength_num)
 
void getColorTypeOHC (ColorType &color_type)
 
void getColorArrangeOHC (ColorArran &color_arrange)
 
void getWaveLengthUnitOHC (LenUnit &length_unit)
 
void getComplexFieldDataOHC (Complex< Real > **cmplx, uint wavelen_idx)
 
void getComplexFieldDataOHC (OphComplexField &cmplx, uint wavelen_idx)
 
- Protected Member Functions inherited from Base
virtual ~Base (void)
 Destructor. More...
 
virtual ~Base (void)
 Destructor. More...
 
virtual ~Base (void)
 Destructor. More...
 
virtual ~Base (void)
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from Openholo
OphConfig context_
 
ResolutionConfig resCfg
 
ImageConfig imgCfg
 
Complex< Real > ** complex_H
 
ImgEncoderOhcOHC_encoder
 OHC file format Variables for read and write. More...
 
ImgDecoderOhcOHC_decoder
 
- Protected Attributes inherited from Base
unsigned long refCnt
 

Detailed Description

Author

Definition at line 85 of file ophRec.h.

Constructor & Destructor Documentation

◆ ophRec() [1/4]

ophRec::ophRec ( void  )
explicit

Constructor.

Definition at line 55 of file ophRec.cpp.

◆ ~ophRec() [1/4]

ophRec::~ophRec ( void  )
protectedvirtual

Destructor.

Definition at line 63 of file ophRec.cpp.

◆ ophRec() [2/4]

ophRec::ophRec ( void  )
explicit

Constructor.

◆ ~ophRec() [2/4]

virtual ophRec::~ophRec ( void  )
protectedvirtual

Destructor.

◆ ophRec() [3/4]

ophRec::ophRec ( void  )
explicit

Constructor.

◆ ~ophRec() [3/4]

virtual ophRec::~ophRec ( void  )
protectedvirtual

Destructor.

◆ ophRec() [4/4]

ophRec::ophRec ( void  )
explicit

Constructor.

◆ ~ophRec() [4/4]

virtual ophRec::~ophRec ( void  )
protectedvirtual

Destructor.

Member Function Documentation

◆ ASM_Propagation() [1/4]

void ophRec::ASM_Propagation ( )
protected

Definition at line 592 of file ophRec.cpp.

◆ ASM_Propagation() [2/4]

void ophRec::ASM_Propagation ( )
protected

◆ ASM_Propagation() [3/4]

void ophRec::ASM_Propagation ( )
protected

◆ ASM_Propagation() [4/4]

void ophRec::ASM_Propagation ( )
protected

◆ ASM_Propagation_GPU() [1/4]

void ophRec::ASM_Propagation_GPU ( )
protected

◆ ASM_Propagation_GPU() [2/4]

void ophRec::ASM_Propagation_GPU ( )
protected

Definition at line 49 of file ophRec_GPU.cpp.

◆ ASM_Propagation_GPU() [3/4]

void ophRec::ASM_Propagation_GPU ( )
protected

◆ ASM_Propagation_GPU() [4/4]

void ophRec::ASM_Propagation_GPU ( )
protected

◆ Clear() [1/4]

void ophRec::Clear ( )
protected

◆ Clear() [2/4]

void ophRec::Clear ( )
protected

Definition at line 1458 of file ophRec.cpp.

◆ Clear() [3/4]

void ophRec::Clear ( )
protected

◆ Clear() [4/4]

void ophRec::Clear ( )
protected

◆ getConfig() [1/4]

OphRecConfig& ophRec::getConfig ( )
inline

Definition at line 148 of file ophRec.h.

◆ getConfig() [2/4]

OphRecConfig& ophRec::getConfig ( )
inline

Definition at line 148 of file ophRec.h.

◆ getConfig() [3/4]

OphRecConfig& ophRec::getConfig ( )
inline

Definition at line 167 of file ophRec.h.

◆ getConfig() [4/4]

OphRecConfig& ophRec::getConfig ( )
inline

Definition at line 167 of file ophRec.h.

◆ getNormalizedBuffer() [1/2]

vector<uchar*>& ophRec::getNormalizedBuffer ( )
inline

Definition at line 217 of file ophRec.h.

◆ getNormalizedBuffer() [2/2]

vector<uchar*>& ophRec::getNormalizedBuffer ( )
inline

Definition at line 217 of file ophRec.h.

◆ GetPupilFieldFromHologram() [1/4]

void ophRec::GetPupilFieldFromHologram ( )
protected

◆ GetPupilFieldFromHologram() [2/4]

void ophRec::GetPupilFieldFromHologram ( )
protected

Definition at line 449 of file ophRec.cpp.

◆ GetPupilFieldFromHologram() [3/4]

void ophRec::GetPupilFieldFromHologram ( )
protected

◆ GetPupilFieldFromHologram() [4/4]

void ophRec::GetPupilFieldFromHologram ( )
protected

◆ GetPupilFieldFromVWHologram() [1/4]

void ophRec::GetPupilFieldFromVWHologram ( )
protected

Definition at line 470 of file ophRec.cpp.

◆ GetPupilFieldFromVWHologram() [2/4]

void ophRec::GetPupilFieldFromVWHologram ( )
protected

◆ GetPupilFieldFromVWHologram() [3/4]

void ophRec::GetPupilFieldFromVWHologram ( )
protected

◆ GetPupilFieldFromVWHologram() [4/4]

void ophRec::GetPupilFieldFromVWHologram ( )
protected

◆ GetPupilFieldImage() [1/4]

void ophRec::GetPupilFieldImage ( Complex< Real > *  src,
double *  dst,
int  pnx,
int  pny,
double  ppx,
double  ppy,
double  scaleX,
double  scaleY 
)
protected

◆ GetPupilFieldImage() [2/4]

void ophRec::GetPupilFieldImage ( Complex< Real > *  src,
double *  dst,
int  pnx,
int  pny,
double  ppx,
double  ppy,
double  scaleX,
double  scaleY 
)
protected

◆ GetPupilFieldImage() [3/4]

void ophRec::GetPupilFieldImage ( Complex< Real > *  src,
double *  dst,
int  pnx,
int  pny,
double  ppx,
double  ppy,
double  scaleX,
double  scaleY 
)
protected

◆ GetPupilFieldImage() [4/4]

void ophRec::GetPupilFieldImage ( Complex< Real > *  src,
double *  dst,
int  pnx,
int  pny,
double  ppx,
double  ppy,
double  scaleX,
double  scaleY 
)
protected

◆ getVarname() [1/4]

void ophRec::getVarname ( int  vtr,
vec3 var_vals,
std::string &  varname2 
)
protected

◆ getVarname() [2/4]

void ophRec::getVarname ( int  vtr,
vec3 var_vals,
std::string &  varname2 
)
protected

◆ getVarname() [3/4]

void ophRec::getVarname ( int  vtr,
vec3 &  var_vals,
std::string &  varname2 
)
protected

Definition at line 1401 of file ophRec.cpp.

◆ getVarname() [4/4]

void ophRec::getVarname ( int  vtr,
vec3 &  var_vals,
std::string &  varname2 
)
protected

◆ Initialize() [1/4]

void ophRec::Initialize ( )

◆ Initialize() [2/4]

void ophRec::Initialize ( )

Definition at line 1495 of file ophRec.cpp.

◆ Initialize() [3/4]

void ophRec::Initialize ( )

◆ Initialize() [4/4]

void ophRec::Initialize ( )

◆ normalize() [1/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar dst,
int  x,
int  y 
)

◆ normalize() [2/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar dst,
int  x,
int  y 
)

◆ normalize() [3/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar dst,
int  x,
int  y,
max,
min 
)

◆ normalize() [4/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar dst,
int  x,
int  y,
max,
min 
)

◆ normalize() [5/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar *  dst,
int  x,
int  y 
)
inline

Definition at line 177 of file ophRec.h.

◆ normalize() [6/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar *  dst,
int  x,
int  y 
)
inline

Definition at line 177 of file ophRec.h.

◆ normalize() [7/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar *  dst,
int  x,
int  y,
max,
min 
)
inline

Definition at line 204 of file ophRec.h.

◆ normalize() [8/8]

template<typename T >
void ophRec::normalize ( T *  src,
uchar *  dst,
int  x,
int  y,
max,
min 
)
inline

Definition at line 204 of file ophRec.h.

◆ ophFree() [1/4]

void ophRec::ophFree ( void  )
protectedvirtual

Pure virtual function for override in child classes.

Reimplemented from Openholo.

Reimplemented in ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophWaveAberration, ophWaveAberration, ophWaveAberration, and ophWaveAberration.

Definition at line 1519 of file ophRec.cpp.

◆ ophFree() [2/4]

virtual void ophRec::ophFree ( void  )
protectedvirtual

Pure virtual function for override in child classes.

Reimplemented from Openholo.

Reimplemented in ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophWaveAberration, ophWaveAberration, ophWaveAberration, and ophWaveAberration.

◆ ophFree() [3/4]

virtual void ophRec::ophFree ( void  )
protectedvirtual

Pure virtual function for override in child classes.

Reimplemented from Openholo.

Reimplemented in ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophWaveAberration, ophWaveAberration, ophWaveAberration, and ophWaveAberration.

◆ ophFree() [4/4]

virtual void ophRec::ophFree ( void  )
protectedvirtual

Pure virtual function for override in child classes.

Reimplemented from Openholo.

Reimplemented in ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophCascadedPropagation, ophWaveAberration, ophWaveAberration, ophWaveAberration, and ophWaveAberration.

◆ Perform_Simulation() [1/4]

void ophRec::Perform_Simulation ( )

◆ Perform_Simulation() [2/4]

void ophRec::Perform_Simulation ( )

Definition at line 832 of file ophRec.cpp.

◆ Perform_Simulation() [3/4]

void ophRec::Perform_Simulation ( )

◆ Perform_Simulation() [4/4]

void ophRec::Perform_Simulation ( )

◆ Propagation_Fresnel_FFT() [1/4]

void ophRec::Propagation_Fresnel_FFT ( int  chnum)
protected

Definition at line 729 of file ophRec.cpp.

◆ Propagation_Fresnel_FFT() [2/4]

void ophRec::Propagation_Fresnel_FFT ( int  chnum)
protected

◆ Propagation_Fresnel_FFT() [3/4]

void ophRec::Propagation_Fresnel_FFT ( int  chnum)
protected

◆ Propagation_Fresnel_FFT() [4/4]

void ophRec::Propagation_Fresnel_FFT ( int  chnum)
protected

◆ readConfig() [1/4]

bool ophRec::readConfig ( const char *  fname)

Definition at line 74 of file ophRec.cpp.

◆ readConfig() [2/4]

bool ophRec::readConfig ( const char *  fname)

◆ readConfig() [3/4]

bool ophRec::readConfig ( const char *  fname)

◆ readConfig() [4/4]

bool ophRec::readConfig ( const char *  fname)

◆ readImage() [1/4]

bool ophRec::readImage ( const char *  path)

Definition at line 244 of file ophRec.cpp.

◆ readImage() [2/4]

bool ophRec::readImage ( const char *  path)

◆ readImage() [3/4]

bool ophRec::readImage ( const char *  path)

◆ readImage() [4/4]

bool ophRec::readImage ( const char *  path)

◆ readImagePNA() [1/4]

bool ophRec::readImagePNA ( const char *  phase,
const char *  amplitude 
)

Definition at line 291 of file ophRec.cpp.

◆ readImagePNA() [2/4]

bool ophRec::readImagePNA ( const char *  phase,
const char *  amplitude 
)

◆ readImagePNA() [3/4]

bool ophRec::readImagePNA ( const char *  phase,
const char *  amplitude 
)

◆ readImagePNA() [4/4]

bool ophRec::readImagePNA ( const char *  phase,
const char *  amplitude 
)

◆ readImageRNI() [1/4]

bool ophRec::readImageRNI ( const char *  real,
const char *  imaginary 
)

◆ readImageRNI() [2/4]

bool ophRec::readImageRNI ( const char *  real,
const char *  imaginary 
)

Definition at line 375 of file ophRec.cpp.

◆ readImageRNI() [3/4]

bool ophRec::readImageRNI ( const char *  real,
const char *  imaginary 
)

◆ readImageRNI() [4/4]

bool ophRec::readImageRNI ( const char *  real,
const char *  imaginary 
)

◆ ReconstructImage() [1/4]

bool ophRec::ReconstructImage ( )

◆ ReconstructImage() [2/4]

bool ophRec::ReconstructImage ( )

Definition at line 1473 of file ophRec.cpp.

◆ ReconstructImage() [3/4]

bool ophRec::ReconstructImage ( )

◆ ReconstructImage() [4/4]

bool ophRec::ReconstructImage ( )

◆ save() [1/4]

bool ophRec::save ( const char *  fname,
uint8_t  bitsperpixel,
uchar src,
uint  px,
uint  py 
)

◆ save() [2/4]

bool ophRec::save ( const char *  fname,
uint8_t  bitsperpixel,
uchar src,
uint  px,
uint  py 
)

◆ save() [3/4]

bool ophRec::save ( const char *  fname,
uint8_t  bitsperpixel,
uchar *  src,
uint  px,
uint  py 
)

◆ save() [4/4]

bool ophRec::save ( const char *  fname,
uint8_t  bitsperpixel,
uchar *  src,
uint  px,
uint  py 
)

Definition at line 1204 of file ophRec.cpp.

◆ SaveImage() [1/4]

void ophRec::SaveImage ( const char *  path,
const char *  ext = "bmp" 
)

Definition at line 1277 of file ophRec.cpp.

◆ SaveImage() [2/4]

void ophRec::SaveImage ( const char *  path,
const char *  ext = "bmp" 
)

◆ SaveImage() [3/4]

void ophRec::SaveImage ( const char *  path,
const char *  ext = "bmp" 
)

◆ SaveImage() [4/4]

void ophRec::SaveImage ( const char *  path,
const char *  ext = "bmp" 
)

◆ setConfig() [1/4]

void ophRec::setConfig ( OphRecConfig  config)
inline

Definition at line 146 of file ophRec.h.

◆ setConfig() [2/4]

void ophRec::setConfig ( OphRecConfig  config)
inline

Definition at line 146 of file ophRec.h.

◆ setConfig() [3/4]

void ophRec::setConfig ( OphRecConfig  config)
inline

Definition at line 165 of file ophRec.h.

◆ setConfig() [4/4]

void ophRec::setConfig ( OphRecConfig  config)
inline

Definition at line 165 of file ophRec.h.

◆ SetMode() [1/4]

void ophRec::SetMode ( unsigned int  mode)
inline

Definition at line 147 of file ophRec.h.

◆ SetMode() [2/4]

void ophRec::SetMode ( unsigned int  mode)
inline

Definition at line 147 of file ophRec.h.

◆ SetMode() [3/4]

void ophRec::SetMode ( unsigned int  mode)
inline

Definition at line 166 of file ophRec.h.

◆ SetMode() [4/4]

void ophRec::SetMode ( unsigned int  mode)
inline

Definition at line 166 of file ophRec.h.


The documentation for this class was generated from the following files: