Openholo  v1.0
Open Source Digital Holographic Library
oph::ImgEncoderOhc Class Reference

#include <ImgCodecOhc.h>

Inheritance diagram for oph::ImgEncoderOhc:
Collaboration diagram for oph::ImgEncoderOhc:

Public Member Functions

 ImgEncoderOhc ()
 
 ImgEncoderOhc (const std::string &_fname)
 
 ImgEncoderOhc (const std::string &_fname, const ohcHeader &_Header)
 
virtual ~ImgEncoderOhc ()
 
void initOHCheader ()
 
void setNumOfPixel (const uint _pxNumX, const uint _pxNumY)
 
void setNumOfPixel (const ivec2 _pxNum)
 
void setPixelPitch (const double _pxPitchX, const double _pxPitchY, const LenUnit unit=LenUnit::m)
 
void setPixelPitch (const vec2 _pxPitch, const LenUnit unit=LenUnit::m)
 
void setNumOfWavlen (const uint n_wavlens)
 
void setWavelength (const Real _wavlen, const LenUnit _unit=LenUnit::m)
 
void setColorType (const ColorType _clrType)
 
void setColorArrange (const ColorArran _clrArrange)
 
void setUnitOfWavlen (const LenUnit unit)
 
void setFieldEncoding (const FldStore _fldStore, const FldCodeType _fldCodeType)
 
void setPhaseEncoding (const BPhaseCode _bPhaseCode, const double _phaseCodeMin, const double _phaseCodeMax)
 
void setPhaseEncoding (const BPhaseCode _bPhaseCode, const vec2 _phaseCodeRange)
 
void addWavelengthNComplexFieldData (const Real wavlen, const OphComplexField &data)
 
void addComplexFieldData (const OphComplexField &data)
 
void addComplexFieldData (const Complex< Real > *data)
 
void addWavelength (const Real wavlen)
 
void clearWavelength ()
 
bool save ()
 
- Public Member Functions inherited from oph::ImgCodecOhc
 ImgCodecOhc ()
 
 ImgCodecOhc (const std::string &_fname)
 
 ImgCodecOhc (const std::string &_fname, const ohcHeader &_Header)
 
virtual ~ImgCodecOhc ()=0
 
virtual void releaseFldData ()
 
void releaseOHCheader ()
 
void releaseCodeBuffer ()
 
bool setFileName (const std::string &_fname)
 
bool setOHCheader (const ohcHeader &_Header)
 
void getOHCheader (ohcHeader &_Header)
 
void getFieldInfo (ohcFieldInfoHeader &_FieldInfo, std::vector< double_t > &_wavlenTable)
 
void getComplexFieldData (OphComplexField &cmplx_field, uint wavelen_idx)
 
void getComplexFieldData (Complex< Real > **cmplx_field, uint wavelen_idx)
 
void getComplexFieldData (OphComplexField **cmplx_field)
 
void getComplexFieldData (Complex< Real > ***cmplx_field)
 

Protected Member Functions

uint64_t encodeFieldData ()
 

Protected Attributes

std::ofstream File
 
- Protected Attributes inherited from oph::ImgCodecOhc
std::string fname
 
float * buf_f32 = nullptr
 
double * buf_f64 = nullptr
 
std::vector< OphComplexFieldfield_cmplx
 
std::vector< std::string > linkFilePath
 
ohcHeaderHeader = nullptr
 

Detailed Description

Definition at line 139 of file ImgCodecOhc.h.

Constructor & Destructor Documentation

◆ ImgEncoderOhc() [1/3]

oph::ImgEncoderOhc::ImgEncoderOhc ( )

Definition at line 804 of file ImgCodecOhc.cpp.

◆ ImgEncoderOhc() [2/3]

oph::ImgEncoderOhc::ImgEncoderOhc ( const std::string &  _fname)

Definition at line 816 of file ImgCodecOhc.cpp.

◆ ImgEncoderOhc() [3/3]

oph::ImgEncoderOhc::ImgEncoderOhc ( const std::string &  _fname,
const ohcHeader _Header 
)

Definition at line 810 of file ImgCodecOhc.cpp.

◆ ~ImgEncoderOhc()

oph::ImgEncoderOhc::~ImgEncoderOhc ( )
virtual

Definition at line 822 of file ImgCodecOhc.cpp.

Member Function Documentation

◆ addComplexFieldData() [1/2]

