DGtal 1.4.0
|
#include <iostream>
#include <map>
#include <unordered_map>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/topology/KhalimskySpaceND.h"
#include "DGtal/topology/KhalimskyCellHashFunctions.h"
#include "DGtal/topology/CubicalComplex.h"
#include "DGtalCatch.h"
Go to the source code of this file.
Typedefs | |
typedef KSpace::Point | Point |
typedef KSpace::Cell | Cell |
typedef std::unordered_map< Cell, CubicalCellData > | Map |
typedef CubicalComplex< KSpace, Map > | CC |
typedef CC::CellMapConstIterator | CellMapConstIterator |
Functions | |
srand (0) | |
K | init (Point(0, 0, 0), Point(512, 512, 512), true) |
std::vector< int > | nbCoFaces (4, 0) |
std::vector< int > | nbFaces (6, 0) |
std::vector< int > | nbFaces2 (6, 0) |
std::vector< int > | nbBdry (10, 0) |
std::vector< int > | nbBdry2 (10, 0) |
GIVEN ("A cubical complex with random 3-cells") | |
SCENARIO ("CubicalComplex< K3,std::unordered_map<> > collapse tests", "[cubical_complex][collapse]") | |
SCENARIO ("CubicalComplex< K3,std::unordered_map<> > link tests", "[cubical_complex][link]") | |
SCENARIO ("CubicalComplex< K3,std::map<> > collapse tests", "[cubical_complex][collapse]") | |
SCENARIO ("CubicalComplex< K3,std::map<> > link tests", "[cubical_complex][link]") | |
SCENARIO ("CubicalComplex< K3,std::map<> > concept check tests", "[cubical_complex][concepts]") | |
SCENARIO ("CubicalComplex< K2,std::map<> > set operations and relations", "[cubical_complex][ccops]") | |
Variables | |
static const int | NBCELLS = 1000 |
KSpace | K |
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 CubicalComplex.
This file is part of the DGtal library.
Definition in file testCubicalComplex.cpp.
typedef CubicalComplex< KSpace, Map > CC |
Definition at line 58 of file testCubicalComplex.cpp.
typedef KSpace::Cell Cell |
Definition at line 56 of file testCubicalComplex.cpp.
Definition at line 59 of file testCubicalComplex.cpp.
typedef std::map< Cell, CubicalCellData > Map |
Definition at line 57 of file testCubicalComplex.cpp.
typedef KSpace::Point Point |
Definition at line 55 of file testCubicalComplex.cpp.
GIVEN | ( | "A cubical complex with random 3-cells" | ) |
Definition at line 70 of file testCubicalComplex.cpp.
References K, nbBdry(), nbBdry2(), NBCELLS, nbCoFaces(), nbFaces(), nbFaces2(), REQUIRE(), and DGtal::KhalimskySpaceND< dim, TInteger >::uCell().
Referenced by SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), TEST_CASE_METHOD(), TEST_CASE_METHOD(), TEST_CASE_METHOD(), TEST_CASE_METHOD(), and TEST_CASE_METHOD().
Referenced by testSegmentationLarger().
std::vector< int > nbBdry | ( | 10 | , |
0 | ) |
Referenced by GIVEN().
std::vector< int > nbBdry2 | ( | 10 | , |
0 | ) |
Referenced by GIVEN().
std::vector< int > nbCoFaces | ( | 4 | , |
0 | ) |
Referenced by GIVEN().
std::vector< int > nbFaces | ( | 6 | , |
0 | ) |
Referenced by GIVEN().
std::vector< int > nbFaces2 | ( | 6 | , |
0 | ) |
Referenced by GIVEN().
SCENARIO | ( | "CubicalComplex< K2,std::map<> > set operations and relations" | , |
"" | [cubical_complex][ccops] ) |
Definition at line 576 of file testCubicalComplex.cpp.
References DGtal::CubicalComplex< TKSpace, TCellContainer >::boundary(), CAPTURE(), DGtal::CubicalComplex< TKSpace, TCellContainer >::close(), domain, DGtal::KhalimskySpaceND< dim, TInteger >::init(), DGtal::CubicalComplex< TKSpace, TCellContainer >::insertCell(), K, REQUIRE(), DGtal::CubicalComplex< TKSpace, TCellContainer >::size(), and DGtal::KhalimskySpaceND< dim, TInteger >::uSpel().
SCENARIO | ( | "CubicalComplex< K3,std::map<> > collapse tests" | , |
"" | [cubical_complex][collapse] ) |
Definition at line 454 of file testCubicalComplex.cpp.
References CAPTURE(), DGtal::functions::collapse(), GIVEN(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), K, REQUIRE(), srand(), DGtal::KhalimskySpaceND< dim, TInteger >::uCell(), and DGtal::KhalimskySpaceND< dim, TInteger >::uSpel().
SCENARIO | ( | "CubicalComplex< K3,std::map<> > concept check tests" | , |
"" | [cubical_complex][concepts] ) |
Definition at line 563 of file testCubicalComplex.cpp.
SCENARIO | ( | "CubicalComplex< K3,std::map<> > link tests" | , |
"" | [cubical_complex][link] ) |
Definition at line 515 of file testCubicalComplex.cpp.
References DGtal::CubicalComplex< TKSpace, TCellContainer >::close(), DGtal::CubicalComplex< TKSpace, TCellContainer >::euler(), GIVEN(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), DGtal::CubicalComplex< TKSpace, TCellContainer >::insert(), DGtal::CubicalComplex< TKSpace, TCellContainer >::insertCell(), K, DGtal::CubicalComplex< TKSpace, TCellContainer >::link(), REQUIRE(), srand(), DGtal::KhalimskySpaceND< dim, TInteger >::uPointel(), and DGtal::KhalimskySpaceND< dim, TInteger >::uSpel().
SCENARIO | ( | "CubicalComplex< K3,std::unordered_map<> > collapse tests" | , |
"" | [cubical_complex][collapse] ) |
Definition at line 195 of file testCubicalComplex.cpp.
References CAPTURE(), DGtal::functions::collapse(), GIVEN(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), K, REQUIRE(), srand(), DGtal::KhalimskySpaceND< dim, TInteger >::uCell(), and DGtal::KhalimskySpaceND< dim, TInteger >::uSpel().
SCENARIO | ( | "CubicalComplex< K3,std::unordered_map<> > link tests" | , |
"" | [cubical_complex][link] ) |
Definition at line 256 of file testCubicalComplex.cpp.
References DGtal::CubicalComplex< TKSpace, TCellContainer >::close(), DGtal::CubicalComplex< TKSpace, TCellContainer >::euler(), GIVEN(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), DGtal::CubicalComplex< TKSpace, TCellContainer >::insert(), DGtal::CubicalComplex< TKSpace, TCellContainer >::insertCell(), K, DGtal::CubicalComplex< TKSpace, TCellContainer >::link(), REQUIRE(), srand(), DGtal::KhalimskySpaceND< dim, TInteger >::uPointel(), and DGtal::KhalimskySpaceND< dim, TInteger >::uSpel().
srand | ( | 0 | ) |
Referenced by incTestComparison(), main(), randomSeeds(), randomTest30All(), randomTest52All(), randomTest62All(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), test_get(), and test_setVal().
KSpace K |
Definition at line 62 of file testCubicalComplex.cpp.
Referenced by accuracyTest(), ballGenerator(), centerSurfel(), cmpSCellsIfInside(), cmpUCellsIfInside(), DGtal::functions::const_middle(), estimatorOnShapeDigitization(), DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::getCellRange(), getComplex(), DGtal::ShortcutsGeometry< TKSpace >::getCTrivialNormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalDirections(), DGtal::ShortcutsGeometry< TKSpace >::getGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getIIGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getIIGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getIIGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getIIMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getIIMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getIIMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getIINormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getIINormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getIINormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getIIPrincipalCurvaturesAndDirections(), DGtal::ShortcutsGeometry< TKSpace >::getIIPrincipalCurvaturesAndDirections(), DGtal::ShortcutsGeometry< TKSpace >::getIIPrincipalCurvaturesAndDirections(), DGtal::CellGeometryFunctions< TKSpace, i, N >::getIncidentCellsToPointels(), DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::getIncidentCellsToPointels(), DGtal::CellGeometryFunctions< TKSpace, 1, 3 >::getIncidentCellsToPointels(), DGtal::CellGeometryFunctions< TKSpace, 2, 2 >::getIncidentCellsToPointels(), DGtal::CellGeometryFunctions< TKSpace, 2, 3 >::getIncidentCellsToPointels(), DGtal::CellGeometryFunctions< TKSpace, 3, 3 >::getIncidentCellsToPointels(), DGtal::CellGeometryFunctions< TKSpace, i, N >::getIncidentCellsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::getIncidentCellsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 1, 3 >::getIncidentCellsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 2, 2 >::getIncidentCellsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 2, 3 >::getIncidentCellsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 3, 3 >::getIncidentCellsToPoints(), DGtal::CellGeometryFunctions< TKSpace, i, N >::getIncidentKPointsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::getIncidentKPointsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 1, 3 >::getIncidentKPointsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 2, 2 >::getIncidentKPointsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 2, 3 >::getIncidentKPointsToPoints(), DGtal::CellGeometryFunctions< TKSpace, 3, 3 >::getIncidentKPointsToPoints(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::ShortcutsGeometry< TKSpace >::getMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getNormalVectors(), DGtal::ATSolver2D< TKSpace, TLinearAlgebra >::getOutputScalarFieldV0(), DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::ShortcutsGeometry< TKSpace >::getPositions(), DGtal::Shortcuts< TKSpace >::getPrimalCells(), DGtal::Shortcuts< TKSpace >::getPrimalVertices(), DGtal::Shortcuts< TKSpace >::getPrimalVertices(), DGtal::ShortcutsGeometry< TKSpace >::getPrincipalCurvaturesAndDirections(), DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalDirections(), DGtal::ShortcutsGeometry< TKSpace >::getTrivialNormalVectors(), GIVEN(), main(), main(), main(), main(), DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeLightDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeLightDigitalSurfaces(), DGtal::Shortcuts< TKSpace >::makeLightDigitalSurfaces(), DGtal::Shortcuts< TKSpace >::makePolygonalSurface(), DGtal::Shortcuts< TKSpace >::makeTriangulatedSurface(), Object3D(), DGtal::Shortcuts< TKSpace >::CellReader::operator()(), DGtal::Shortcuts< TKSpace >::CellWriter::operator()(), DGtal::Shortcuts< TKSpace >::SCellReader::operator()(), DGtal::Shortcuts< TKSpace >::SCellWriter::operator()(), DGtal::Shortcuts< TKSpace >::outputCellMapAsCSV(), DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputSCellMapAsCSV(), DGtal::Shortcuts< TKSpace >::outputSurfelsAsObj(), DGtal::NeighborhoodConvexityAnalyzer< TKSpace, K >::radius(), DGtal::Shortcuts< TKSpace >::saveOBJ(), DGtal::Shortcuts< TKSpace >::saveOFF(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), testBallQuad(), testCellDrawOnBoard(), testCellularGridSpaceNDCoFaces(), testCellularGridSpaceNDFaces(), testCombinatorialSurface(), testCompareEstimator(), testComputeInterior(), testCube(), testCurvature2d(), testDigitalSetBoundary(), testDigitalSurface(), testDigitalSurfaceBoostGraphInterface(), testDigitization(), testDirectIncidence(), testEmbedder(), testEstimatorCache(), testExplicitDigitalSurface(), testFaces(), testFindABel(), testFindABel(), testFitting(), testGaussianCurvature3d(), DGtal::testImplicitDigitalSurface(), testImplicitDigitalSurface(), testIncidence(), testLightExplicitDigitalSurface(), DGtal::testLightImplicitDigitalSurface(), testLightImplicitDigitalSurface(), testLocalEstimatorFromFunctorAdapter(), testMeanCurvature3d(), testNeighborhood(), testObjectGraph(), testOrderingDigitalSurfaceFacesAroundVertex(), testPrincipalCurvatures3d(), testRaySurface(), testScan(), testSurfelAdjacency(), testTrueLocalEstimatorOnShapeDigitization(), testUmbrellaComputer(), and DGtal::ATSolver2D< TKSpace, TLinearAlgebra >::updateSmallestEpsilonMap().
|
static |
Definition at line 50 of file testCubicalComplex.cpp.
Referenced by GIVEN().