isce3 0.25.0
Loading...
Searching...
No Matches
ICU.icc
1#if !defined(ISCE_UNWRAP_ICU_ICU_ICC)
2#error "ICU.icc is an implementation detail of class ICU."
3#endif
4
5#include <exception> // std::domain_error
6
7namespace isce3::unwrap::icu
8{
9
10inline size_t ICU::numBufLines() const { return _NumBufLines; }
11inline void ICU::numBufLines(const size_t numBufLines)
12{
13 if (numBufLines == 0)
14 {
15 throw std::domain_error("number of buffer lines must be greater than zero");
16 }
17 _NumBufLines = numBufLines;
18}
19
20inline size_t ICU::numOverlapLines() const { return _NumOverlapLines; }
21inline void ICU::numOverlapLines(const size_t numOverlapLines)
22{
23 if (numOverlapLines == 0)
24 {
25 throw std::domain_error("number of overlap lines must be greater than zero");
26 }
27 _NumOverlapLines = numOverlapLines;
28}
29
30inline bool ICU::usePhaseGradNeut() const { return _UsePhaseGradNeut; }
31inline void ICU::usePhaseGradNeut(const bool usePhaseGradNeut) { _UsePhaseGradNeut = usePhaseGradNeut; }
32
33inline bool ICU::useIntensityNeut() const { return _UseIntensityNeut; }
34inline void ICU::useIntensityNeut(const bool useIntensityNeut) { _UseIntensityNeut = useIntensityNeut; }
35
36inline int ICU::phaseGradWinSize() const { return _PhaseGradWinSize; }
38{
39 if (phaseGradWinSize < 1)
40 {
41 throw std::domain_error("phase gradient window size must be greater than zero");
42 }
43 else if (phaseGradWinSize % 2 == 0)
44 {
45 throw std::domain_error("phase gradient window size must be odd-valued");
46 }
47 _PhaseGradWinSize = phaseGradWinSize;
48}
49
50inline float ICU::neutPhaseGradThr() const { return _NeutPhaseGradThr; }
51inline void ICU::neutPhaseGradThr(const float neutPhaseGradThr)
52{
53 if (neutPhaseGradThr <= 0.f)
54 {
55 throw std::domain_error("neutron phase gradient threshold must be greater than zero");
56 }
57 _NeutPhaseGradThr = neutPhaseGradThr;
58}
59
60inline float ICU::neutIntensityThr() const { return _NeutIntensityThr; }
61inline void ICU::neutIntensityThr(const float neutIntensityThr)
62{
63 if (neutIntensityThr <= 0.f)
64 {
65 throw std::domain_error("neutron intensity threshold must be greater than zero");
66 }
67 _NeutIntensityThr = neutIntensityThr;
68}
69
70inline float ICU::neutCorrThr() const { return _NeutCorrThr; }
71inline void ICU::neutCorrThr(const float neutCorrThr)
72{
73 if (neutCorrThr <= 0.f)
74 {
75 throw std::domain_error("neutron correlation threshold must be greater than zero");
76 }
77 _NeutCorrThr = neutCorrThr;
78}
79
80inline int ICU::numTrees() const { return _NumTrees; }
81inline void ICU::numTrees(const int numTrees)
82{
83 if (numTrees < 1)
84 {
85 throw std::domain_error("number of trees must be greater than zero");
86 }
87 _NumTrees = numTrees;
88}
89
90inline int ICU::maxBranchLen() const { return _MaxBranchLen; }
91inline void ICU::maxBranchLen(const int maxBranchLen)
92{
93 if (maxBranchLen < 1)
94 {
95 throw std::domain_error("max branch length must be greater than zero");
96 }
97 _MaxBranchLen = maxBranchLen;
98}
99
100inline float ICU::ratioDxDy() const { return _RatioDxDy; }
101inline void ICU::ratioDxDy(const float ratioDxDy)
102{
103 if (ratioDxDy <= 0.f)
104 {
105 throw std::domain_error("x:y pixel spacing ratio must be greater than zero");
106 }
107 _RatioDxDy = ratioDxDy;
108}
109
110inline float ICU::initCorrThr() const { return _InitCorrThr; }
111inline void ICU::initCorrThr(const float initCorrThr)
112{
114 {
115 throw std::domain_error("initial correlation threshold must be between 0 and 1");
116 }
117 _InitCorrThr = initCorrThr;
118}
119
120inline float ICU::maxCorrThr() const { return _MaxCorrThr; }
121inline void ICU::maxCorrThr(const float maxCorrThr)
122{
124 {
125 throw std::domain_error("max correlation threshold must be between 0 and 1");
126 }
127 _MaxCorrThr = maxCorrThr;
128}
129
130inline float ICU::corrThrInc() const { return _CorrThrInc; }
131inline void ICU::corrThrInc(const float corrThrInc)
132{
133 if (corrThrInc <= 0.f)
134 {
135 throw std::domain_error("correlation threshold increment must be greater than zero");
136 }
137 _CorrThrInc = corrThrInc;
138}
139
140inline float ICU::minCCAreaFrac() const { return _MinCCAreaFrac; }
141inline void ICU::minCCAreaFrac(const float minCCAreaFrac)
142{
144 {
145 throw std::domain_error("min connected component size fraction of tile area must be between 0 and 1");
146 }
147 _MinCCAreaFrac = minCCAreaFrac;
148}
149
150inline size_t ICU::numBsLines() const { return _NumBsLines; }
151inline void ICU::numBsLines(const size_t numBsLines)
152{
153 if (numBsLines == 0)
154 {
155 throw std::domain_error("number of bootstrap lines must be greater than zero");
156 }
157 _NumBsLines = numBsLines;
158}
159
160inline size_t ICU::minBsPts() const { return _MinBsPts; }
161inline void ICU::minBsPts(const size_t minBsPts)
162{
163 if (minBsPts == 0)
164 {
165 throw std::domain_error("min bootstrap overlap area must be greater than zero");
166 }
167 _MinBsPts = minBsPts;
168}
169
170inline float ICU::bsPhaseVarThr() const { return _BsPhaseVarThr; }
171inline void ICU::bsPhaseVarThr(const float bsPhaseVarThr)
172{
173 if (bsPhaseVarThr <= 0.f)
174 {
175 throw std::domain_error("bootstrap phase variance threshold must be greater than zero");
176 }
177 _BsPhaseVarThr = bsPhaseVarThr;
178}
179
180}
181
int numTrees() const
Get number of tree growing iterations.
Definition ICU.icc:80
float neutIntensityThr() const
Get intensity variance threshold for neutron generation (stddevs from mean).
Definition ICU.icc:60
int maxBranchLen() const
Get max branch cut length.
Definition ICU.icc:90
size_t numBufLines() const
Get tile buffer length.
Definition ICU.icc:10
float initCorrThr() const
Get initial correlation threshold.
Definition ICU.icc:110
float ratioDxDy() const
Get ratio of x:y pixel spacing (for measuring branch cut length).
Definition ICU.icc:100
size_t numOverlapLines() const
Get lines of overlap between tiles.
Definition ICU.icc:20
float minCCAreaFrac() const
Get min connected component size as fraction of tile area.
Definition ICU.icc:140
bool useIntensityNeut() const
Get intensity neutrons flag.
Definition ICU.icc:33
float bsPhaseVarThr() const
Get bootstrap phase variance threshold.
Definition ICU.icc:170
float neutPhaseGradThr() const
Get range phase gradient threshold for neutron generation (rad/sample).
Definition ICU.icc:50
size_t numBsLines() const
Get number of bootstrap lines.
Definition ICU.icc:150
float corrThrInc() const
Get correlation threshold increment.
Definition ICU.icc:130
float maxCorrThr() const
Get max correlation threshold.
Definition ICU.icc:120
int phaseGradWinSize() const
Get window size for phase gradient calculation.
Definition ICU.icc:36
size_t minBsPts() const
Get bootstrapping min overlap area.
Definition ICU.icc:160
bool usePhaseGradNeut() const
Get phase gradient neutrons flag.
Definition ICU.icc:30
float neutCorrThr() const
Get correlation threshold for neutron generation.
Definition ICU.icc:70

Generated for ISCE3.0 by doxygen 1.13.2.