Openholo  v1.1
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...
 
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 setMergeImage (bool bMerge)
 
void setWaveNum (int nNum)
 
 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...
 
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 setMergeImage (bool bMerge)
 
void setWaveNum (int nNum)
 
- 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 fftwShift (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...
 
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 fftwShift (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...
 
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_
 
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 84 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 359 of file Openholo.h.

◆ addComplexFieldDataOHC() [2/2]

void Openholo::addComplexFieldDataOHC ( const OphComplexField complex_field)
inlineprotected

Definition at line 359 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 353 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 353 of file Openholo.h.

◆ addWaveLengthOHC() [1/2]

void Openholo::addWaveLengthOHC ( const Real  wavelength)
inlineprotected

Definition at line 356 of file Openholo.h.

◆ addWaveLengthOHC() [2/2]

void Openholo::addWaveLengthOHC ( const Real  wavelength)
inlineprotected

Definition at line 356 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 527 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 541 of file Openholo.cpp.

◆ fft2() [1/2]

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/2]

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)

◆ 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 643 of file Openholo.cpp.

◆ fftFree() [1/2]

void Openholo::fftFree ( void  )
protected

◆ fftFree() [2/2]

void Openholo::fftFree ( void  )
protected

Definition at line 682 of file Openholo.cpp.

◆ fftShift() [1/2]

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() [2/2]

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 749 of file Openholo.cpp.

◆ fftwShift() [1/2]

