Openholo  v2.0
Open Source Digital Holographic Library
Openholo Class Referenceabstract

Abstract class. More...

#include <Openholo.h>

Inheritance diagram for Openholo:
Collaboration diagram for Openholo:

Public Member Functions

 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 nNum)
 
void setImageMerge (bool bMerge)
 
void setImageRotate (bool rotate)
 
void setImageFlip (int flip)
 
bool getImageRotate ()
 
void SetMaxThreadNum (int num)
 
int GetMaxThreadNum ()
 
bool mergeColor (int idx, int width, int height, uchar *src, uchar *dst)
 
bool separateColor (int idx, int width, int height, uchar *src, uchar *dst)
 
 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 nNum)
 
void setImageMerge (bool bMerge)
 
void setImageRotate (bool rotate)
 
void setImageFlip (int flip)
 
bool getImageRotate ()
 
void SetMaxThreadNum (int num)
 
int GetMaxThreadNum ()
 
bool mergeColor (int idx, int width, int height, uchar *src, uchar *dst)
 
bool separateColor (int idx, int width, int height, uchar *src, uchar *dst)
 
- 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...
 

Protected Member Functions

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 ImageRotation (double rotate, uchar *src, uchar *dst, int w, int h, int channels)
 
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)
 
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 fftShift (int nx, int ny, Complex< Real > *input, fftw_complex *output)
 
void fftShift (int nx, int ny, fftw_complex *input, Complex< Real > *output)
 
virtual void ophFree (void)
 Pure virtual function for override in child classes. 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 ImageRotation (double rotate, uchar *src, uchar *dst, int w, int h, int channels)
 
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)
 
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 fftShift (int nx, int ny, Complex< Real > *input, fftw_complex *output)
 
void fftShift (int nx, int ny, fftw_complex *input, Complex< Real > *output)
 
virtual void ophFree (void)
 Pure virtual function for override in child classes. 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...
 

Protected Attributes

OphConfig context_
 
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

Abstract class.

Top class of Openholo library. Common functions required by subclasses are implemented.

Author
Kim Ryeon-woo, Nam Min-woo

Definition at line 88 of file Openholo.h.

Constructor & Destructor Documentation

◆ Openholo() [1/2]

Openholo::Openholo ( void  )
explicit

Constructor.

Definition at line 55 of file Openholo.cpp.

◆ ~Openholo() [1/2]

Openholo::~Openholo ( void  )
protectedpure virtual

Destructor.

Pure virtual function for class abstraction

Definition at line 76 of file Openholo.cpp.

◆ Openholo() [2/2]

Openholo::Openholo ( void  )
explicit

Constructor.

◆ ~Openholo() [2/2]

virtual Openholo::~Openholo ( void  )
protectedpure virtual

Destructor.

Pure virtual function for class abstraction

Member Function Documentation

◆ addComplexFieldDataOHC() [1/2]

void Openholo::addComplexFieldDataOHC ( const OphComplexField complex_field)
inlineprotected

Definition at line 388 of file Openholo.h.

◆ addComplexFieldDataOHC() [2/2]

void Openholo::addComplexFieldDataOHC ( const OphComplexField complex_field)
inlineprotected

Definition at line 388 of file Openholo.h.

◆ addWaveLengthNComplexFieldDataOHC() [1/2]

void Openholo::addWaveLengthNComplexFieldDataOHC ( const Real  wavelength,
const OphComplexField complex_field 
)
inlineprotected

Function to add ComplexField when adding wavelength data.

Definition at line 382 of file Openholo.h.

◆ addWaveLengthNComplexFieldDataOHC() [2/2]

void Openholo::addWaveLengthNComplexFieldDataOHC ( const Real  wavelength,
const OphComplexField complex_field 
)
inlineprotected

Function to add ComplexField when adding wavelength data.

Definition at line 382 of file Openholo.h.

◆ addWaveLengthOHC() [1/2]

void Openholo::addWaveLengthOHC ( const Real  wavelength)
inlineprotected

Definition at line 385 of file Openholo.h.

◆ addWaveLengthOHC() [2/2]

void Openholo::addWaveLengthOHC ( const Real  wavelength)
inlineprotected

Definition at line 385 of file Openholo.h.

◆ checkExtension() [1/2]

bool Openholo::checkExtension ( const char *  fname,
const char *  ext 
)
protected

Functions for extension checking.

Parameters
[in]fnameFile name
[in]extFile extension
Returns
Type: bool
If fname contains ext, the return value is true.
If fname not contains ext, the return value is false.

