DGtal  1.0.0
Functions
testMeaningfulScaleAnalysis.cpp File Reference
#include <iostream>
#include "DGtal/base/Common.h"
#include "ConfigTest.h"
#include "DGtalCatch.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/math/Profile.h"
#include "DGtal/math/MeaningfulScaleAnalysis.h"
Include dependency graph for testMeaningfulScaleAnalysis.cpp:

Go to the source code of this file.

Functions

 TEST_CASE ("Testing MeaningfulScaleAnalysis")
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Bertrand Kerautret (kerau.nosp@m.tre@.nosp@m.loria.nosp@m..fr ) LORIA (CNRS, UMR 7503), University of Nancy, France
Date
2015/12/28

Functions for testing class MeaningfulScaleAnalysis.

This file is part of the DGtal library.

Definition in file testMeaningfulScaleAnalysis.cpp.

Function Documentation

◆ TEST_CASE()

TEST_CASE ( "Testing MeaningfulScaleAnalysis )

Definition at line 58 of file testMeaningfulScaleAnalysis.cpp.

59 {
60 
62  sp.init(6);
63 
64  SECTION("Testing noise level detect of Profile")
65  {
66  sp.addValue(0,22);
67  sp.addValue(1,15);
68  sp.addValue(2,8);
69  sp.addValue(3,17);
70  sp.addValue(4,7);
71  sp.addValue(5,2);
72 
74  std::vector< std::pair<unsigned int, unsigned int> > interval;
75  msa.computeMeaningfulScales(interval, 1);
76  msa.getSlopeFromMeaningfulScales(0,0,2);
77  msa.lowerBoundedNoiseLevel(0,10,2,2,2);
78  unsigned int n = msa.noiseLevel();
79  REQUIRE( interval[0].first == 1 );
80  REQUIRE( interval[0].second == 3 );
81  REQUIRE( interval[1].first == 4 );
82  REQUIRE( n == 1 );
83  }
84 
85 
86 
87 }
Aim: This class implements different methods used to define the meaningful scale analysis as proposed...
REQUIRE(domain.isInside(aPoint))
Aim: This class can be used to represent a profile (PX, PY) defined from an input set of samples (Xi,...
Definition: Profile.h:137
SECTION("Testing constant forward iterators")

References DGtal::Profile< TValueFunctor, TValue >::addValue(), DGtal::MeaningfulScaleAnalysis< TProfile >::computeMeaningfulScales(), DGtal::MeaningfulScaleAnalysis< TProfile >::getSlopeFromMeaningfulScales(), DGtal::Profile< TValueFunctor, TValue >::init(), DGtal::MeaningfulScaleAnalysis< TProfile >::lowerBoundedNoiseLevel(), DGtal::MeaningfulScaleAnalysis< TProfile >::noiseLevel(), REQUIRE(), and SECTION().