DGtal 2.0.0
|
#include <iostream>
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/topology/SurfelAdjacency.h"
#include "DGtal/topology/DigitalSurface.h"
#include "DGtal/topology/helpers/BoundaryPredicate.h"
#include "DGtal/topology/SetOfSurfels.h"
#include "DGtal/topology/SCellsFunctors.h"
#include "DGtal/shapes/Shapes.h"
#include "DGtal/shapes/ShapeFactory.h"
#include "DGtal/shapes/GaussDigitizer.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtalCatch.h"
Go to the source code of this file.
Data Structures | |
struct | AngleLessCell |
Functions | |
double | angle (const DGtal::Z2i::RealPoint &point) |
double | angle (const DGtal::Z2i::KSpace &kspace, const DGtal::Z2i::SCell &cell, const double h) |
template<typename Shape> | |
void | digitize (Shape &shape, std::vector< SCell > &sCells0, std::vector< SCell > &sCells1, KSpace &kspace, const double h) |
template<typename Shape> | |
bool | test_shape (Shape &shape, const double h, const double epsilon) |
TEST_CASE ("Projection test on various shapes") |
Variables | |
Domain | domain |
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/.
Tests of projections functions in starshape.
This file is part of the DGtal library.
Definition in file testProjection.cpp.
double angle | ( | const DGtal::Z2i::KSpace & | kspace, |
const DGtal::Z2i::SCell & | cell, | ||
const double | h ) |
Definition at line 63 of file testProjection.cpp.
References angle().
double angle | ( | const DGtal::Z2i::RealPoint & | point | ) |
Definition at line 56 of file testProjection.cpp.
References angle().
Referenced by LibBoard::Board::addDuplicates(), angle(), angle(), DGtal::NormalCycleFormula< RealPoint, RealVector >::anisotropicCurvatureH1(), DGtal::NormalCycleFormula< RealPoint, RealVector >::anisotropicCurvatureH2(), LibBoard::Arrow::Arrow(), DGtal::functors::BackwardRigidTransformation2D< Space >::BackwardRigidTransformation2D(), DGtal::functors::BackwardRigidTransformation3D< Space >::BackwardRigidTransformation3D(), LibBoard::Board::clear(), LibBoard::Dot::Dot(), LibBoard::Rectangle::flushCairo(), LibBoard::Rectangle::flushSVG(), DGtal::functors::ForwardRigidTransformation2D< Space >::ForwardRigidTransformation2D(), DGtal::functors::ForwardRigidTransformation3D< Space >::ForwardRigidTransformation3D(), LibBoard::Line::Line(), main(), AngleLessCell::operator()(), LibBoard::Board::rotate(), LibBoard::Board::rotate(), LibBoard::Circle::rotate(), LibBoard::Circle::rotate(), LibBoard::Dot::rotate(), LibBoard::Ellipse::rotate(), LibBoard::Ellipse::rotate(), LibBoard::GouraudTriangle::rotate(), LibBoard::GouraudTriangle::rotate(), LibBoard::Group::rotate(), LibBoard::Group::rotate(), LibBoard::Line::rotate(), LibBoard::Line::rotate(), LibBoard::Path::rotate(), LibBoard::Path::rotate(), LibBoard::Point::rotate(), LibBoard::Point::rotate(), LibBoard::Polyline::rotate(), LibBoard::Polyline::rotate(), LibBoard::Shape::rotate(), LibBoard::Shape::rotate(), LibBoard::ShapeList::rotate(), LibBoard::ShapeList::rotate(), LibBoard::Text::rotate(), LibBoard::Text::rotate(), LibBoard::Arrow::rotated(), LibBoard::Arrow::rotated(), LibBoard::Board::rotated(), LibBoard::Board::rotated(), LibBoard::Circle::rotated(), LibBoard::Circle::rotated(), LibBoard::Dot::rotated(), LibBoard::Ellipse::rotated(), LibBoard::Ellipse::rotated(), LibBoard::GouraudTriangle::rotated(), LibBoard::GouraudTriangle::rotated(), LibBoard::Group::rotated(), LibBoard::Group::rotated(), LibBoard::Line::rotated(), LibBoard::Line::rotated(), LibBoard::Path::rotated(), LibBoard::Path::rotated(), LibBoard::Point::rotated(), LibBoard::Point::rotated(), LibBoard::Polyline::rotated(), LibBoard::Polyline::rotated(), LibBoard::Rectangle::rotated(), LibBoard::Rectangle::rotated(), LibBoard::ShapeList::rotated(), LibBoard::ShapeList::rotated(), LibBoard::Text::rotated(), LibBoard::Text::rotated(), LibBoard::Triangle::rotated(), LibBoard::Shape::rotateDeg(), LibBoard::Shape::rotateDeg(), LibBoard::Board::setLineJoin(), TEST_CASE(), and DGtal::NormalCycleFormula< RealPoint, RealVector >::twiceMeanCurvature().
void digitize | ( | Shape & | shape, |
std::vector< SCell > & | sCells0, | ||
std::vector< SCell > & | sCells1, | ||
KSpace & | kspace, | ||
const double | h ) |
Definition at line 91 of file testProjection.cpp.
References domain, DGtal::Astroid2D< TSpace >::getLowerBound(), DGtal::Astroid2D< TSpace >::getUpperBound(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), and DGtal::KhalimskySpaceND< dim, TInteger >::sCell().
Referenced by main(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and test_shape().
TEST_CASE | ( | "Projection test on various shapes" | ) |
Definition at line 169 of file testProjection.cpp.
References REQUIRE(), SECTION(), and test_shape().
Definition at line 127 of file testProjection.cpp.
References DGtal::StarShaped2D< TSpace >::closestPointWithWitnesses(), digitize(), and DGtal::StarShaped2D< TSpace >::findIntersection().
Referenced by TEST_CASE().
Domain domain |
Definition at line 88 of file testProjection.cpp.
Referenced by alphaShape(), DGtal::SetFromImage< TSet >::append(), ArrayImageAdapter_example(), basicUsage(), DGtal::BoundedLatticePolytope< Space >::BoundedLatticePolytope(), DGtal::BoundedRationalPolytope< Space >::BoundedRationalPolytope(), DGtal::ConvexCellComplex< TPoint >::cellLatticePolytope(), checkChordGenericStandardPlaneComputer(), checkCOBAGenericStandardPlaneComputer(), cmpTranslatedFFT(), DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange(), DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange(), DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange(), DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange(), DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange(), convexHull(), Fixture_complex_diamond::create_set(), Fixture_complex_fig4::create_set(), Fixture_isthmus::create_set(), Fixture_X::create_set(), digitize(), displayPredicate(), displaySimplicityTable(), displaySimplicityTable(), DGtal::IteratorCompletionTraits< ArrayImageAdapter< TArrayIterator, TDomain > >::DistanceFunctor::DistanceFunctor(), DGtal::IteratorCompletionTraits< MyImage< T, N > >::DistanceFunctor::DistanceFunctor(), DGtal::Display3D< Space, KSpace >::draw(), drawArithmeticalDSL(), estimatorOnShapeDigitization(), example(), exampleNaiveDSL(), exampleNaiveDSS(), exampleStandardDSL(), exampleStandardDSS(), exampleUpdate(), Fixture_object_diamond_with_hole::Fixture_object_diamond_with_hole(), for(), generateRefImage(), DGtal::functions::generateSimplicityTable(), DGtal::functions::generateVoxelComplexTable(), DGtal::Shortcuts< Z3i::KSpace >::getKSpace(), image(), DGtal::BoundedLatticePolytope< Space >::init(), DGtal::BoundedRationalPolytope< Space >::init(), DGtal::DiscreteExteriorCalculus< 2, dimension, LinearAlgebra >::initKSpace(), laplace_sphere(), laplacian(), lightBetween(), localDualVolume(), main(), main(), main(), main(), DGtal::Shortcuts< Z3i::KSpace >::makeBinaryImage(), DGtal::Shortcuts< Z3i::KSpace >::makeBinaryImage(), DGtal::Shortcuts< Z3i::KSpace >::makeDoubleImage(), DGtal::Shortcuts< Z3i::KSpace >::makeFloatImage(), DGtal::Shortcuts< Z3i::KSpace >::makeGrayScaleImage(), DGtal::Shortcuts< Z3i::KSpace >::makeGrayScaleImage(), moduleImages_example(), Object3D(), Objects2D::Objects2D(), pointsInStandardPlane(), refImage(), REQUIRE(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), SECTION(), DGtal::SetValueIterator< TImage, typename Domain::ConstReverseIterator >::SetValueIterator(), showGreedySegmantation(), sum_fn_on_domain(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE_METHOD(), TEST_CASE_METHOD(), test_g_f_fm1(), test_image(), test_linear_ring(), test_linear_structure(), test_manual_operators_2d(), test_manual_operators_3d(), test_range_constRange(), testAPI(), testBIGINTEGERSpace(), testBoard2D(), testBoard2DCustomStyle(), testBreadthFirstPropagation(), testCellDrawOnBoard(), testCombinatorialSurface(), testCompareEstimator(), testCompareExactBruteForce(), testCompareExactInexact(), testCompareInexactBruteForce(), testConsistence(), testCreate(), testDepthFirstPropagation(), testDigitalSetBoardSnippet(), testDigitalSetBoundary(), testDigitalSetDomain(), testDigitalSetDraw(), testDigitalSetSelector(), testDigitalSurface(), testDigitalSurfaceBoostGraphInterface(), testDigitization(), testDistancePropagation(), testDistanceTransformND(), testDraw(), testDSS4drawing(), testDSS8drawing(), testDTFromSet(), testEmbedder(), testExactMetricBalls(), testExpander(), testFindABel(), testFindABel(), testHashTree(), testHashTree2D(), testImageCopy(), testImageCopyShort(), testImageOnRef(), testImageScan(), testImplicitShape(), testImplicitShape3D(), testInexactMetricBalls(), testIterator(), testIteratorHelper(), testIteratorHelper(), testIteratorHelperImpl(), testITKMethod(), testKanungo2D(), testLayers(), testObject(), testObject3D(), testObjectBorder(), testObjectGraph(), testOrderingDigitalSurfaceFacesAroundVertex(), testProjector(), testRWIssue254(), testScan(), testSetTable(), testSimple(), testSimple2D(), testSimple3D(), testSimple4D(), testSimpleExpander(), testSimplePoints2D(), testSimplePoints3D(), testSimpleRandom2D(), testSimpleRandom3D(), testSurfelAdjacency(), testTrueLocalEstimatorOnShapeDigitization(), testUmbrellaComputer(), testVoronoiCovarianceMeasure(), testVoronoiMap(), testWriteAndRead(), timingsFullConvexity(), timingsFullConvexityFast(), timingsFullConvexityFastNonConvex(), timingsFullConvexityNonConvex(), timingsPConvexity(), and timingsPConvexityNonConvex().