Definition at line 89 of file Openholo.cpp.

◆ checkExtension() [2/2]

bool Openholo::checkExtension ( const char *  fname,
const char *  ext 
)
protected

Functions for extension checking.

Parameters
[in]fnameFile name
[in]extFile extension
Returns
Type: bool
If fname contains ext, the return value is true.
If fname not contains ext, the return value is false.

◆ convertToFormatGray8() [1/2]

void Openholo::convertToFormatGray8 ( uchar src,
uchar dst,
int  w,
int  h,
int  bytesperpixel 
)
protected

Function for convert image format to gray8.

Parameters
[in]srcSource image data.
[in]dstDestination image data.
[in]wImage size, width.
[in]hImage size, Height.
[in]bytesperpixelBytes per pixel.

◆ convertToFormatGray8() [2/2]

void Openholo::convertToFormatGray8 ( uchar src,
uchar dst,
int  w,
int  h,
int  bytesperpixel 
)
protected

Function for convert image format to gray8.

Parameters
[in]srcSource image data.
[in]dstDestination image data.
[in]wImage size, width.
[in]hImage size, Height.
[in]bytesperpixelBytes per pixel.

Definition at line 560 of file Openholo.cpp.

◆ fft1() [1/2]

void Openholo::fft1 ( int  n,
Complex< Real > *  in,
int  sign = OPH_FORWARD,
uint  flag = OPH_ESTIMATE 
)
protected

Functions for performing fftw 1-dimension operations inside Openholo.

Parameters
[in]nNumber of data.
[in]inSource of data.
[in]signSign of FFTW(FORWARD or BACKWARD)
[in]flagFlag of FFTW(MEASURE, DESTROY_INPUT, UNALIGNED, CONSERVE_MEMORY, EXHAUSTIVE, PRESERVE_INPUT, PATIENT, ESTIMATE, WISDOM_ONLY)

◆ fft1() [2/2]

void Openholo::fft1 ( int  n,
Complex< Real > *  in,
int  sign = OPH_FORWARD,
uint  flag = OPH_ESTIMATE 
)
protected

Functions for performing fftw 1-dimension operations inside Openholo.

Parameters
[in]nNumber of data.
[in]inSource of data.
[in]signSign of FFTW(FORWARD or BACKWARD)
[in]flagFlag of FFTW(MEASURE, DESTROY_INPUT, UNALIGNED, CONSERVE_MEMORY, EXHAUSTIVE, PRESERVE_INPUT, PATIENT, ESTIMATE, WISDOM_ONLY)

Definition at line 574 of file Openholo.cpp.

◆ fft2() [1/4]

void Openholo::fft2 ( ivec2  n,
Complex< Real > *  in,
int  sign = OPH_FORWARD,
uint  flag = OPH_ESTIMATE 
)
protected

Functions for performing fftw 2-dimension operations inside Openholo.

Parameters
[in]nNumber of data(int x, int y)
[in]inSource of data.
[in]signSign of FFTW(FORWARD or BACKWARD)
[in]flagFlag of FFTW(MEASURE, DESTROY_INPUT, UNALIGNED, CONSERVE_MEMORY, EXHAUSTIVE, PRESERVE_INPUT, PATIENT, ESTIMATE, WISDOM_ONLY)

◆ fft2() [2/4]

void Openholo::fft2 ( ivec2  n,
Complex< Real > *  in,
int  sign = OPH_FORWARD,
uint  flag = OPH_ESTIMATE 
)
protected

Functions for performing fftw 2-dimension operations inside Openholo.

Parameters
[in]nNumber of data(int x, int y)
[in]inSource of data.
[in]signSign of FFTW(FORWARD or BACKWARD)
[in]flagFlag of FFTW(MEASURE, DESTROY_INPUT, UNALIGNED, CONSERVE_MEMORY, EXHAUSTIVE, PRESERVE_INPUT, PATIENT, ESTIMATE, WISDOM_ONLY)

◆ fft2() [3/4]

void Openholo::fft2 ( Complex< Real > *  src,
Complex< Real > *  dst,
int  nx,
int  ny,
int  type,
bool  bNormalized = false 
)
protected

Convert data from the spatial domain to the frequency domain using 2D FFT on CPU.

Parameters
[in]srcInput data variable.
[out]dstOutput data variable.
[in]nxthe number of column of the input data.
[in]nythe number of row of the input data.
[in]typeIf type == 1, forward FFT, if type == -1, backward FFT.
[in]bNormalizedIf bNomarlized == true, normalize the result after FFT.

