IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Skeleton2d.h
1 // Skeleton2d.h:
3 // -------------
4 //
16 
17 #ifndef __IPSDKGEOMETRY_SKELETON2D_H__
18 #define __IPSDKGEOMETRY_SKELETON2D_H__
19 
20 // suppression warnings
21 // warning C4251: 'ipsdk::geom::Skeleton2d::_vertexColl' : class 'std::vector' needs to have dll-interface to be used by clients of class 'ipsdk::geom::Skeleton2d'
22 #pragma warning (push)
23 #pragma warning (disable : 4251)
24 
25 #include <IPSDKGeometry/Entity/2d/BaseTypedGeometryEntity2d.h>
26 #include <IPSDKGeometry/Entity/2d/Point/Point2dData.h>
27 #include <IPSDKGeometry/Entity/2d/Skeleton/SkeletonVertex2d.h>
29 #include <IPSDKGeometry/Entity/2d/Parabola/Parabola2d.h>
30 
31 namespace ipsdk {
32 namespace geom {
33 
36 
38 {
39  // declare 2d geometry entity
41 
42 // predefined public types
43 public:
45  static const eCoordinateSystem2dType::domain g_coordinateSystem2dType = eCoordinateSystem2dType::eCS2DT_Cartesian;
46 
48  static const eEntity2dType::domain g_entity2dType = eEntity2dType::eE2DT_Skeleton;
49 
50 public:
53  Skeleton2d();
54  ~Skeleton2d();
56 
57 // methods
58 public:
60  inline eCoordinateSystem2dType getCoordinateSystem2dType() const;
61 
63  inline eEntity2dType getEntity2dType() const;
64 
66  ipUInt32 getNbPoints() const;
67 
70  const SkeletonPoint2dColl& getPoint2dColl() const;
71  SkeletonPoint2dColl& getPoint2dColl();
73 
75  ipUInt32 getNbVertices() const;
76 
79  const SkeletonVertex2dColl& getVertex2dColl() const;
80  SkeletonVertex2dColl& getVertex2dColl();
82 
85  const ParabolaColl& getParabolaColl() const;
86  ParabolaColl& getParabolaColl();
88 
92  bool isSegmentParabolic(const ipUInt32 pointIdx0,
93  const ipUInt32 pointIdx1) const;
94 
98  const Parabola2d& getParabola(const ipUInt32 pointIdx0,
99  const ipUInt32 pointIdx1) const;
100 
104  ipReal64 computeEdgeLength(const ipUInt32 pointIdx0,
105  const ipUInt32 pointIdx1) const;
106 
107 // attributes
108 protected:
111 
114 
118 };
119 
122 
125 {
127 }
128 
129 inline eEntity2dType
131 {
132  return g_entity2dType;
133 }
134 
137 
138 } // end of namespace geom
139 } // end of namespace ipsdk
140 
141 #pragma warning (pop)
142 
143 #endif // __IPSDKGEOMETRY_SKELETON2D_H__
Basic operators used for skeleton 2d management.
static const eEntity2dType::domain g_entity2dType
type associated to entity
Definition: Skeleton2d.h:48
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
IPSDKGEOMETRY_API void computeEdgeLength(const Skeleton2d &skeleton, const eSkeletonEdgeCategory &skeletonEdgeCategory, Real64Vector &edgeLengthColl)
fonction allowing to compute full skeleton length
SkeletonVertex2dColl _vertexColl
collection of vertices associated to skeleton
Definition: Skeleton2d.h:113
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
std::vector< SkeletonVertex2d > SkeletonVertex2dColl
collection of skeleton vertex 2d
Definition: Skeleton2dTypes.h:80
eCoordinateSystem2dType
Enumerate describing coordinate system 2d type.
Definition: GeometryEntity2dTypes.h:76
Parabola 2d class.
Definition: Parabola2d.h:47
Polygon skeleton.
Definition: GeometryEntity2dTypes.h:66
ParabolaColl _parabolaColl
Definition: Skeleton2d.h:117
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity2d.h:27
std::vector< SkeletonPoint2d > SkeletonPoint2dColl
collection of points associated to voronoi skeletons
Definition: Skeleton2dTypes.h:77
#define IPSDK_DECLARE_GEOMETRY_ENTITY_2D(libraryName, className)
Macro allowing to declare a geometry entity 2d.
Definition: GeometryEntity2dHdrMacros.h:131
Class allowing to represent a skeleton associated to a polygon with holes.
Definition: Skeleton2d.h:37
eCoordinateSystem2dType getCoordinateSystem2dType() const
method allowing to retrieve coordinate system 2d type
Definition: Skeleton2d.h:124
eEntity2dType
Enumerate describing entity 2d type.
Definition: GeometryEntity2dTypes.h:38
SkeletonPoint2dColl _pointColl
collection of points associated to skeleton
Definition: Skeleton2d.h:110
std::map< PairIdx, Parabola2d > ParabolaColl
map allowing to associate an edge index to a parabola
Definition: Skeleton2dTypes.h:89
static const eCoordinateSystem2dType::domain g_coordinateSystem2dType
coordinate system associated to entity
Definition: Skeleton2d.h:45
Cartesian coordinate system.
Definition: GeometryEntity2dTypes.h:78
eEntity2dType getEntity2dType() const
method allowing to retrieve entity 2d type
Definition: Skeleton2d.h:130
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53