DGtal 1.4.2
|
Tests for the class OneBalancedWordComputer. More...
#include <iostream>
#include <fstream>
#include <list>
#include <vector>
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/geometry/curves/OneBalancedWordComputer.h"
#include "DGtal/geometry/curves/ArithmeticalDSSComputer.h"
#include "ConfigTest.h"
#include "DGtal/geometry/curves/CDynamicBidirectionalSegmentComputer.h"
#include "DGtal/geometry/curves/GreedySegmentation.h"
Go to the source code of this file.
Typedefs | |
typedef FreemanChain< int > | Contour |
Functions | |
bool | testOneBalancedWordComputer () |
bool | CompareToArithmetical () |
bool | testInGreedySegmentation () |
bool | showGreedySegmantation () |
int | main (int argc, char **argv) |
Tests for the class OneBalancedWordComputer.
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/.
Functions for testing class CombinDSS.
This file is part of the DGtal library.
Definition in file testCombinDSS.cpp.
typedef FreemanChain<int> Contour |
Definition at line 59 of file testCombinDSS.cpp.
bool CompareToArithmetical | ( | ) |
Builds OneBalancedWordComputer and ArithmeticalDSSComputer in the fourth quadrants and compares them, if both are equals, the test is passed.
Definition at line 139 of file testCombinDSS.cpp.
References DGtal::FreemanChain< TInteger >::begin(), DGtal::Trace::beginBlock(), DGtal::FreemanChain< TInteger >::chain, DGtal::Trace::endBlock(), and DGtal::trace.
Referenced by main().
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 296 of file testCombinDSS.cpp.
References DGtal::Trace::beginBlock(), CompareToArithmetical(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), DGtal::Trace::info(), showGreedySegmantation(), testInGreedySegmentation(), testOneBalancedWordComputer(), and DGtal::trace.
bool showGreedySegmantation | ( | ) |
This test is an adaptation to OneBalancedWordComputer of 'examples/geometre/curves/greedy-dss-decomposition.cpp' where is uses ArithmeticDSS.
It produces a slightly different decomposition since in a greedy-segmentation, consecutive ArithmeticDSS overlap a single point while OneBalancedWordComputer overlap on a code and thus on two points.
Definition at line 243 of file testCombinDSS.cpp.
References DGtal::Trace::beginBlock(), DGtal::Color::Blue, DGtal::FreemanChain< TInteger >::chain, DGtal::HyperRectDomain< TSpace >::className(), domain, DGtal::Trace::endBlock(), LibBoard::Board::saveSVG(), and DGtal::trace.
Referenced by main().
bool testInGreedySegmentation | ( | ) |
Definition at line 207 of file testCombinDSS.cpp.
References DGtal::Trace::beginBlock(), DGtal::FreemanChain< TInteger >::chain, DGtal::Trace::endBlock(), and DGtal::trace.
Referenced by main().
bool testOneBalancedWordComputer | ( | ) |
Test exted and retract function on a complex chape
Definition at line 66 of file testCombinDSS.cpp.
References DGtal::FreemanChain< TInteger >::begin(), DGtal::Trace::beginBlock(), DGtal::FreemanChain< TInteger >::chain, DGtal::Trace::endBlock(), DGtal::FreemanChain< TInteger >::firstPoint(), and DGtal::trace.
Referenced by main().