Definition at line 736 of file Openholo.cpp.

◆ fft2() [4/4]

void Openholo::fft2 ( Complex< Real > *  src,
Complex< Real > *  dst,
int  nx,
int  ny,
int  type,
bool  bNormalized = false 
)
protected

Convert data from the spatial domain to the frequency domain using 2D FFT on CPU.

Parameters
[in]srcInput data variable.
[out]dstOutput data variable.
[in]nxthe number of column of the input data.
[in]nythe number of row of the input data.
[in]typeIf type == 1, forward FFT, if type == -1, backward FFT.
[in]bNormalizedIf bNomarlized == true, normalize the result after FFT.

◆ fft3() [1/2]

void Openholo::fft3 ( ivec3  n,
Complex< Real > *  in,
int  sign = OPH_FORWARD,
uint  flag = OPH_ESTIMATE 
)
protected

Functions for performing fftw 3-dimension operations inside Openholo.

Parameters
[in]nNumber of data(int x, int y, int z)
[in]inSource of data.
[in]signSign of FFTW(FORWARD or BACKWARD)
[in]flagFlag of FFTW(MEASURE, DESTROY_INPUT, UNALIGNED, CONSERVE_MEMORY, EXHAUSTIVE, PRESERVE_INPUT, PATIENT, ESTIMATE, WISDOM_ONLY)

◆ fft3() [2/2]

void Openholo::fft3 ( ivec3  n,
Complex< Real > *  in,
int  sign = OPH_FORWARD,
uint  flag = OPH_ESTIMATE 
)
protected

Functions for performing fftw 3-dimension operations inside Openholo.

Parameters
[in]nNumber of data(int x, int y, int z)
[in]inSource of data.
[in]signSign of FFTW(FORWARD or BACKWARD)
[in]flagFlag of FFTW(MEASURE, DESTROY_INPUT, UNALIGNED, CONSERVE_MEMORY, EXHAUSTIVE, PRESERVE_INPUT, PATIENT, ESTIMATE, WISDOM_ONLY)

◆ fftExecute() [1/2]

void Openholo::fftExecute ( Complex< Real > *  out,
bool  bReverse = false 
)
protected

Execution functions to be called after fft1, fft2, and fft3.

Parameters
[out]outDest of data.

◆ fftExecute() [2/2]

void Openholo::fftExecute ( Complex< Real > *  out,
bool  bReverse = false 
)
protected

Execution functions to be called after fft1, fft2, and fft3.

Parameters
[out]outDest of data.

Definition at line 676 of file Openholo.cpp.

◆ fftFree() [1/2]

void Openholo::fftFree ( void  )
protected

Definition at line 715 of file Openholo.cpp.

◆ fftFree() [2/2]

void Openholo::fftFree ( void  )
protected

◆ fftShift() [1/6]

void Openholo::fftShift ( int  nx,
int  ny,
Complex< Real > *  input,
Complex< Real > *  output 
)
protected

Swap the top-left quadrant of data with the bottom-right , and the top-right quadrant with the bottom-left.

Parameters
[in]nxthe number of column of the input data.
[in]nythe number of row of the input data.
[in]inputinput data variable.
[out]outputoutput data variable.

Definition at line 820 of file Openholo.cpp.

◆ fftShift() [2/6]

void Openholo::fftShift ( int  nx,
int  ny,
Complex< Real > *  input,
Complex< Real > *  output 
)
protected

Swap the top-left quadrant of data with the bottom-right , and the top-right quadrant with the bottom-left.

Parameters
[in]nxthe number of column of the input data.
[in]nythe number of row of the input data.
[in]inputinput data variable.
[out]outputoutput data variable.

◆ fftShift() [3/6]

void Openholo::fftShift ( int  nx,
int  ny,
Complex< Real > *  input,
fftw_complex *  output 
)
protected

Definition at line 796 of file Openholo.cpp.

◆ fftShift() [4/6]

void Openholo::fftShift ( int  nx,
int  ny,
Complex< Real > *  input,
fftw_complex *  output 
)
protected

◆ fftShift() [5/6]

void Openholo::fftShift ( int  nx,
int  ny,
fftw_complex *  input,
Complex< Real > *  output 
)
protected

Definition at line 772 of file Openholo.cpp.

◆ fftShift() [6/6]