void oph::ImgEncoderOhc::addComplexFieldData ( const OphComplexField data)

Definition at line 1007 of file ImgCodecOhc.cpp.

◆ addComplexFieldData() [2/2]

void oph::ImgEncoderOhc::addComplexFieldData ( const Complex< Real > *  data)

Definition at line 1011 of file ImgCodecOhc.cpp.

◆ addWavelength()

void oph::ImgEncoderOhc::addWavelength ( const Real  wavlen)

Definition at line 1032 of file ImgCodecOhc.cpp.

◆ addWavelengthNComplexFieldData()

void oph::ImgEncoderOhc::addWavelengthNComplexFieldData ( const Real  wavlen,
const OphComplexField data 
)

Definition at line 1002 of file ImgCodecOhc.cpp.

◆ clearWavelength()

void oph::ImgEncoderOhc::clearWavelength ( )

Definition at line 1027 of file ImgCodecOhc.cpp.

◆ encodeFieldData()

uint64_t oph::ImgEncoderOhc::encodeFieldData ( )
protected

Definition at line 1189 of file ImgCodecOhc.cpp.

◆ initOHCheader()

void oph::ImgEncoderOhc::initOHCheader ( )
virtual

Reimplemented from oph::ImgCodecOhc.

Definition at line 829 of file ImgCodecOhc.cpp.

◆ save()

bool oph::ImgEncoderOhc::save ( )

Definition at line 1042 of file ImgCodecOhc.cpp.

◆ setColorArrange()

void oph::ImgEncoderOhc::setColorArrange ( const ColorArran  _clrArrange)

Definition at line 929 of file ImgCodecOhc.cpp.

◆ setColorType()

void oph::ImgEncoderOhc::setColorType ( const ColorType  _clrType)

Definition at line 919 of file ImgCodecOhc.cpp.

◆ setFieldEncoding()

void oph::ImgEncoderOhc::setFieldEncoding ( const FldStore  _fldStore,
const FldCodeType  _fldCodeType 
)

Definition at line 950 of file ImgCodecOhc.cpp.

◆ setNumOfPixel() [1/2]

void oph::ImgEncoderOhc::setNumOfPixel ( const uint  _pxNumX,
const uint  _pxNumY 
)

Definition at line 863 of file ImgCodecOhc.cpp.

◆ setNumOfPixel() [2/2]

void oph::ImgEncoderOhc::setNumOfPixel ( const ivec2  _pxNum)

Definition at line 874 of file ImgCodecOhc.cpp.

◆ setNumOfWavlen()

void oph::ImgEncoderOhc::setNumOfWavlen ( const uint  n_wavlens)

Definition at line 909 of file ImgCodecOhc.cpp.

◆ setPhaseEncoding() [1/2]

void oph::ImgEncoderOhc::setPhaseEncoding ( const BPhaseCode  _bPhaseCode,
const double  _phaseCodeMin,
const double  _phaseCodeMax 
)

Definition at line 962 of file ImgCodecOhc.cpp.

◆ setPhaseEncoding() [2/2]

void oph::ImgEncoderOhc::setPhaseEncoding ( const BPhaseCode  _bPhaseCode,
const vec2  _phaseCodeRange 
)

Definition at line 975 of file ImgCodecOhc.cpp.

◆ setPixelPitch() [1/2]

void oph::ImgEncoderOhc::setPixelPitch ( const double  _pxPitchX,
const double  _pxPitchY,
const LenUnit  unit = LenUnit::m 
)

Definition at line 885 of file ImgCodecOhc.cpp.

◆ setPixelPitch() [2/2]

void oph::ImgEncoderOhc::setPixelPitch ( const vec2  _pxPitch,
const LenUnit  unit = LenUnit::m 
)

Definition at line 897 of file ImgCodecOhc.cpp.

◆ setUnitOfWavlen()

void oph::ImgEncoderOhc::setUnitOfWavlen ( const LenUnit  unit)

Definition at line 939 of file ImgCodecOhc.cpp.

◆ setWavelength()

void oph::ImgEncoderOhc::setWavelength ( const Real  _wavlen,
const LenUnit  _unit = LenUnit::m 
)

Definition at line 997 of file ImgCodecOhc.cpp.

Member Data Documentation

◆ File

std::ofstream oph::ImgEncoderOhc::File
protected

Definition at line 176 of file ImgCodecOhc.h.


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