75 this->pixel_number =
ivec2();
76 this->offset =
ivec2();
77 this->pixel_pitch =
vec2();
82 this->wave_length = 0;
133 bool checkExtension(
const char* fname,
const char* ext);
147 virtual bool saveAsImg(
const char* fname, uint8_t bitsperpixel,
uchar* src,
int width,
int height);
156 virtual uchar* loadAsImg(
const char* fname);
165 virtual bool saveAsOhc(
const char *fname);
175 virtual bool loadAsOhc(
const char *fname);
207 context_.pixel_number[
_X] = n[
_X]; context_.pixel_number[
_Y] = n[
_Y];
208 context_.ss = context_.pixel_number * context_.pixel_pitch;
211 context_.pixel_number[
_X] = width; context_.pixel_number[
_Y] = height;
212 context_.ss = context_.pixel_number * context_.pixel_pitch;
220 context_.pixel_pitch[
_X] = p[
_X]; context_.pixel_pitch[
_Y] = p[
_Y];
221 context_.ss = context_.pixel_number * context_.pixel_pitch;
224 context_.pixel_pitch[
_X] = pitchX; context_.pixel_pitch[
_Y] = pitchY;
225 context_.ss = context_.pixel_number * context_.pixel_pitch;
239 void setWaveNum(
int num);
288 void setMaxThreadNum(
int num);
295 int getMaxThreadNum();
308 bool mergeColor(
int idx,
int width,
int height,
uchar *src,
uchar *dst);
321 bool separateColor(
int idx,
int width,
int height,
uchar *src,
uchar *dst);
333 bool loadAsImgUpSideDown(
const char* fname,
uchar* dst);
345 bool getImgSize(
int&
w,
int&
h,
int&
bytesperpixel,
const char* fname);
356 void imgScaleBilinear(
uchar* src,
uchar* dst,
int w,
int h,
int neww,
int newh,
int channels = 1);
411 void fftInit2D(
ivec2 size,
int sign,
unsigned int flag);
438 virtual void ophFree(
void);
444 fftw_plan plan_fwd, plan_bwd;
445 fftw_complex *fft_in, *fft_out;
530 #endif // !__Openholo_h
void setWaveLength(Real w, const uint idx=0)
Function for setting the wave length.
OphConfig & getContext(void)
Function for getting the current context.
void setImageRotate(bool rotate)
Function for setting the image rotate(true or false)
void setColorArrangeOHC(const ColorArran color_arrange)
void setPhaseEncodingOHC(const BPhaseCode phase_code, const vec2 phase_code_range)
void getPixelPitchOHC(vec2 &pixel_pitch)
void setColorArrange(const ColorArran _clrArrange)
oph::ColorArran getColorArrange()
void setPixelNumberOHC(const ivec2 pixel_number)
getter/setter for OHC file read and write
void getColorArrangeOHC(ColorArran &color_arrange)
void setPixelPitchOHC(const vec2 pixel_pitch)
structure for 2-dimensional integer vector and its arithmetic.
void getComplexFieldDataOHC(Complex< Real > **cmplx, uint wavelen_idx)
void setColorTypeOHC(const ColorType color_type)
void getWaveLengthUnitOHC(LenUnit &length_unit)
void setOffset(ivec2 offset)
Function for setting the offset.
void getPixelNumberOHC(ivec2 &pixel_number)
void setImageMerge(bool merge)
Function for setting the image merge(true or false)
void setWavelengthOHC(const Real wavelength, const LenUnit wavelength_unit)
void setPixelNumber(int width, int height)
void addWaveLengthNComplexFieldDataOHC(const Real wavelength, const OphComplexField &complex_field)
Function to add ComplexField when adding wavelength data.
ImgEncoderOhc * OHC_encoder
OHC file format Variables for read and write.
void setWaveLengthUnitOHC(const LenUnit length_unit)
void getWavelengthOHC(vector< Real > &wavelength)
void setFieldEncoding(const FldStore _fldStore, const FldCodeType _fldCodeType)
void getWaveLengthNumOHC(uint &wavelength_num)
void getComplexFieldData(OphComplexField &cmplx_field, uint wavelen_idx)
ImgDecoderOhc * OHC_decoder
oph::ColorType getColorType()
void addWaveLengthOHC(const Real wavelength)
void addComplexFieldData(const OphComplexField &data)
void setNumOfWavlen(const uint n_wavlens)
void setWaveLengthNumOHC(const uint wavelength_num)
void addComplexFieldDataOHC(const OphComplexField &complex_field)
void setPhaseEncoding(const BPhaseCode _bPhaseCode, const double _phaseCodeMin, const double _phaseCodeMax)
void addWavelength(const Real wavlen)
structure for 2-dimensional Real type vector and its arithmetic.
structure for 3-dimensional Real type vector and its arithmetic.
void setPixelPitch(Real pitchX, Real pitchY)
oph::LenUnit getUnitOfWavlen()
void setPixelPitch(vec2 p)
Function for setting the output pixel pitch.
void setColorType(const ColorType _clrType)
void setPixelPitch(const double _pxPitchX, const double _pxPitchY, const LenUnit unit=LenUnit::m)
void setFieldEncodingOHC(const FldStore field_store, const FldCodeType field_code_type)
structure for 3-dimensional integer vector and its arithmetic.
void setImageFlip(int flip)
Function for setting the image flip.
void setWavelength(const Real _wavlen, const LenUnit _unit=LenUnit::m)
void setNumOfPixel(const uint _pxNumX, const uint _pxNumY)
Complex< Real > ** getComplexField(void)
Function for getting the complex field.
ImageConfig & getImageConfig()
Function for getting the image config.
void setPixelNumber(ivec2 n)
Function for setting the output resolution.
void getColorTypeOHC(ColorType &color_type)
void setUnitOfWavlen(const LenUnit unit)
Complex< Real > ** complex_H
void getComplexFieldDataOHC(OphComplexField &cmplx, uint wavelen_idx)
void getWavelength(std::vector< double_t > &wavlen_array)
void addWavelengthNComplexFieldData(const Real wavlen, const OphComplexField &data)