void Openholo::fftShift ( int  nx,
int  ny,
fftw_complex *  input,
Complex< Real > *  output 
)
protected

◆ getColorArrangeOHC() [1/2]

void Openholo::getColorArrangeOHC ( ColorArran color_arrange)
inlineprotected

Definition at line 418 of file Openholo.h.

◆ getColorArrangeOHC() [2/2]

void Openholo::getColorArrangeOHC ( ColorArran color_arrange)
inlineprotected

Definition at line 418 of file Openholo.h.

◆ getColorTypeOHC() [1/2]

void Openholo::getColorTypeOHC ( ColorType color_type)
inlineprotected

Definition at line 415 of file Openholo.h.

◆ getColorTypeOHC() [2/2]

void Openholo::getColorTypeOHC ( ColorType color_type)
inlineprotected

Definition at line 415 of file Openholo.h.

◆ getComplexField() [1/2]

Complex<Real>** Openholo::getComplexField ( void  )
inline

Function for getting the complex field.

Returns
Type: Complex<Real>**
If the succeeds to get complex field, the return value is complex field data's pointer.
If the fails to get complex field, the return value is nullptr.

Definition at line 163 of file Openholo.h.

◆ getComplexField() [2/2]

Complex<Real>** Openholo::getComplexField ( void  )
inline

Function for getting the complex field.

Returns
Type: Complex<Real>**
If the succeeds to get complex field, the return value is complex field data's pointer.
If the fails to get complex field, the return value is nullptr.

Definition at line 163 of file Openholo.h.

◆ getComplexFieldDataOHC() [1/4]

void Openholo::getComplexFieldDataOHC ( Complex< Real > **  cmplx,
uint  wavelen_idx 
)
inlineprotected

Definition at line 424 of file Openholo.h.

◆ getComplexFieldDataOHC() [2/4]

void Openholo::getComplexFieldDataOHC ( Complex< Real > **  cmplx,
uint  wavelen_idx 
)
inlineprotected

Definition at line 424 of file Openholo.h.

◆ getComplexFieldDataOHC() [3/4]

void Openholo::getComplexFieldDataOHC ( OphComplexField cmplx,
uint  wavelen_idx 
)
inlineprotected

Definition at line 427 of file Openholo.h.

◆ getComplexFieldDataOHC() [4/4]

void Openholo::getComplexFieldDataOHC ( OphComplexField cmplx,
uint  wavelen_idx 
)
inlineprotected

Definition at line 427 of file Openholo.h.

◆ getContext() [1/2]

OphConfig& Openholo::getContext ( void  )
inline

Function for getting the current context.

Returns
Type: OphConfig&
If the succeeds to get context, the return value is cotext pointer.
If the fails to get context, the return value is nullptr.

Definition at line 172 of file Openholo.h.

◆ getContext() [2/2]

OphConfig& Openholo::getContext ( void  )
inline

Function for getting the current context.

Returns
Type: OphConfig&
If the succeeds to get context, the return value is cotext pointer.
If the fails to get context, the return value is nullptr.

Definition at line 172 of file Openholo.h.

◆ getImageConfig() [1/2]

ImageConfig& Openholo::getImageConfig ( )
inline

Function for getting the image config.

Returns
Type: ImageConfig
The return value is Image config pointer.

Definition at line 179 of file Openholo.h.

◆ getImageConfig() [2/2]

ImageConfig& Openholo::getImageConfig ( )
inline

Function for getting the image config.

Returns
Type: ImageConfig
The return value is Image config pointer.

Definition at line 179 of file Openholo.h.

◆ getImageRotate() [1/2]

bool Openholo::getImageRotate ( )
inline

Definition at line 207 of file Openholo.h.

◆ getImageRotate() [2/2]

bool Openholo::getImageRotate ( )
inline

Definition at line 207 of file Openholo.h.

◆ getImgSize() [1/2]

bool Openholo::getImgSize ( int &  w,
int &  h,
int &  bytesperpixel,
const char *  fname 
)
protected

Function for getting the image size.

Parameters
[out]wImage size - width.
[out]hImage size - Height.
[out]bytesperpixelBytes per pixel.
[in]fnameInput file name.
Returns
Type: bool
If the function succeeds, the return value is true.
If the function fails, the return value is false.

◆ getImgSize() [2/2]

bool Openholo::getImgSize ( int &  w,
int &  h,
int &  bytesperpixel,
const char *  fname 
)
protected

Function for getting the image size.

Parameters
[out]wImage size - width.
[out]hImage size - Height.
[out]bytesperpixelBytes per pixel.
[in]fnameInput file name.
Returns
Type: bool
If the function succeeds, the return value is true.
If the function fails, the return value is false.

Definition at line 388 of file Openholo.cpp.

◆ GetMaxThreadNum() [1/2]

int Openholo::GetMaxThreadNum ( )

◆ GetMaxThreadNum() [2/2]

int Openholo::GetMaxThreadNum ( )

Definition at line 860 of file Openholo.cpp.

◆ getPixelNumberOHC() [1/2]

void Openholo::getPixelNumberOHC ( ivec2 &  pixel_number)
inlineprotected

Definition at line 403 of file Openholo.h.

◆ getPixelNumberOHC() [2/2]

void Openholo::getPixelNumberOHC ( ivec2 &  pixel_number)
inlineprotected

Definition at line 403 of file Openholo.h.

◆ getPixelPitchOHC() [1/2]

void Openholo::getPixelPitchOHC ( vec2 &  pixel_pitch)
inlineprotected

Definition at line 406 of file Openholo.h.

◆ getPixelPitchOHC() [2/2]

void Openholo::getPixelPitchOHC ( vec2 &  pixel_pitch)
inlineprotected

Definition at line 406 of file Openholo.h.

◆ getWaveLengthNumOHC() [1/2]

void Openholo::getWaveLengthNumOHC ( uint wavelength_num)
inlineprotected

Definition at line 412 of file Openholo.h.

◆ getWaveLengthNumOHC() [2/2]

void Openholo::getWaveLengthNumOHC ( uint wavelength_num)
inlineprotected

Definition at line 412 of file Openholo.h.

◆ getWavelengthOHC() [1/2]

void Openholo::getWavelengthOHC ( vector< Real > &  wavelength)
inlineprotected

Definition at line 409 of file Openholo.h.

◆ getWavelengthOHC() [2/2]

void Openholo::getWavelengthOHC ( vector< Real > &  wavelength)
inlineprotected

Definition at line 409 of file Openholo.h.

◆ getWaveLengthUnitOHC() [1/2]

void Openholo::getWaveLengthUnitOHC ( LenUnit length_unit)
inlineprotected

Definition at line 421 of file Openholo.h.

◆ getWaveLengthUnitOHC() [2/2]

void Openholo::getWaveLengthUnitOHC ( LenUnit length_unit)
inlineprotected

Definition at line 421 of file Openholo.h.

◆ ImageRotation() [1/2]

void Openholo::ImageRotation ( double  rotate,
uchar src,
uchar dst,
int  w,
int  h,
int  channels 
)
protected

◆ ImageRotation() [2/2]

void Openholo::ImageRotation ( double  rotate,
uchar src,
uchar dst,
int  w,
int  h,
int  channels 
)
protected

Definition at line 419 of file Openholo.cpp.

◆ imgScaleBilinear() [1/2]

void Openholo::imgScaleBilinear ( uchar src,
uchar dst,
int  w,
int  h,
int  neww,
int  newh,
int  channels = 1 
)
protected

Function for change image size.

Parameters
[in]srcSource image data.
[in]dstDestination image data.
[in]wOriginal width.
[in]hOriginal height.
[in]newwWidth to replace.
[in]newhHeight to replace.

◆ imgScaleBilinear() [2/2]

void Openholo::imgScaleBilinear ( uchar src,
uchar dst,
int  w,
int  h,
int  neww,
int  newh,
int  channels = 1 
)
protected

Function for change image size.

Parameters
[in]srcSource image data.
[in]dstDestination image data.
[in]wOriginal width.
[in]hOriginal height.
[in]newwWidth to replace.
[in]newhHeight to replace.

Definition at line 470 of file Openholo.cpp.

◆ loadAsImg() [1/2]

uchar * Openholo::loadAsImg ( const char *  fname)
virtual

Function for loading image files.

Parameters
[in]fnameInput file name
Returns
Type: uchar*
If the succeeds to load image file, the return value is image data' pointer.
If the fails to load image file, the return value is nullptr.

Definition at line 269 of file Openholo.cpp.

◆ loadAsImg() [2/2]

virtual uchar* Openholo::loadAsImg ( const char *  fname)
virtual

Function for loading image files.

Parameters
[in]fnameInput file name
Returns
Type: uchar*
If the succeeds to load image file, the return value is image data' pointer.
If the fails to load image file, the return value is nullptr.

◆ loadAsImgUpSideDown() [1/2]

bool Openholo::loadAsImgUpSideDown ( const char *  fname,
uchar dst 
)
protected

Function for loading image files | Output image data upside down.

Parameters
[in]Inputfile name.
[out]destinationto load.
Returns
Type: bool
If the function succeeds, the return value is true.
If the function fails, the return value is false.

◆ loadAsImgUpSideDown() [2/2]

bool Openholo::loadAsImgUpSideDown ( const char *  fname,
uchar dst 
)
protected

Function for loading image files | Output image data upside down.

Parameters
[in]Inputfile name.
[out]destinationto load.
Returns
Type: bool
If the function succeeds, the return value is true.
If the function fails, the return value is false.

Definition at line 346 of file Openholo.cpp.

◆ loadAsOhc() [1/2]

bool Openholo::loadAsOhc ( const char *  fname)
virtual

Function to read OHC file.

Parameters
[in]fnameFile name
Returns
Type: bool
If the succeeds to load OHC file, the return value is true.
If the fails to load OHC file, the return value is false.

Reimplemented in ophSig, ophSig, ophCascadedPropagation, ophCascadedPropagation, ophWaveAberration, ophWaveAberration, ophGen, and ophGen.

Definition at line 320 of file Openholo.cpp.

◆ loadAsOhc() [2/2]

virtual bool Openholo::loadAsOhc ( const char *  fname)
virtual

Function to read OHC file.

Parameters
[in]fnameFile name
Returns
Type: bool
If the succeeds to load OHC file, the return value is true.
If the fails to load OHC file, the return value is false.

Reimplemented in ophSig, ophSig, ophCascadedPropagation, ophCascadedPropagation, ophWaveAberration, ophWaveAberration, ophGen, and ophGen.

◆ mergeColor() [1/2]

bool Openholo::mergeColor ( int  idx,
int  width,
int  height,
uchar src,
uchar dst 
)

◆ mergeColor() [2/2]

bool Openholo::mergeColor ( int  idx,
int  width,
int  height,
uchar src,
uchar dst 
)

Definition at line 106 of file Openholo.cpp.

◆ ophFree() [1/2]

void Openholo::ophFree ( void  )
protectedvirtual

Pure virtual function for override in child classes.

Implements Base.

Reimplemented in ophGen, ophGen, ophSig, ophSig, ophCascadedPropagation, ophCascadedPropagation, ophLF, ophLF, ophDepthMap, ophDepthMap, ophWaveAberration, ophWaveAberration, ophRec, and ophRec.

Definition at line 869 of file Openholo.cpp.

◆ ophFree() [2/2]

virtual void Openholo::ophFree ( void  )
protectedvirtual

Pure virtual function for override in child classes.

Implements Base.

Reimplemented in ophGen, ophGen, ophSig, ophSig, ophCascadedPropagation, ophCascadedPropagation, ophLF, ophLF, ophDepthMap, ophDepthMap, ophWaveAberration, ophWaveAberration, ophRec, and ophRec.

◆ saveAsImg() [1/2]

bool Openholo::saveAsImg ( const char *  fname,
uint8_t  bitsperpixel,
uchar src,
int  width,
int  height 
)
virtual

Function for creating image files.

Parameters
[in]fnameOutput file name
[in]bitsperpixelBit per pixel
[in]srcSource of Image file's data
[in]widthNumber of pixel - width
[in]heightNumber of pixel - height
Returns
Type: bool
If the succeeds to save image file, the return value is true.
If the fails to save image file, the return value is false.

Definition at line 140 of file Openholo.cpp.

◆ saveAsImg() [2/2]

virtual bool Openholo::saveAsImg ( const char *  fname,
uint8_t  bitsperpixel,
uchar src,
int  width,
int  height 
)
virtual

Function for creating image files.

Parameters
[in]fnameOutput file name
[in]bitsperpixelBit per pixel
[in]srcSource of Image file's data
[in]widthNumber of pixel - width
[in]heightNumber of pixel - height
Returns
Type: bool
If the succeeds to save image file, the return value is true.
If the fails to save image file, the return value is false.

◆ saveAsOhc() [1/2]

bool Openholo::saveAsOhc ( const char *  fname)
virtual

Function to write OHC file

Parameters
[in]fnameFile name
Returns
Type: bool
If the succeeds to save OHC file, the return value is true.
If the fails to save OHC file, the return value is false.

Reimplemented in ophSig, ophSig, ophCascadedPropagation, and ophCascadedPropagation.

Definition at line 299 of file Openholo.cpp.

◆ saveAsOhc() [2/2]

virtual bool Openholo::saveAsOhc ( const char *  fname)
virtual

Function to write OHC file

Parameters
[in]fnameFile name
Returns
Type: bool
If the succeeds to save OHC file, the return value is true.
If the fails to save OHC file, the return value is false.

Reimplemented in ophSig, ophSig, ophCascadedPropagation, and ophCascadedPropagation.

◆ separateColor() [1/2]

bool Openholo::separateColor ( int  idx,
int  width,
int  height,
uchar src,
uchar dst 
)

Definition at line 123 of file Openholo.cpp.

◆ separateColor() [2/2]

bool Openholo::separateColor ( int  idx,
int  width,
int  height,
uchar src,
uchar dst 
)

◆ setColorArrangeOHC() [1/2]

void Openholo::setColorArrangeOHC ( const ColorArran  color_arrange)
inlineprotected

Definition at line 364 of file Openholo.h.

◆ setColorArrangeOHC() [2/2]

void Openholo::setColorArrangeOHC ( const ColorArran  color_arrange)
inlineprotected

Definition at line 364 of file Openholo.h.

◆ setColorTypeOHC() [1/2]

void Openholo::setColorTypeOHC ( const ColorType  color_type)
inlineprotected

Definition at line 361 of file Openholo.h.

◆ setColorTypeOHC() [2/2]

void Openholo::setColorTypeOHC ( const ColorType  color_type)
inlineprotected

Definition at line 361 of file Openholo.h.

◆ setFieldEncodingOHC() [1/2]

void Openholo::setFieldEncodingOHC ( const FldStore  field_store,
const FldCodeType  field_code_type 
)
inlineprotected

Definition at line 370 of file Openholo.h.

◆ setFieldEncodingOHC() [2/2]

void Openholo::setFieldEncodingOHC ( const FldStore  field_store,
const FldCodeType  field_code_type 
)
inlineprotected

Definition at line 370 of file Openholo.h.

◆ setImageFlip() [1/2]

void Openholo::setImageFlip ( int  flip)
inline

Definition at line 206 of file Openholo.h.

◆ setImageFlip() [2/2]

void Openholo::setImageFlip ( int  flip)
inline

Definition at line 206 of file Openholo.h.

◆ setImageMerge() [1/2]

void Openholo::setImageMerge ( bool  bMerge)
inline

Definition at line 204 of file Openholo.h.

◆ setImageMerge() [2/2]

void Openholo::setImageMerge ( bool  bMerge)
inline

Definition at line 204 of file Openholo.h.

◆ setImageRotate() [1/2]

void Openholo::setImageRotate ( bool  rotate)
inline

Definition at line 205 of file Openholo.h.

◆ setImageRotate() [2/2]

void Openholo::setImageRotate ( bool  rotate)
inline

Definition at line 205 of file Openholo.h.

◆ SetMaxThreadNum() [1/2]

void Openholo::SetMaxThreadNum ( int  num)

◆ SetMaxThreadNum() [2/2]

void Openholo::SetMaxThreadNum ( int  num)

Definition at line 853 of file Openholo.cpp.

◆ setPhaseEncodingOHC() [1/2]

void Openholo::setPhaseEncodingOHC ( const BPhaseCode  phase_code,
const vec2  phase_code_range 
)
inlineprotected

Definition at line 373 of file Openholo.h.

◆ setPhaseEncodingOHC() [2/2]

void Openholo::setPhaseEncodingOHC ( const BPhaseCode  phase_code,
const vec2  phase_code_range 
)
inlineprotected

Definition at line 373 of file Openholo.h.

◆ setPixelNumber() [1/4]

void Openholo::setPixelNumber ( ivec2  n)
inline

Function for setting the output resolution.

Parameters
[in]nresolution vector value.

Definition at line 185 of file Openholo.h.

◆ setPixelNumber() [2/4]

void Openholo::setPixelNumber ( ivec2  n)
inline

Function for setting the output resolution.

Parameters
[in]nresolution vector value.

Definition at line 185 of file Openholo.h.

◆ setPixelNumber() [3/4]

void Openholo::setPixelNumber ( int  width,
int  height 
)
inline

Definition at line 186 of file Openholo.h.

◆ setPixelNumber() [4/4]

void Openholo::setPixelNumber ( int  width,
int  height 
)
inline

