DGtal  1.4.beta
MeaningfulScaleAnalysis.h
1 
17 #pragma once
18 
35 #if defined(MeaningfulScaleAnalysis_RECURSES)
36 #error Recursive header files inclusion detected in MeaningfulScaleAnalysis.h
37 #else // defined(MeaningfulScaleAnalysis_RECURSES)
39 #define MeaningfulScaleAnalysis_RECURSES
40 
41 #if !defined MeaningfulScaleAnalysis_h
43 #define MeaningfulScaleAnalysis_h
44 
46 // Inclusions
47 #include <iostream>
48 #include "DGtal/base/Common.h"
49 #include "DGtal/base/ConstAlias.h"
50 #include "DGtal/math/Profile.h"
52 
53 namespace DGtal
54 {
55 
57  // class MeaningfulScaleAnalysis
111  template<typename TProfile>
113  {
114  // ----------------------- Standard services ------------------------------
115  public:
116 
117  typedef TProfile Profile;
118 
123 
124 
129 
130  // ----------------------- Interface --------------------------------------
131  public:
132 
133 
134 
146  void
147  computeMeaningfulScales( std::vector< std::pair< unsigned int, unsigned int > > & intervals,
148  const unsigned int minSize = 1,
149  const double maxSlope = -0.2,
150  const double minSlope = -1e10 ) const;
151 
152 
167  std::pair<bool, double>
168  getSlopeFromMeaningfulScales(const double maxSlope=-0.2,
169  const double minSlope=-1e10,
170  const unsigned int minSize=2) const ;
171 
172 
173 
186  unsigned int
187  noiseLevel( const unsigned int minSize = 1,
188  const double maxSlope = -0.2,
189  const double minSlope = -1e10 ) const;
190 
191 
192 
210  unsigned int
211  lowerBoundedNoiseLevel( const unsigned int minSize = 1,
212  const double maxSlope = -0.2,
213  const double minSlope = -1e10,
214  const double lowerBoundAtScale1 = 1.0,
215  const double lowerBoundSlope = -2.0 ) const;
216 
217 
218 
219 
224  void selfDisplay ( std::ostream & out ) const;
225 
230  bool isValid() const;
231 
232  // ------------------------- Protected Datas ------------------------------
233  protected:
235 
236  // ------------------------- Private Datas --------------------------------
237  private:
238 
239  // ------------------------- Hidden services ------------------------------
240  protected:
241 
247 
248  private:
249 
256 
264 
265  // ------------------------- Internals ------------------------------------
266  private:
267 
268  }; // end of class MeaningfulScaleAnalysis
269 
270 
277  template<typename TProfile>
278  std::ostream&
279  operator<< ( std::ostream & out, const MeaningfulScaleAnalysis<TProfile> & object );
280 
281 
282 } // namespace DGtal
283 
284 
286 // Includes inline functions.
287 #if !defined(BUILD_INLINE)
288 #include "DGtal/math/MeaningfulScaleAnalysis.ih"
289 #endif
290 
291 
292 // //
294 
295 #endif // !defined MeaningfulScaleAnalysis_h
296 
297 #undef MeaningfulScaleAnalysis_RECURSES
298 #endif // else defined(MeaningfulScaleAnalysis_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Aim: This class implements different methods used to define the meaningful scale analysis as proposed...
void selfDisplay(std::ostream &out) const
std::pair< bool, double > getSlopeFromMeaningfulScales(const double maxSlope=-0.2, const double minSlope=-1e10, const unsigned int minSize=2) const
void computeMeaningfulScales(std::vector< std::pair< unsigned int, unsigned int > > &intervals, const unsigned int minSize=1, const double maxSlope=-0.2, const double minSlope=-1e10) const
MeaningfulScaleAnalysis(ConstAlias< Profile > aProfile)
MeaningfulScaleAnalysis(const MeaningfulScaleAnalysis &other)
MeaningfulScaleAnalysis & operator=(const MeaningfulScaleAnalysis &other)
unsigned int noiseLevel(const unsigned int minSize=1, const double maxSlope=-0.2, const double minSlope=-1e10) const
unsigned int lowerBoundedNoiseLevel(const unsigned int minSize=1, const double maxSlope=-0.2, const double minSlope=-1e10, const double lowerBoundAtScale1=1.0, const double lowerBoundSlope=-2.0) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)