00001 // ---------------------------------------------------------------------------- 00002 // 00003 // $Id$ 00004 // 00005 // Copyright 2008, 2009, 2010, 2011, 2012 Antonio Franchi and Paolo Stegagno 00006 // 00007 // This file is part of MIP. 00008 // 00009 // MIP is free software: you can redistribute it and/or modify 00010 // it under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation, either version 3 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // MIP is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>. 00021 // 00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it 00023 // 00024 // ---------------------------------------------------------------------------- 00025 00026 00030 00034 00035 00036 #ifndef __PROTRUSION_EXTR_H__ 00037 #define __PROTRUSION_EXTR_H__ 00038 00039 #include <baselib.h> 00040 00041 using namespace std; 00042 00043 using namespace MipBaselib; 00044 00045 namespace MipAlgorithms{ 00046 00048 /* @{ */ 00049 00053 class ProtrusionsExtrPar{ 00054 private: 00055 Decimal _discThreshold; 00056 Decimal _minRobWidth; 00057 Decimal _maxRobWidth; 00058 Decimal _offset; 00059 Decimal _sameFeatThreshold; 00060 Decimal _additiveNoiseRangeCov; 00061 Decimal _additiveNoiseBeariCov; 00062 protected: 00063 00066 inline void setDiscThreshold(Decimal value); 00067 00070 inline void setMinRobWidth(Decimal value); 00071 00074 inline void setMaxRobWidth(Decimal value); 00075 00078 inline void setOffset(Decimal value); 00079 00082 inline void setSameFeatThreshold(Decimal value); 00083 00086 inline void setAdditiveNoiseRangeCov(Decimal value); 00087 00090 inline void setAdditiveNoiseBeariCov(Decimal value); 00091 00092 public: 00095 ProtrusionsExtrPar(); 00096 00104 ProtrusionsExtrPar(Decimal discThreshold, Decimal minRobWidth, Decimal maxRobWidth, Decimal offset, Decimal sameFeatThreshold, Decimal addNoiseRange=0.0, Decimal addNoiseBear=0.0); 00105 00107 ProtrusionsExtrPar(const ProtrusionsExtrPar &s); 00108 00110 ProtrusionsExtrPar& operator=(const ProtrusionsExtrPar& s); 00111 00113 inline Decimal discThreshold(); 00114 00116 inline Decimal minRobWidth(); 00117 00119 inline Decimal maxRobWidth(); 00120 00122 inline Decimal offset(); 00123 00125 inline Decimal sameFeatThreshold(); 00126 00128 inline Decimal additiveNoiseRangeCov(); 00129 00131 inline Decimal additiveNoiseBeariCov(); 00132 00134 inline string print(); 00135 }; 00136 00142 class ProtrusionsExtr{ 00143 private: 00144 ProtrusionsExtrPar params; 00145 00146 Decimal obsPolarDiameter(int down, int up, Scan scan, Decimal *robDistance); 00147 00148 public: 00151 ProtrusionsExtr(); 00152 00155 ProtrusionsExtr(ProtrusionsExtrPar par); 00156 00158 ~ProtrusionsExtr(); 00159 00163 PosiFeatures extract(Scan scan); 00164 }; 00165 00166 }; // end namespace MipAlgorithms 00167 00168 #endif 00169 00170 00171 /* @} */ 00172 00173 00174