DGtal 2.1.0
Loading...
Searching...
No Matches
DGtal::CellGeometryFunctions< TKSpace, 3, 3 > Struct Template Reference

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

Public Types

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

Public Member Functions

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

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, 3, 3 >

Specialization for 3-cells in 3D.

Template Parameters
TKSpacean arbitrary model of CCellularGridSpaceND.

Definition at line 922 of file CellGeometry.h.

Member Typedef Documentation

◆ Cell

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

Definition at line 928 of file CellGeometry.h.

◆ KSpace

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

Definition at line 926 of file CellGeometry.h.

◆ Space

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

Definition at line 927 of file CellGeometry.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ BOOST_STATIC_ASSERT()

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

◆ getIncidentCellsToPointels()

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

Definition at line 938 of file CellGeometry.h.

940 {
941 std::unordered_set<typename KSpace::Cell> cells;
942 for ( auto it = itB; it != itE; ++it )
943 {
944 auto pointel = *it;
945 auto linelxp = K.uIncident( pointel, 0, true );
946 auto linelxm = K.uIncident( pointel, 0, false );
947 auto surfxpyp = K.uIncident( linelxp, 1, true );
948 auto surfxpym = K.uIncident( linelxp, 1, false );
949 auto surfxmyp = K.uIncident( linelxm, 1, true );
950 auto surfxmym = K.uIncident( linelxm, 1, false );
951 cells.insert( K.uIncident( surfxpyp, 2, true ) );
952 cells.insert( K.uIncident( surfxpyp, 2, false ) );
953 cells.insert( K.uIncident( surfxpym, 2, true ) );
954 cells.insert( K.uIncident( surfxpym, 2, false ) );
955 cells.insert( K.uIncident( surfxmyp, 2, true ) );
956 cells.insert( K.uIncident( surfxmyp, 2, false ) );
957 cells.insert( K.uIncident( surfxmym, 2, true ) );
958 cells.insert( K.uIncident( surfxmym, 2, false ) );
959 }
960 return cells;
961 }
KSpace K

References K.

◆ getIncidentCellsToPoints()

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

Definition at line 972 of file CellGeometry.h.

974 {
975 std::unordered_set<typename KSpace::Cell> cells;
976 for ( auto it = itB; it != itE; ++it )
977 {
978 auto pointel = K.uPointel( *it );
979 auto linelxp = K.uIncident( pointel, 0, true );
980 auto linelxm = K.uIncident( pointel, 0, false );
981 auto surfxpyp = K.uIncident( linelxp, 1, true );
982 auto surfxpym = K.uIncident( linelxp, 1, false );
983 auto surfxmyp = K.uIncident( linelxm, 1, true );
984 auto surfxmym = K.uIncident( linelxm, 1, false );
985 cells.insert( K.uIncident( surfxpyp, 2, true ) );
986 cells.insert( K.uIncident( surfxpyp, 2, false ) );
987 cells.insert( K.uIncident( surfxpym, 2, true ) );
988 cells.insert( K.uIncident( surfxpym, 2, false ) );
989 cells.insert( K.uIncident( surfxmyp, 2, true ) );
990 cells.insert( K.uIncident( surfxmyp, 2, false ) );
991 cells.insert( K.uIncident( surfxmym, 2, true ) );
992 cells.insert( K.uIncident( surfxmym, 2, false ) );
993 }
994 return cells;
995 }

References K.

◆ getIncidentKPointsToPoints()

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

Definition at line 1006 of file CellGeometry.h.

1008 {
1009 UnorderedSetByBlock< typename KSpace::Point,
1010 Splitter< typename KSpace::Point, uint64_t> > kpoints;
1011 for ( auto it = itB; it != itE; ++it )
1012 {
1013 auto kp = K.uKCoords( K.uPointel( *it ) );
1014 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] - 1, kp[ 2 ] - 1 );
1015 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] - 1, kp[ 2 ] - 1 );
1016 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] + 1, kp[ 2 ] - 1 );
1017 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] + 1, kp[ 2 ] - 1 );
1018 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] - 1, kp[ 2 ] + 1 );
1019 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] - 1, kp[ 2 ] + 1 );
1020 kpoints.emplace( kp[ 0 ] - 1, kp[ 1 ] + 1, kp[ 2 ] + 1 );
1021 kpoints.emplace( kp[ 0 ] + 1, kp[ 1 ] + 1, kp[ 2 ] + 1 );
1022 }
1023 return kpoints;
1024 }
PointVector< dim, Integer > Point

References K.


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