void Openholo::fftwShift ( 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.

◆ fftwShift() [2/2]

void Openholo::fftwShift ( 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 704 of file Openholo.cpp.

◆ getColorArrangeOHC() [1/2]

void Openholo::getColorArrangeOHC ( ColorArran color_arrange)
inlineprotected

Definition at line 389 of file Openholo.h.

◆ getColorArrangeOHC() [2/2]

void Openholo::getColorArrangeOHC ( ColorArran color_arrange)
inlineprotected

Definition at line 389 of file Openholo.h.

◆ getColorTypeOHC() [1/2]

void Openholo::getColorTypeOHC ( ColorType color_type)
inlineprotected

Definition at line 386 of file Openholo.h.

◆ getColorTypeOHC() [2/2]

void Openholo::getColorTypeOHC ( ColorType color_type)
inlineprotected

Definition at line 386 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 159 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 159 of file Openholo.h.

◆ getComplexFieldDataOHC() [1/4]

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

Definition at line 395 of file Openholo.h.

◆ getComplexFieldDataOHC() [2/4]

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

Definition at line 395 of file Openholo.h.

◆ getComplexFieldDataOHC() [3/4]

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

Definition at line 398 of file Openholo.h.

◆ getComplexFieldDataOHC() [4/4]

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

Definition at line 398 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 168 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 168 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 355 of file Openholo.cpp.

◆ getPixelNumberOHC() [1/2]

void Openholo::getPixelNumberOHC ( ivec2 &  pixel_number)
inlineprotected

Definition at line 374 of file Openholo.h.

◆ getPixelNumberOHC() [2/2]

void Openholo::getPixelNumberOHC ( ivec2 &  pixel_number)
inlineprotected

Definition at line 374 of file Openholo.h.

◆ getPixelPitchOHC() [1/2]

void Openholo::getPixelPitchOHC ( vec2 &  pixel_pitch)
inlineprotected

Definition at line 377 of file Openholo.h.

◆ getPixelPitchOHC() [2/2]

void Openholo::getPixelPitchOHC ( vec2 &  pixel_pitch)
inlineprotected

Definition at line 377 of file Openholo.h.

◆ getWaveLengthNumOHC() [1/2]

void Openholo::getWaveLengthNumOHC ( uint wavelength_num)
inlineprotected

Definition at line 383 of file Openholo.h.

◆ getWaveLengthNumOHC() [2/2]

void Openholo::getWaveLengthNumOHC ( uint wavelength_num)
inlineprotected

Definition at line 383 of file Openholo.h.

◆ getWavelengthOHC() [1/2]

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

Definition at line 380 of file Openholo.h.

◆ getWavelengthOHC() [2/2]

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

Definition at line 380 of file Openholo.h.

◆ getWaveLengthUnitOHC() [1/2]

void Openholo::getWaveLengthUnitOHC ( LenUnit length_unit)
inlineprotected

Definition at line 392 of file Openholo.h.

◆ getWaveLengthUnitOHC() [2/2]

void Openholo::getWaveLengthUnitOHC ( LenUnit length_unit)
inlineprotected

Definition at line 392 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 386 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 437 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 236 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.

Definition at line 313 of file Openholo.cpp.

◆ 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.

◆ 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 287 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.

◆ ophFree() [1/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, ophDepthMap, ophDepthMap, ophWaveAberration, ophWaveAberration, ophRec, and ophRec.

◆ ophFree() [2/2]

void Openholo::ophFree ( void  )
protectedvirtual

Pure virtual function for override in child classes.

Implements Base.

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

Definition at line 783 of file Openholo.cpp.

◆ 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 105 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 266 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.

◆ setColorArrangeOHC() [1/2]

void Openholo::setColorArrangeOHC ( const ColorArran  color_arrange)
inlineprotected

Definition at line 335 of file Openholo.h.

◆ setColorArrangeOHC() [2/2]

void Openholo::setColorArrangeOHC ( const ColorArran  color_arrange)
inlineprotected

Definition at line 335 of file Openholo.h.

◆ setColorTypeOHC() [1/2]

void Openholo::setColorTypeOHC ( const ColorType  color_type)
inlineprotected

Definition at line 332 of file Openholo.h.

◆ setColorTypeOHC() [2/2]

void Openholo::setColorTypeOHC ( const ColorType  color_type)
inlineprotected

Definition at line 332 of file Openholo.h.

◆ setFieldEncodingOHC() [1/2]

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

Definition at line 341 of file Openholo.h.

◆ setFieldEncodingOHC() [2/2]

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

Definition at line 341 of file Openholo.h.

◆ setMergeImage() [1/2]

void Openholo::setMergeImage ( bool  bMerge)
inline

Definition at line 190 of file Openholo.h.

◆ setMergeImage() [2/2]

void Openholo::setMergeImage ( bool  bMerge)
inline

Definition at line 190 of file Openholo.h.

◆ setPhaseEncodingOHC() [1/2]

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

Definition at line 344 of file Openholo.h.

◆ setPhaseEncodingOHC() [2/2]

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

Definition at line 344 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 174 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 174 of file Openholo.h.

◆ setPixelNumber() [3/4]

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

Definition at line 175 of file Openholo.h.

◆ setPixelNumber() [4/4]

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

Definition at line 175 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 320 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 320 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 181 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 181 of file Openholo.h.

◆ setPixelPitch() [3/4]

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

Definition at line 182 of file Openholo.h.

◆ setPixelPitch() [4/4]

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

Definition at line 182 of file Openholo.h.

◆ setPixelPitchOHC() [1/2]

void Openholo::setPixelPitchOHC ( const vec2  pixel_pitch)
inlineprotected

Definition at line 323 of file Openholo.h.

◆ setPixelPitchOHC() [2/2]

void Openholo::setPixelPitchOHC ( const vec2  pixel_pitch)
inlineprotected

Definition at line 323 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 189 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 189 of file Openholo.h.

◆ setWaveLengthNumOHC() [1/2]

void Openholo::setWaveLengthNumOHC ( const uint  wavelength_num)
inlineprotected

Definition at line 329 of file Openholo.h.

◆ setWaveLengthNumOHC() [2/2]

void Openholo::setWaveLengthNumOHC ( const uint  wavelength_num)
inlineprotected

Definition at line 329 of file Openholo.h.

◆ setWavelengthOHC() [1/2]

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

Definition at line 326 of file Openholo.h.

◆ setWavelengthOHC() [2/2]

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

Definition at line 326 of file Openholo.h.

◆ setWaveLengthUnitOHC() [1/2]

void Openholo::setWaveLengthUnitOHC ( const LenUnit  length_unit)
inlineprotected

Definition at line 338 of file Openholo.h.

◆ setWaveLengthUnitOHC() [2/2]

void Openholo::setWaveLengthUnitOHC ( const LenUnit  length_unit)
inlineprotected

Definition at line 338 of file Openholo.h.

◆ setWaveNum() [1/2]

void Openholo::setWaveNum ( int  nNum)

Definition at line 771 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 307 of file Openholo.h.

◆ context_

OphConfig Openholo::context_
protected

Definition at line 306 of file Openholo.h.

◆ OHC_decoder

ImgDecoderOhc * Openholo::OHC_decoder
protected

Definition at line 314 of file Openholo.h.

◆ OHC_encoder

ImgEncoderOhc * Openholo::OHC_encoder
protected

OHC file format Variables for read and write.

Definition at line 313 of file Openholo.h.


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