DGtal 1.4.0
Loading...
Searching...
No Matches
PlaneProbingR1Neighborhood.h
1
17#pragma once
18
31#if defined(PlaneProbingR1Neighborhood_RECURSES)
32#error Recursive header files inclusion detected in PlaneProbingR1Neighborhood.h
33#else // defined(PlaneProbingR1Neighborhood_RECURSES)
35#define PlaneProbingR1Neighborhood_RECURSES
36
37#if !defined PlaneProbingR1Neighborhood_h
39#define PlaneProbingR1Neighborhood_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/geometry/helpers/PlaneProbingEstimatorHelper.h"
46#include "DGtal/geometry/surfaces/estimation/PlaneProbingRNeighborhood.h"
47#include "DGtal/kernel/CPointPredicate.h"
49
50namespace DGtal
51{
52
54 // template class PlaneProbingR1Neighborhood
62 template <typename TPredicate>
64 {
66
67 // ----------------------- Public types ------------------------------
68 public:
69 using Predicate = TPredicate;
70 using Point = typename TPredicate::Point;
73 using Integer = typename Point::Coordinate;
75
76 // ----------------------- Standard services ------------------------------
77 public:
82
90 PlaneProbingR1Neighborhood(Predicate const& aPredicate, Point const& aQ, Triangle const& aM);
91
96
102
108
115
122
123 // ----------------------- Plane Probing services ------------------------------
124 public:
125 virtual HexagonState hexagonState () override;
126
127 // ----------------------- Interface --------------------------------------
128 public:
129
134 void selfDisplay ( std::ostream & out ) const;
135
140 bool isValid() const;
141
142 // ------------------------- Protected Datas ------------------------------
143 protected:
144
145 // ------------------------- Private Datas --------------------------------
146 private:
147 mutable std::array<bool, 6> myState;
149 // ------------------------- Hidden services ------------------------------
150 protected:
151
152 // ------------------------- Internals ------------------------------------
153 private:
158
163 std::pair<PointOnProbingRay, PointOnProbingRay> candidateRay (int index) const;
164
170 std::vector<PointOnProbingRay> intersectSphereRay (PointOnProbingRay const& aPoint, PointOnProbingRay const& aRay) const;
171
181 std::vector<PointOnProbingRay> const& aLst) const;
182
188
194
199 PointOnProbingRay closestRayPoint (std::pair<PointOnProbingRay, PointOnProbingRay> const& aRayPoint) const;
200
201 }; // end of class PlaneProbingR1Neighborhood
202
203
210 template <typename TPredicate>
211 std::ostream&
212 operator<< ( std::ostream & out, const PlaneProbingR1Neighborhood<TPredicate> & object );
213
214} // namespace DGtal
215
216
218// Includes inline functions.
219#include "DGtal/geometry/surfaces/estimation/PlaneProbingR1Neighborhood.ih"
220
221// //
223
224#endif // !defined PlaneProbingR1Neighborhood_h
225
226#undef PlaneProbingR1Neighborhood_RECURSES
227#endif // else defined(PlaneProbingR1Neighborhood_RECURSES)
Aim: Represent a way to probe the R-neighborhood, with the R1 optimization, see RLDGCI2019 for detail...
typename PlaneProbingRNeighborhood< TPredicate >::Triangle Triangle
PointOnProbingRay closestRayPoint(std::pair< PointOnProbingRay, PointOnProbingRay > const &aRayPoint) const
void selfDisplay(std::ostream &out) const
virtual HexagonState hexagonState() override
typename PlaneProbingRNeighborhood< TPredicate >::HexagonState HexagonState
PlaneProbingR1Neighborhood(PlaneProbingR1Neighborhood &&other)=delete
BOOST_CONCEPT_ASSERT((concepts::CPointPredicate< TPredicate >))
std::pair< PointOnProbingRay, PointOnProbingRay > candidateRay(int index) const
PointOnProbingRay closestPointOnRayConstant(PointOnProbingRay const &aRay) const
PlaneProbingR1Neighborhood(const PlaneProbingR1Neighborhood &other)=delete
typename PlaneProbingRNeighborhood< TPredicate >::PointOnProbingRay PointOnProbingRay
PointOnProbingRay closestPointOnRayLinear(PointOnProbingRay const &aRay) const
bool isValidIntersectSphereRay(PointOnProbingRay const &aPoint, PointOnProbingRay const &aRay, std::vector< PointOnProbingRay > const &aLst) const
PlaneProbingR1Neighborhood & operator=(const PlaneProbingR1Neighborhood &other)=delete
PlaneProbingR1Neighborhood(Predicate const &aPredicate, Point const &aQ, Triangle const &aM)
std::vector< PointOnProbingRay > intersectSphereRay(PointOnProbingRay const &aPoint, PointOnProbingRay const &aRay) const
Aim: Represent a way to probe the R-neighborhood.
typename PlaneProbingNeighborhood< TPredicate >::PointOnProbingRay PointOnProbingRay
typename PlaneProbingNeighborhood< TPredicate >::HexagonState HexagonState
typename PlaneProbingNeighborhood< TPredicate >::Triangle Triangle
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: Defines a predicate on a point.
const Point aPoint(3, 4)