46 #ifndef __ImgCodecOhc_h 47 #define __ImgCodecOhc_h 57 #define OPH_DLL __declspec(dllexport) 59 #define OPH_DLL __declspec(dllimport) 70 virtual void initOHCheader();
71 virtual void releaseFldData();
72 void releaseOHCheader();
73 void releaseCodeBuffer();
75 bool setFileName(
const std::string &_fname);
76 bool setOHCheader(
const ohcHeader &_Header);
79 void getFieldInfo(
ohcFieldInfoHeader &_FieldInfo, std::vector<double_t> &_wavlenTable);
82 void getComplexFieldData(Complex<Real>** cmplx_field,
uint wavelen_idx);
85 void getComplexFieldData(Complex<Real>*** cmplx_field);
91 float* buf_f32 =
nullptr;
92 double* buf_f64 =
nullptr;
107 virtual void releaseFldData();
110 ivec2 getNumOfPixel();
111 vec2 getPixelPitch();
113 uint getNumOfWavlen();
118 void getWavelength(std::vector<double_t> &wavlen_array);
119 void getLinkFilePath(std::vector<std::string> &linkFilePath_array);
124 void fieldToComplex(
void);
126 bool bLoadFile =
false;
129 bool decodeFieldData();
145 void initOHCheader();
148 void setNumOfPixel(
const uint _pxNumX,
const uint _pxNumY);
149 void setNumOfPixel(
const ivec2 _pxNum);
152 void setNumOfWavlen(
const uint n_wavlens);
154 void setColorType(
const ColorType _clrType);
155 void setColorArrange(
const ColorArran _clrArrange);
158 void setPhaseEncoding(
const BPhaseCode _bPhaseCode,
const double _phaseCodeMin,
const double _phaseCodeMax);
159 void setPhaseEncoding(
const BPhaseCode _bPhaseCode,
const vec2 _phaseCodeRange);
164 void addComplexFieldData(
const Complex<Real> *data);
165 void addWavelength(
const Real wavlen);
166 void clearWavelength();
174 uint64_t encodeFieldData();
180 #endif // !__ImgCodecOhc_h
oph::matrix< Complex< Real > > OphComplexField
std::vector< OphComplexField > field_cmplx
void getComplexFieldData(OphComplexField &cmplx_field, uint wavelen_idx)
std::vector< OphRealField > field_phase
std::vector< OphRealField > field_ampli
std::vector< std::string > linkFilePath