Openholo  v2.1
Open Source Digital Holographic Library
ophSigPU.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #ifndef __ophSigPU_h
5 #define __ophSigPU_h
6 
7 #include "ophSig.h"
8 
12 
19 
26 class SIG_DLL ophSigPU : public ophSig
27 {
28 public:
29  explicit ophSigPU(void);
30 
35  bool setPUparam(int maxBoxRadius);
36 
42  bool loadPhaseOriginal(const char *fname, int bitpixel);
43  bool loadPhaseOriginal(void);
44 
48  bool runPU(void);
49 
54  bool savePhaseUnwrapped(const char *fname);
55 
60  bool readConfig(const char * fname);
61 
62 protected:
63 
64  virtual ~ophSigPU(void) = default;
65  void phaseResidues(matrix<Real> &outputResidue);
66  void branchCuts(matrix<Real> &inputResidue, matrix<Real> &outputBranchCuts);
67  void placeBranchCutsInternal(matrix<Real> &branchCuts, int r1, int c1, int r2, int c2);
68  void floodFill(matrix<Real> &inputBranchCuts);
69  double unwrap(double phaseRef, double phaseInput);
70  double mod2pi(double phase);
71  void findNZ(matrix<int> &inputMatrix, vector<int> &row, vector<int> &col);
72  int matrixPartialSum(matrix<int> &inputMatrix, int r1, int c1, int r2, int c2);
73 public:
74 
75 
76 
77 protected:
79  int Nr;
80  int Nc;
81  matrix<Real> PhaseOriginal;
82  matrix<Real> PhaseUnwrapped;
83 };
84 
85 #endif // !__ophSigPU_h
int Nr
Definition: ophSigPU.h:79
int MaxBoxRadius
Definition: ophSigPU.h:78
int Nc
Definition: ophSigPU.h:80
bool readConfig(const char *fname)
Function for Read parameter.
Definition: ophSig.cpp:1287
matrix< Real > PhaseOriginal
Definition: ophSigPU.h:81
Definition: ophSig.h:454
matrix< Real > PhaseUnwrapped
Definition: ophSigPU.h:82
#define SIG_DLL
Definition: ophSig.h:59