IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BoostPolygon2dAdapter.h
Go to the documentation of this file.
1 // BoostPolygon2dAdapter.h:
3 // ------------------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_BOOSTPOLYGON2DADAPTER_H__
16 #define __IPSDKGEOMETRY_BOOSTPOLYGON2DADAPTER_H__
17 
19 #include <IPSDKGeometry/Entity/2d/Polygon/Polygon2d.h>
20 #include <boost/geometry/core/tag.hpp>
21 #include <boost/geometry/core/access.hpp>
22 #include <boost/geometry/core/cs.hpp>
23 #include <boost/geometry/core/coordinate_dimension.hpp>
24 #include <boost/geometry/core/coordinate_system.hpp>
25 #include <boost/geometry/core/coordinate_type.hpp>
26 #include <boost/geometry/core/point_order.hpp>
27 #include <boost/geometry/geometries/register/ring.hpp>
28 #include <vector>
29 
32 
33 namespace ipsdk {
34  namespace geom {
35 
36  template <typename T>
38  template <typename T>
40  }
41 }
42 namespace boost {
43  namespace geometry {
44  namespace traits {
45 
46  template<typename T>
47  struct point_order<ipsdk::geom::BoostDirectPolygon2d<T> >
48  {
49  static const order_selector value = counterclockwise;
50  };
51 
52  template<typename T>
53  struct point_order<ipsdk::geom::BoostReversePolygon2d<T> >
54  {
55  static const order_selector value = clockwise;
56  };
57  }
58  }
59 }
60 
61 namespace ipsdk {
62  namespace geom {
63  template <typename T>
64  struct BoostDirectPolygon2d : public std::vector<ipsdk::geom::Point2dData<T> >
65  {
66  };
67 
68  template <typename T>
69  struct BoostReversePolygon2d : public std::vector<ipsdk::geom::Point2dData<T> >
70  {
71  };
72  }
73 }
74 
75 // registration of polygon 2d models
76 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostDirectPolygon2d<ipsdk::ipInt32>);
77 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostDirectPolygon2d<ipsdk::ipUInt32>);
78 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostDirectPolygon2d<ipsdk::ipReal32>);
79 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostDirectPolygon2d<ipsdk::ipReal64>);
80 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostReversePolygon2d<ipsdk::ipInt32>);
81 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostReversePolygon2d<ipsdk::ipUInt32>);
82 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostReversePolygon2d<ipsdk::ipReal32>);
83 BOOST_GEOMETRY_REGISTER_RING(ipsdk::geom::BoostReversePolygon2d<ipsdk::ipReal64>);
84 
87 
88 #endif // __IPSDKGEOMETRY_BOOSTPOLYGON2DADAPTER_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: BoostPolygon2dAdapter.h:37
Definition: DataItemNodeHdrMacrosDetails.h:48
IPSDKIMAGE_API ImageGeometryPtr geometry(const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const VolumeGeometry &volumeGeometry, const ColorGeometry &colorGeometry, const TemporalGeometry &temporalGeometry)
create an image geometry
Definition: BoostPolygon2dAdapter.h:39
Points 2d adapters for boost geometry library.