Openholo  v2.1
Open Source Digital Holographic Library
ophIFTA.h
Go to the documentation of this file.
1 #pragma once
2 #include "ophGen.h"
3 
4 class GEN_DLL ophIFTA : public ophGen
5 {
6 public:
7  explicit ophIFTA();
8  virtual ~ophIFTA();
9  Real generateHologram();
10  bool readConfig(const char* fname);
11  bool readImage(const char* fname, bool bRGB);
12  bool normalize();
13  void encoding(unsigned int ENCODE_FLAG, unsigned int SSB_PASSBAND);
14  uchar getMax(uchar *src, int width, int height);
15  //Real getDistance() { return m_distance; };
16  void setConfig(OphIFTAConfig config) { m_config = config; }
17  OphIFTAConfig& getConfig() { return m_config; }
18  uint* getProgress() { return &m_nProgress; }
19 
20 private:
21  vec2 ss;
22  vec2 pp;
23  ivec2 pn;
24 
25  uchar* imgRGB;
26  uchar* imgDepth;
27  uchar* imgOutput;
28  Real nearDepth;
29  Real farDepth;
30  int nIteration;
31  int nDepth;
32  uint m_nProgress;
33 
34  int width;
35  int height;
36  int bytesperpixel;
37 
38  OphIFTAConfig m_config;
39 };
40 
bool readImage(const char *fname, bool bRGB)
Definition: ophGen.cpp:2410
uchar * imgRGB
Definition: ophGen.h:506
unsigned char uchar
Definition: typedef.h:64
#define GEN_DLL
Definition: ophGen.h:54
Definition: ophIFTA.h:4
uchar * imgDepth
Definition: ophGen.h:507
void normalize(void)
Normalization function to save as image file after hologram creation.
Definition: ophGen.cpp:919
uint * getProgress()
Definition: ophIFTA.h:18
int ss
Binary Encoding - Error diffusion.
Definition: ophGen.h:391
void setConfig(OphIFTAConfig config)
Definition: ophIFTA.h:16
OphIFTAConfig & getConfig()
Definition: ophIFTA.h:17
bool readConfig(const char *fname)
load to configuration file.
Definition: ophGen.cpp:226
float Real
Definition: typedef.h:55
void encoding()
Definition: ophGen.cpp:1256
unsigned int uint
Definition: typedef.h:62
Definition: ophGen.h:68