File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::CellGeometryFunctions< TKSpace, 2, 3 > Struct Template Reference

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

Inheritance diagram for DGtal::CellGeometryFunctions< TKSpace, 2, 3 >:
[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, 2, 3 >

Specialization for 2-cells in 3D.

Template Parameters
TKSpacean arbitrary model of CCellularGridSpaceND.

Definition at line 792 of file CellGeometry.h.

Member Typedef Documentation

◆ Cell

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

Definition at line 798 of file CellGeometry.h.

◆ KSpace

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

Definition at line 796 of file CellGeometry.h.

◆ Point

Definition at line 435 of file CellGeometry.h.

◆ Space

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

Definition at line 797 of file CellGeometry.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ BOOST_STATIC_ASSERT()

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

◆ getIncidentCellsToPointels()

template<typename TKSpace>
template<typename PointelIterator>
std::unordered_set< typename KSpace::Cell > DGtal::CellGeometryFunctions< TKSpace, 2, 3 >::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 2-cells to the given range of pointels [itB, itE).

Definition at line 808 of file CellGeometry.h.

810 {
812 for ( auto it = itB; it != itE; ++it )
813 {
814 auto pointel = *it;
815 auto linelxp = K.uIncident( pointel, 0, true );
816 auto linelxm = K.uIncident( pointel, 0, false );
817 auto linelyp = K.uIncident( pointel, 1, true );
818 auto linelym = K.uIncident( pointel, 1, false );
819 cells.insert( K.uIncident( linelxp, 1, true ) );
820 cells.insert( K.uIncident( linelxp, 1, false ) );
821 cells.insert( K.uIncident( linelxp, 2, true ) );
822 cells.insert( K.uIncident( linelxp, 2, false ) );
823 cells.insert( K.uIncident( linelxm, 1, true ) );
824 cells.insert( K.uIncident( linelxm, 1, false ) );
825 cells.insert( K.uIncident( linelxm, 2, true ) );
826 cells.insert( K.uIncident( linelxm, 2, false ) );
827 cells.insert( K.uIncident( linelyp, 2, true ) );
828 cells.insert( K.uIncident( linelyp, 2, false ) );
829 cells.insert( K.uIncident( linelym, 2, true ) );
830 cells.insert( K.uIncident( linelym, 2, false ) );
831 }
832 return cells;
833 }

References K.

◆ getIncidentCellsToPoints()

template<typename TKSpace>
template<typename PointIterator>
std::unordered_set< typename KSpace::Cell > DGtal::CellGeometryFunctions< TKSpace, 2, 3 >::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 2-cells to the given range of points [itB, itE).
Note
General method. Note as efficient as specializations.

Definition at line 844 of file CellGeometry.h.

846 {
847 std::cout << "<2,3> specialization" << std::endl;
849 for ( auto it = itB; it != itE; ++it )
850 {
851 auto pointel = K.uPointel( *it );
852 auto linelxp = K.uIncident( pointel, 0, true );
853 auto linelxm = K.uIncident( pointel, 0, false );
854 auto linelyp = K.uIncident( pointel, 1, true );
855 auto linelym = K.uIncident( pointel, 1, false );
856 cells.insert( K.uIncident( linelxp, 1, true ) );
857 cells.insert( K.uIncident( linelxp, 1, false ) );
858 cells.insert( K.uIncident( linelxp, 2, true ) );
859 cells.insert( K.uIncident( linelxp, 2, false ) );
860 cells.insert( K.uIncident( linelxm, 1, true ) );
861 cells.insert( K.uIncident( linelxm, 1, false ) );
862 cells.insert( K.uIncident( linelxm, 2, true ) );
863 cells.insert( K.uIncident( linelxm, 2, false ) );
864 cells.insert( K.uIncident( linelyp, 2, true ) );
865 cells.insert( K.uIncident( linelyp, 2, false ) );
866 cells.insert( K.uIncident( linelym, 2, true ) );
867 cells.insert( K.uIncident( linelym, 2, false ) );
868 }
869 return cells;
870 }

References K.

◆ getIncidentKPointsToPoints()

template<typename TKSpace>
template<typename PointIterator>
UnorderedSetByBlock< typename KSpace::Point, Splitter< typename KSpace::Point, uint64_t > > DGtal::CellGeometryFunctions< TKSpace, 2, 3 >::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 2-kpoints to the given range of points [itB, itE).

Definition at line 881 of file CellGeometry.h.

883 {
886 for ( auto it = itB; it != itE; ++it )
887 {
888 auto kp = K.uKCoords( K.uPointel( *it ) );
889 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] - 1, kp[ 2 ] );
890 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] - 1, kp[ 2 ] );
891 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] + 1, kp[ 2 ] );
892 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] + 1, kp[ 2 ] );
893 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] , kp[ 2 ] - 1 );
894 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] , kp[ 2 ] - 1 );
895 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] , kp[ 2 ] + 1 );
896 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] , kp[ 2 ] + 1 );
897 kpoints.emplace( kp[ 0 ] , kp[ 1 ] - 1, kp[ 2 ] - 1 );
898 kpoints.emplace( kp[ 0 ] , kp[ 1 ] + 1, kp[ 2 ] - 1 );
899 kpoints.emplace( kp[ 0 ] , kp[ 1 ] - 1, kp[ 2 ] + 1 );
900 kpoints.emplace( kp[ 0 ] , kp[ 1 ] + 1, kp[ 2 ] + 1 );
901 }
902 return kpoints;
903 }

References K.


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