Definition at line 186 of file Openholo.h.

◆ setPixelNumberOHC() [1/2]

void Openholo::setPixelNumberOHC ( const ivec2  pixel_number)
inlineprotected

getter/setter for OHC file read and write

Definition at line 349 of file Openholo.h.

◆ setPixelNumberOHC() [2/2]

void Openholo::setPixelNumberOHC ( const ivec2  pixel_number)
inlineprotected

getter/setter for OHC file read and write

Definition at line 349 of file Openholo.h.

◆ setPixelPitch() [1/4]

void Openholo::setPixelPitch ( vec2  p)
inline

Function for setting the output pixel pitch.

Parameters
[in]ppitch vector value.

Definition at line 192 of file Openholo.h.

◆ setPixelPitch() [2/4]

void Openholo::setPixelPitch ( vec2  p)
inline

Function for setting the output pixel pitch.

Parameters
[in]ppitch vector value.

Definition at line 192 of file Openholo.h.

◆ setPixelPitch() [3/4]

void Openholo::setPixelPitch ( Real  pitchX,
Real  pitchY 
)
inline

Definition at line 193 of file Openholo.h.

◆ setPixelPitch() [4/4]

void Openholo::setPixelPitch ( Real  pitchX,
Real  pitchY 
)
inline

Definition at line 193 of file Openholo.h.

◆ setPixelPitchOHC() [1/2]

void Openholo::setPixelPitchOHC ( const vec2  pixel_pitch)
inlineprotected

Definition at line 352 of file Openholo.h.

◆ setPixelPitchOHC() [2/2]

void Openholo::setPixelPitchOHC ( const vec2  pixel_pitch)
inlineprotected

Definition at line 352 of file Openholo.h.

◆ setWaveLength() [1/2]

void Openholo::setWaveLength ( Real  w,
const uint  idx = 0 
)
inline

Function for setting the wave length.

Parameters
[in]wwave length.
[in]idxindex of channel.

Definition at line 200 of file Openholo.h.

◆ setWaveLength() [2/2]

void Openholo::setWaveLength ( Real  w,
const uint  idx = 0 
)
inline

Function for setting the wave length.

Parameters
[in]wwave length.
[in]idxindex of channel.

Definition at line 200 of file Openholo.h.

◆ setWaveLengthNumOHC() [1/2]

void Openholo::setWaveLengthNumOHC ( const uint  wavelength_num)
inlineprotected

Definition at line 358 of file Openholo.h.

◆ setWaveLengthNumOHC() [2/2]

void Openholo::setWaveLengthNumOHC ( const uint  wavelength_num)
inlineprotected

Definition at line 358 of file Openholo.h.

◆ setWavelengthOHC() [1/2]

void Openholo::setWavelengthOHC ( const Real  wavelength,
const LenUnit  wavelength_unit 
)
inlineprotected

Definition at line 355 of file Openholo.h.

◆ setWavelengthOHC() [2/2]

void Openholo::setWavelengthOHC ( const Real  wavelength,
const LenUnit  wavelength_unit 
)
inlineprotected

Definition at line 355 of file Openholo.h.

◆ setWaveLengthUnitOHC() [1/2]

void Openholo::setWaveLengthUnitOHC ( const LenUnit  length_unit)
inlineprotected

Definition at line 367 of file Openholo.h.

◆ setWaveLengthUnitOHC() [2/2]

void Openholo::setWaveLengthUnitOHC ( const LenUnit  length_unit)
inlineprotected

Definition at line 367 of file Openholo.h.

◆ setWaveNum() [1/2]

void Openholo::setWaveNum ( int  nNum)

Definition at line 842 of file Openholo.cpp.

◆ setWaveNum() [2/2]

void Openholo::setWaveNum ( int  nNum)

Member Data Documentation

◆ complex_H

Complex< Real > ** Openholo::complex_H
protected

Definition at line 336 of file Openholo.h.

◆ context_

OphConfig Openholo::context_
protected

Definition at line 334 of file Openholo.h.

◆ imgCfg

ImageConfig Openholo::imgCfg
protected

Definition at line 335 of file Openholo.h.

◆ OHC_decoder

ImgDecoderOhc * Openholo::OHC_decoder
protected

Definition at line 343 of file Openholo.h.

◆ OHC_encoder

ImgEncoderOhc * Openholo::OHC_encoder
protected

OHC file format Variables for read and write.

Definition at line 342 of file Openholo.h.


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