DGtal 2.0.0
Loading...
Searching...
No Matches
DGtal::CellGeometryFunctions< TKSpace, 1, 2 > Struct Template Reference

#include <DGtal/geometry/volumes/CellGeometry.h>

Inheritance diagram for DGtal::CellGeometryFunctions< TKSpace, 1, 2 >:
[legend]

Public Types

typedef TKSpace KSpace
typedef KSpace::Space Space
typedef KSpace::Cell Cell
typedef KSpace::Point Point

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >))
 BOOST_STATIC_ASSERT (TKSpace::dimension==2)

Static Public Member Functions

template<typename PointelIterator>
static std::unordered_set< typename KSpace::CellgetIncidentCellsToPointels (const KSpace &K, PointelIterator itB, PointelIterator itE)
template<typename PointIterator>
static std::unordered_set< typename KSpace::CellgetIncidentCellsToPoints (const KSpace &K, PointIterator itB, PointIterator itE)
template<typename PointIterator>
static UnorderedSetByBlock< typename KSpace::Point, Splitter< typename KSpace::Point, uint64_t > > getIncidentKPointsToPoints (const KSpace &K, PointIterator itB, PointIterator itE)

Detailed Description

template<typename TKSpace>
struct DGtal::CellGeometryFunctions< TKSpace, 1, 2 >

Specialization for 1-cells in 2D.

Template Parameters
TKSpacean arbitrary model of CCellularGridSpaceND.

Definition at line 538 of file CellGeometry.h.

Member Typedef Documentation

◆ Cell

template<typename TKSpace>
typedef KSpace::Cell DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::Cell

Definition at line 544 of file CellGeometry.h.

◆ KSpace

template<typename TKSpace>
typedef TKSpace DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::KSpace

Definition at line 542 of file CellGeometry.h.

◆ Point

Definition at line 447 of file CellGeometry.h.

◆ Space

template<typename TKSpace>
typedef KSpace::Space DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::Space

Definition at line 543 of file CellGeometry.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TKSpace>
DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::BOOST_CONCEPT_ASSERT ( (concepts::CCellularGridSpaceND< TKSpace >) )

◆ BOOST_STATIC_ASSERT()

template<typename TKSpace>
DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::BOOST_STATIC_ASSERT ( TKSpace::dimension = =2)

◆ getIncidentCellsToPointels()

template<typename TKSpace>
template<typename PointelIterator>
std::unordered_set< typename KSpace::Cell > DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::getIncidentCellsToPointels ( const KSpace & K,
PointelIterator itB,
PointelIterator itE )
inlinestatic
Template Parameters
PointelIteratorany model of forward iterator on pointels.
Parameters
Ka valid cellular grid space large enough to hold the cells.
itBthe start of a range of pointels.
itEpast the end of a range of pointels.
Returns
the incident 1-cells to the given range of pointels [itB, itE).

Definition at line 554 of file CellGeometry.h.

556 {
558 for ( auto it = itB; it != itE; ++it )
559 {
560 auto pointel = *it;
561 cells.insert( K.uIncident( pointel, 0, true ) );
562 cells.insert( K.uIncident( pointel, 0, false ) );
563 cells.insert( K.uIncident( pointel, 1, true ) );
564 cells.insert( K.uIncident( pointel, 1, false ) );
565 }
566 return cells;
567 }

References K.

◆ getIncidentCellsToPoints()

template<typename TKSpace>
template<typename PointIterator>
std::unordered_set< typename KSpace::Cell > DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::getIncidentCellsToPoints ( const KSpace & K,
PointIterator itB,
PointIterator itE )
inlinestatic
Template Parameters
PointIteratorany model of forward iterator on points.
Parameters
Ka valid cellular grid space large enough to hold the cells.
itBthe start of a range of points.
itEpast the end of a range of points.
Returns
the incident 1-cells to the given range of points [itB, itE).

Definition at line 577 of file CellGeometry.h.

579 {
581 for ( auto it = itB; it != itE; ++it )
582 {
583 auto pointel = K.uPointel( *it );
584 cells.insert( K.uIncident( pointel, 0, true ) );
585 cells.insert( K.uIncident( pointel, 0, false ) );
586 cells.insert( K.uIncident( pointel, 1, true ) );
587 cells.insert( K.uIncident( pointel, 1, false ) );
588 }
589 return cells;
590 }

References K.

◆ getIncidentKPointsToPoints()

template<typename TKSpace>
template<typename PointIterator>
UnorderedSetByBlock< typename KSpace::Point, Splitter< typename KSpace::Point, uint64_t > > DGtal::CellGeometryFunctions< TKSpace, 1, 2 >::getIncidentKPointsToPoints ( const KSpace & K,
PointIterator itB,
PointIterator itE )
inlinestatic
Template Parameters
PointIteratorany model of forward iterator on points.
Parameters
Ka valid cellular grid space large enough to hold the cells.
itBthe start of a range of points.
itEpast the end of a range of points.
Returns
the incident 1-kpoints to the given range of points [itB, itE).

Definition at line 601 of file CellGeometry.h.

603 {
606 for ( auto it = itB; it != itE; ++it )
607 {
608 auto kp = K.uKCoords( K.uPointel( *it ) );
609 kpoints.emplace( kp[ 0 ] , kp[ 1 ] - 1 );
610 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] );
611 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] );
612 kpoints.emplace( kp[ 0 ] , kp[ 1 ] + 1 );
613 }
614 return kpoints;
615 }

References K.


The documentation for this struct was generated from the following file: