DGtal
1.5.beta
|
Aim: stores an arbitrary measure on a SurfaceMesh object. The measure can be spread onto its vertices, edges, or faces. This class is notably used by CorrectedNormalCurrentComputer and NormalCycleComputer to store the curvature measures, which may be located on different cells. The measure can be scalar or any other summable type (see template parameter TValue). More...
#include <DGtal/geometry/meshes/SurfaceMeshMeasure.h>
Public Types | |
typedef TRealPoint | RealPoint |
typedef TRealVector | RealVector |
typedef TValue | Value |
typedef SurfaceMeshMeasure< RealPoint, RealVector, Value > | Self |
typedef DGtal::SurfaceMesh< RealPoint, RealVector > | SurfaceMesh |
typedef SurfaceMesh::Index | Index |
typedef SurfaceMesh::Size | Size |
typedef SurfaceMesh::Vertex | Vertex |
typedef SurfaceMesh::Edge | Edge |
typedef SurfaceMesh::Face | Face |
typedef std::vector< Value > | Values |
typedef RealVector::Component | Scalar |
typedef std::pair< Face, Scalar > | WeightedFace |
typedef std::pair< Edge, Scalar > | WeightedEdge |
typedef std::pair< Vertex, Scalar > | WeightedVertex |
typedef std::vector< Vertex > | Vertices |
The type that defines a range of vertices. More... | |
typedef std::vector< Edge > | Edges |
The type that defines a range of edges. More... | |
typedef std::vector< Face > | Faces |
The type that defines a range of faces. More... | |
typedef std::vector< WeightedVertex > | WeightedVertices |
typedef std::vector< WeightedEdge > | WeightedEdges |
typedef std::vector< WeightedFace > | WeightedFaces |
Public Member Functions | |
Standard services (construction, initialization, assignment) | |
SurfaceMeshMeasure (ConstAlias< SurfaceMesh > aMesh=nullptr, Value zero_value=Value()) | |
const SurfaceMesh * | meshPtr () const |
const Values & | kMeasures (Dimension dim) const |
Values & | kMeasures (Dimension dim) |
Measure services | |
Value | measure () const |
Value | measure (const RealPoint &x, Scalar r, Face f) const |
Value | vertexMeasure (Vertex v) const |
Value | vertexMeasure (const Vertices &vertices) const |
Value | vertexMeasure (const WeightedVertices &wvertices) const |
Value | edgeMeasure (Edge e) const |
Value | edgeMeasure (const Edges &edges) const |
Value | edgeMeasure (const WeightedEdges &wedges) const |
Value | faceMeasure (Face f) const |
Value | faceMeasure (const Faces &faces) const |
Value | faceMeasure (const WeightedFaces &wfaces) const |
Data Fields | |
Values | vertex_measures |
Stores the scalar curvature measure per indexed vertex element. More... | |
Values | edge_measures |
Stores the scalar curvature measure per indexed edge element. More... | |
Values | face_measures |
Stores the scalar curvature measure per indexed face element. More... | |
Static Public Attributes | |
static const Dimension | dimension = RealPoint::dimension |
Protected Attributes | |
const SurfaceMesh * | myMeshPtr |
A pointer to the mesh over which computations are done. More... | |
Value | myZero |
Zero value for the given type. More... | |
Aim: stores an arbitrary measure on a SurfaceMesh object. The measure can be spread onto its vertices, edges, or faces. This class is notably used by CorrectedNormalCurrentComputer and NormalCycleComputer to store the curvature measures, which may be located on different cells. The measure can be scalar or any other summable type (see template parameter TValue).
Description of template class 'SurfaceMeshMeasure'
The common workflow to use this object is to access its public array data with a call to SurfaceMeshMeasure::kMeasures, then resize it and fill in its values. Of course, the indices used to number cells in the SurfaceMesh are the same as the indices used to store the measure associated to cells.
Afterwards, you can access the global measure of a set of cells specified by their indices through convenient methods like SurfaceMeshMeasure::vertexMeasure, SurfaceMeshMeasure::edgeMeasure, SurfaceMeshMeasure::faceMeasure, with potential weights.
TRealPoint | an arbitrary model of RealPoint. |
TRealVector | an arbitrary model of RealVector. |
TValue | an arbitrary model of CCommutativeRing |
Definition at line 82 of file SurfaceMeshMeasure.h.
typedef SurfaceMesh::Edge DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Edge |
Definition at line 99 of file SurfaceMeshMeasure.h.
typedef std::vector< Edge > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Edges |
The type that defines a range of edges.
Definition at line 109 of file SurfaceMeshMeasure.h.
typedef SurfaceMesh::Face DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Face |
Definition at line 100 of file SurfaceMeshMeasure.h.
typedef std::vector< Face > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Faces |
The type that defines a range of faces.
Definition at line 111 of file SurfaceMeshMeasure.h.
typedef SurfaceMesh::Index DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Index |
Definition at line 96 of file SurfaceMeshMeasure.h.
typedef TRealPoint DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::RealPoint |
Definition at line 87 of file SurfaceMeshMeasure.h.
typedef TRealVector DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::RealVector |
Definition at line 88 of file SurfaceMeshMeasure.h.
typedef RealVector::Component DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Scalar |
Definition at line 102 of file SurfaceMeshMeasure.h.
typedef SurfaceMeshMeasure< RealPoint, RealVector, Value > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Self |
Definition at line 90 of file SurfaceMeshMeasure.h.
typedef SurfaceMesh::Size DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Size |
Definition at line 97 of file SurfaceMeshMeasure.h.
typedef DGtal::SurfaceMesh< RealPoint, RealVector > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::SurfaceMesh |
Definition at line 95 of file SurfaceMeshMeasure.h.
typedef TValue DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Value |
Definition at line 89 of file SurfaceMeshMeasure.h.
typedef std::vector< Value > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Values |
Definition at line 101 of file SurfaceMeshMeasure.h.
typedef SurfaceMesh::Vertex DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Vertex |
Definition at line 98 of file SurfaceMeshMeasure.h.
typedef std::vector< Vertex > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::Vertices |
The type that defines a range of vertices.
Definition at line 107 of file SurfaceMeshMeasure.h.
typedef std::pair< Edge, Scalar > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::WeightedEdge |
Definition at line 104 of file SurfaceMeshMeasure.h.
typedef std::vector< WeightedEdge > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::WeightedEdges |
Definition at line 113 of file SurfaceMeshMeasure.h.
typedef std::pair< Face, Scalar > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::WeightedFace |
Definition at line 103 of file SurfaceMeshMeasure.h.
typedef std::vector< WeightedFace > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::WeightedFaces |
Definition at line 114 of file SurfaceMeshMeasure.h.
typedef std::pair< Vertex, Scalar > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::WeightedVertex |
Definition at line 105 of file SurfaceMeshMeasure.h.
typedef std::vector< WeightedVertex > DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::WeightedVertices |
Definition at line 112 of file SurfaceMeshMeasure.h.
|
inline |
Constructor from mesh.
aMesh | any simplified mesh that is referenced in this object. |
zero_value | the value 0 for the specified type TValue. |
Definition at line 125 of file SurfaceMeshMeasure.h.
|
inline |
edges | any range of (valid) edge indices. |
Definition at line 231 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myZero.
|
inline |
wedges | any range of weighted (valid) edge indices. |
Definition at line 241 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myZero.
|
inline |
e | any edge index. |
Definition at line 224 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure().
|
inline |
faces | any range of (valid) face indices. |
Definition at line 258 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::face_measures, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myZero.
|
inline |
wfaces | any range of weighted (valid) face indices. |
Definition at line 268 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::face_measures, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myZero.
|
inline |
f | any face index. |
Definition at line 251 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::face_measures.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure().
|
inline |
dim | the dimension of the cells where the measures are defined, among 0: vertex, 1: edges, 2: faces. |
dim
-measures. Definition at line 147 of file SurfaceMeshMeasure.h.
References dim(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures, DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::face_measures, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures.
|
inline |
dim | the dimension of the cells where the measures are defined, among 0: vertex, 1: edges, 2: faces. |
dim
-measures. Definition at line 139 of file SurfaceMeshMeasure.h.
References dim(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures, DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::face_measures, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures.
|
inline |
Definition at line 161 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures, DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::face_measures, DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myZero, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures.
|
inline |
Computes the total measure on the ball of center x and radius r. The center x must lie on or close to the face f (as a hint to compute cells in the given ball).
x | the position where the ball is centered. |
r | the radius of the ball. |
f | the face where center point x lies. |
Definition at line 176 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMesh< TRealPoint, TRealVector >::computeCellsInclusionsInBall(), DGtal::SurfaceMesh< TRealPoint, TRealVector >::computeFacesInclusionsInBall(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures, DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edgeMeasure(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::faceMeasure(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myMeshPtr, DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertexMeasure().
|
inline |
Definition at line 131 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myMeshPtr.
|
inline |
vertices | any range of (valid) vertex indices. |
Definition at line 204 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myZero, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures.
|
inline |
wvertices | any range of weighted (valid) vertex indices. |
Definition at line 214 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::myZero, and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures.
|
inline |
v | any vertex index. |
Definition at line 197 of file SurfaceMeshMeasure.h.
References DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure().
|
static |
Definition at line 115 of file SurfaceMeshMeasure.h.
Values DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edge_measures |
Stores the scalar curvature measure per indexed edge element.
Definition at line 283 of file SurfaceMeshMeasure.h.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edgeMeasure(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::kMeasures(), and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure().
Values DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::face_measures |
Stores the scalar curvature measure per indexed face element.
Definition at line 285 of file SurfaceMeshMeasure.h.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::faceMeasure(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::kMeasures(), and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure().
|
protected |
A pointer to the mesh over which computations are done.
Definition at line 290 of file SurfaceMeshMeasure.h.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure(), and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::meshPtr().
|
protected |
Zero value for the given type.
Definition at line 292 of file SurfaceMeshMeasure.h.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::edgeMeasure(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::faceMeasure(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure(), and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertexMeasure().
Values DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertex_measures |
Stores the scalar curvature measure per indexed vertex element.
Definition at line 281 of file SurfaceMeshMeasure.h.
Referenced by DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::kMeasures(), DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::measure(), and DGtal::SurfaceMeshMeasure< TRealPoint, TRealVector, TValue >::vertexMeasure().