DGtal 1.4.0
|
#include <iostream>
#include <string>
#include <DGtal/base/Common.h>
#include <DGtal/helpers/StdDefs.h>
#include <DGtal/helpers/Shortcuts.h>
#include <DGtal/helpers/ShortcutsGeometry.h>
#include <DGtal/shapes/SurfaceMesh.h>
#include <DGtal/geometry/surfaces/DigitalSurfaceRegularization.h>
#include <DGtal/dec/PolygonalCalculus.h>
#include <DGtal/dec/GeodesicsInHeat.h>
#include <polyscope/polyscope.h>
#include <polyscope/surface_mesh.h>
#include <polyscope/point_cloud.h>
#include "ConfigExamples.h"
#include <Eigen/Dense>
#include <Eigen/Sparse>
Go to the source code of this file.
Typedefs | |
typedef Shortcuts< Z3i::KSpace > | SH3 |
typedef ShortcutsGeometry< Z3i::KSpace > | SHG3 |
typedef SurfaceMesh< RealPoint, RealVector > | SurfMesh |
typedef SurfMesh::Face | Face |
typedef SurfMesh::Vertex | Vertex |
typedef PolygonalCalculus< SH3::RealPoint, SH3::RealVector > | PolyCalculus |
Functions | |
void | precompute () |
std::vector< std::pair< size_t, int > > | source2count (GeodesicsInHeat< PolyCalculus >::Vector &source) |
void | addSource () |
void | clearSources () |
void | computeGeodesics () |
void | myCallback () |
int | main () |
Variables | |
polyscope::SurfaceMesh * | psMesh |
polyscope::SurfaceMesh * | psMeshReg |
SurfMesh | surfmesh |
SurfMesh | surfmeshReg |
float | dt = 2.0 |
CountedPtr< SH3::BinaryImage > | binary_image |
CountedPtr< SH3::DigitalSurface > | surface |
GeodesicsInHeat< PolyCalculus > * | heat |
PolyCalculus * | calculus |
GeodesicsInHeat< PolyCalculus > * | heatReg |
PolyCalculus * | calculusReg |
SHG3::RealVectors | iinormals |
int | sourceVertexId =0 |
float | radiusII = 3.0 |
bool | skipReg = true |
bool | useProjectedCalculus = true |
bool | isPrecomputed =false |
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/.
This file is part of the DGtal library.
Definition in file dgtalCalculus-geodesic.cpp.
typedef SurfMesh::Face Face |
Definition at line 55 of file dgtalCalculus-geodesic.cpp.
Definition at line 57 of file dgtalCalculus-geodesic.cpp.
typedef Shortcuts<Z3i::KSpace> SH3 |
Definition at line 51 of file dgtalCalculus-geodesic.cpp.
typedef ShortcutsGeometry<Z3i::KSpace> SHG3 |
Definition at line 52 of file dgtalCalculus-geodesic.cpp.
typedef SurfaceMesh< RealPoint, RealVector > SurfMesh |
Definition at line 54 of file dgtalCalculus-geodesic.cpp.
typedef SurfMesh::Vertex Vertex |
Definition at line 56 of file dgtalCalculus-geodesic.cpp.
void addSource | ( | ) |
Definition at line 128 of file dgtalCalculus-geodesic.cpp.
References heat, heatReg, DGtal::SurfaceMesh< TRealPoint, TRealVector >::nbVertices(), psMesh, psMeshReg, skipReg, source2count(), and surfmesh.
Referenced by myCallback().
void clearSources | ( | ) |
Definition at line 143 of file dgtalCalculus-geodesic.cpp.
Referenced by myCallback().
void computeGeodesics | ( | ) |
Definition at line 149 of file dgtalCalculus-geodesic.cpp.
References DGtal::GeodesicsInHeat< TPolygonalCalculus >::compute(), heat, heatReg, psMesh, psMeshReg, skipReg, source2count(), and sourceVertexId.
Referenced by myCallback().
int main | ( | void | ) |
Definition at line 213 of file dgtalCalculus-geodesic.cpp.
References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::attachConvolvedTrivialNormalVectors(), binary_image, DGtal::SurfaceMesh< TRealPoint, TRealVector >::computeNonManifoldEdges(), DGtal::Shortcuts< TKSpace >::defaultParameters(), DGtal::ShortcutsGeometry< TKSpace >::defaultParameters(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::DigitalSurfaceRegularization< TDigitalSurface >::getRegularizedPositions(), DGtal::DigitalSurfaceRegularization< TDigitalSurface >::init(), K, DGtal::Shortcuts< TKSpace >::makeBinaryImage(), DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh(), myCallback(), DGtal::ShortcutsGeometry< TKSpace >::parametersGeometryEstimation(), psMesh, psMeshReg, radiusII, DGtal::DigitalSurfaceRegularization< TDigitalSurface >::regularize(), surface, surfmesh, and surfmeshReg.
void myCallback | ( | ) |
Definition at line 168 of file dgtalCalculus-geodesic.cpp.
References addSource(), clearSources(), computeGeodesics(), dt, isPrecomputed, precompute(), radiusII, skipReg, sourceVertexId, and useProjectedCalculus.
Referenced by main().
void precompute | ( | ) |
Definition at line 83 of file dgtalCalculus-geodesic.cpp.
References DGtal::Trace::beginBlock(), binary_image, calculus, calculusReg, DGtal::Shortcuts< TKSpace >::defaultParameters(), DGtal::ShortcutsGeometry< TKSpace >::defaultParameters(), dt, DGtal::Trace::endBlock(), DGtal::ShortcutsGeometry< TKSpace >::getIINormalVectors(), DGtal::Shortcuts< TKSpace >::getSurfelRange(), heat, heatReg, iinormals, DGtal::Trace::info(), DGtal::ShortcutsGeometry< TKSpace >::parametersGeometryEstimation(), psMesh, radiusII, DGtal::PolygonalCalculus< TRealPoint, TRealVector >::setEmbedder(), skipReg, surface, surfmesh, surfmeshReg, DGtal::trace, and useProjectedCalculus.
Referenced by myCallback().
std::vector< std::pair< size_t, int > > source2count | ( | GeodesicsInHeat< PolyCalculus >::Vector & | source | ) |
Definition at line 117 of file dgtalCalculus-geodesic.cpp.
Referenced by addSource(), and computeGeodesics().
CountedPtr<SH3::BinaryImage> binary_image |
Definition at line 65 of file dgtalCalculus-geodesic.cpp.
Referenced by getSlice(), main(), main(), main(), precompute(), SCENARIO(), SCENARIO(), TEST_CASE(), and TEST_CASE().
PolyCalculus* calculus |
Definition at line 70 of file dgtalCalculus-geodesic.cpp.
Referenced by DGtal::dec_helper::averageOperator01(), DGtal::dec_helper::averageOperator20(), computeLaplace(), DGtal::ShortcutsGeometry< TKSpace >::getATScalarFieldApproximation(), DGtal::ShortcutsGeometry< TKSpace >::getATScalarFieldApproximation(), DGtal::ShortcutsGeometry< TKSpace >::getATVectorFieldApproximation(), DGtal::ShortcutsGeometry< TKSpace >::getATVectorFieldApproximation(), initQuantities(), initQuantitiesCached(), laplace_sphere(), main(), precompute(), DerivativeTester< Calculus, order >::test(), HodgeTester< Calculus, order >::test(), HodgeTester< Calculus, -1 >::test(), TEST_CASE(), test_linear_ring(), test_linear_structure(), and test_manual_operators_3d().
PolyCalculus* calculusReg |
Definition at line 73 of file dgtalCalculus-geodesic.cpp.
Referenced by precompute().
float dt = 2.0 |
Definition at line 63 of file dgtalCalculus-geodesic.cpp.
Referenced by DGtal::functions::generateSimplicityTable(), DGtal::GeodesicsInHeat< TPolygonalCalculus >::init(), DGtal::VectorsInHeat< TPolygonalCalculus >::init(), main(), main(), myCallback(), Object3D(), precompute(), DGtal::DigitalSurfaceRegularization< TDigitalSurface >::regularize(), TEST_CASE_METHOD(), testComparison(), testDigitalTopologyZ2(), testDistanceTransformation(), testDistanceTransformation3D(), testDistanceTransformationBorder(), testDistanceTransformationNeg(), testDistanceTransformND(), testDTFromSet(), testExactMetricBalls(), testInexactMetricBalls(), testReverseDT(), testReverseDTL1(), and testVoronoiMapFromSites().
GeodesicsInHeat<PolyCalculus>* heat |
Definition at line 69 of file dgtalCalculus-geodesic.cpp.
Referenced by addSource(), clearSources(), computeGeodesics(), precompute(), TEST_CASE(), and TEST_CASE().
GeodesicsInHeat<PolyCalculus>* heatReg |
Definition at line 72 of file dgtalCalculus-geodesic.cpp.
Referenced by addSource(), computeGeodesics(), and precompute().
SHG3::RealVectors iinormals |
Definition at line 75 of file dgtalCalculus-geodesic.cpp.
Referenced by precompute().
bool isPrecomputed =false |
Definition at line 167 of file dgtalCalculus-geodesic.cpp.
Referenced by myCallback().
polyscope::SurfaceMesh* psMesh |
Definition at line 59 of file dgtalCalculus-geodesic.cpp.
Referenced by addSource(), clearSources(), computeGeodesics(), main(), and precompute().
polyscope::SurfaceMesh* psMeshReg |
Definition at line 60 of file dgtalCalculus-geodesic.cpp.
Referenced by addSource(), computeGeodesics(), and main().
float radiusII = 3.0 |
Definition at line 78 of file dgtalCalculus-geodesic.cpp.
Referenced by main(), myCallback(), and precompute().
bool skipReg = true |
Definition at line 80 of file dgtalCalculus-geodesic.cpp.
Referenced by addSource(), computeGeodesics(), myCallback(), and precompute().
int sourceVertexId =0 |
Definition at line 77 of file dgtalCalculus-geodesic.cpp.
Referenced by computeGeodesics(), and myCallback().
CountedPtr<SH3::DigitalSurface> surface |
Definition at line 66 of file dgtalCalculus-geodesic.cpp.
Referenced by DGtal::ShortcutsGeometry< TKSpace >::getATScalarFieldApproximation(), DGtal::ShortcutsGeometry< TKSpace >::getATScalarFieldApproximation(), DGtal::ShortcutsGeometry< TKSpace >::getATVectorFieldApproximation(), DGtal::ShortcutsGeometry< TKSpace >::getATVectorFieldApproximation(), DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::getCellRange(), DGtal::Shortcuts< TKSpace >::getCellRange(), DGtal::ShortcutsGeometry< TKSpace >::getCTrivialNormalVectors(), DGtal::Shortcuts< TKSpace >::getIdxSurfelRange(), DGtal::Shortcuts< TKSpace >::getIdxSurfelRange(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), getSlice(), DGtal::Shortcuts< TKSpace >::getSurfelRange(), DGtal::Shortcuts< TKSpace >::getSurfelRange(), DGtal::ShortcutsGeometry< TKSpace >::getVCMNormalVectors(), main(), main(), main(), main(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::makeShroudsRegularization(), DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputPrimalDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputPrimalDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputPrimalIdxDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputPrimalIdxDigitalSurfaceAsObj(), precompute(), DGtal::Shortcuts< TKSpace >::refKSpace(), DGtal::Shortcuts< TKSpace >::refKSpace(), LibBoard::Board::saveCairo(), SCENARIO(), SCENARIO(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), testCube(), testFitting(), and testLocalEstimatorFromFunctorAdapter().
SurfMesh surfmesh |
Definition at line 61 of file dgtalCalculus-geodesic.cpp.
Referenced by addSource(), main(), and precompute().
SurfMesh surfmeshReg |
Definition at line 62 of file dgtalCalculus-geodesic.cpp.
Referenced by main(), and precompute().
bool useProjectedCalculus = true |
Definition at line 81 of file dgtalCalculus-geodesic.cpp.
Referenced by myCallback(), and precompute().