Openholo  v5.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 oph::ohcHeader &_Header)
 
virtual ~ImgCodecOhc ()=0
 
virtual void releaseFldData ()
 
void releaseOHCheader ()
 
void releaseCodeBuffer ()
 
bool setFileName (const std::string &_fname)
 
bool setOHCheader (const oph::ohcHeader &_Header)
 
void getOHCheader (oph::ohcHeader &_Header)
 
void getFieldInfo (oph::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
 
oph::ohcHeaderHeader = nullptr
 

Detailed Description

Definition at line 132 of file ImgCodecOhc.h.

Constructor & Destructor Documentation

◆ ImgEncoderOhc() [1/3]

oph::ImgEncoderOhc::ImgEncoderOhc ( )

Definition at line 817 of file ImgCodecOhc.cpp.

◆ ImgEncoderOhc() [2/3]

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

Definition at line 829 of file ImgCodecOhc.cpp.

◆ ImgEncoderOhc() [3/3]

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

Definition at line 823 of file ImgCodecOhc.cpp.

◆ ~ImgEncoderOhc()

oph::ImgEncoderOhc::~ImgEncoderOhc ( )
virtual

Definition at line 835 of file ImgCodecOhc.cpp.

Member Function Documentation

◆ addComplexFieldData() [1/2]

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

Definition at line 1022 of file ImgCodecOhc.cpp.

◆ addComplexFieldData() [2/2]

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

Definition at line 1026 of file ImgCodecOhc.cpp.

◆ addWavelength()

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

Definition at line 1047 of file ImgCodecOhc.cpp.

◆ addWavelengthNComplexFieldData()

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

Definition at line 1017 of file ImgCodecOhc.cpp.

◆ clearWavelength()

void oph::ImgEncoderOhc::clearWavelength ( )

Definition at line 1042 of file ImgCodecOhc.cpp.

◆ encodeFieldData()

uint64_t oph::ImgEncoderOhc::encodeFieldData ( )
protected

Definition at line 1205 of file ImgCodecOhc.cpp.

◆ initOHCheader()

void oph::ImgEncoderOhc::initOHCheader ( )
virtual

Reimplemented from oph::ImgCodecOhc.

Definition at line 842 of file ImgCodecOhc.cpp.

◆ save()

bool oph::ImgEncoderOhc::save ( )

Definition at line 1057 of file ImgCodecOhc.cpp.

◆ setColorArrange()

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

Definition at line 944 of file ImgCodecOhc.cpp.

◆ setColorType()

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

Definition at line 934 of file ImgCodecOhc.cpp.

◆ setFieldEncoding()

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

Definition at line 965 of file ImgCodecOhc.cpp.

◆ setNumOfPixel() [1/2]

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

Definition at line 878 of file ImgCodecOhc.cpp.

◆ setNumOfPixel() [2/2]

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

Definition at line 889 of file ImgCodecOhc.cpp.

◆ setNumOfWavlen()

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

Definition at line 924 of file ImgCodecOhc.cpp.

◆ setPhaseEncoding() [1/2]

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

Definition at line 977 of file ImgCodecOhc.cpp.

◆ setPhaseEncoding() [2/2]

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

Definition at line 990 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 900 of file ImgCodecOhc.cpp.

◆ setPixelPitch() [2/2]

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

Definition at line 912 of file ImgCodecOhc.cpp.

◆ setUnitOfWavlen()

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

Definition at line 954 of file ImgCodecOhc.cpp.

◆ setWavelength()

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

Definition at line 1012 of file ImgCodecOhc.cpp.

Member Data Documentation

◆ File

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

Definition at line 169 of file ImgCodecOhc.h.


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