IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MinEnclosingCircleTransform2d.h
1 // MinEnclosingCircleTransform2d.h:
3 // --------------------------------
4 //
15 
16 #ifndef __IPSDKGEOMETRY_MINENCLOSINGCIRCLETRANSFORM2D_H__
17 #define __IPSDKGEOMETRY_MINENCLOSINGCIRCLETRANSFORM2D_H__
18 
19 #include <IPSDKGeometry/Transform/2d/BaseGeometryTransform2d.h>
20 
21 namespace ipsdk {
22 namespace geom {
23 
26 
28 {
29  // declare geometry transform 2d
31 
32 // predefined public types
33 public:
35  static const eTransform2dType::domain g_transform2dType = eTransform2dType::eT2DT_MinEnclosingCircle;
36 
39 
41  typedef boost::shared_ptr<CircleType> CirclePtr;
42 
43 public:
49 
50 // methods
51 public:
53  eTransform2dType getTransform2dType() const;
54 
57  static Circle2d<ipReal64> minEnclosingCircle(const BaseGeometryEntity2d& entity);
58 
59 protected:
62  template <typename T>
63  GeometryEntity2dPtr process(const Point2d<T>& entity) const;
64  template <typename T>
65  GeometryEntity2dPtr process(const BoundingBox2d<T>& entity) const;
66  template <typename T>
67  GeometryEntity2dPtr process(const PointCloud2d<T>& entity) const;
68  template <typename T>
69  GeometryEntity2dPtr process(const Polygon2d<T>& entity) const;
70  template <typename T>
71  GeometryEntity2dPtr process(const PolygonWithHoles2d<T>& entity) const;
72  GeometryEntity2dPtr process(const Shape2d& entity) const;
73  template <typename T>
74  GeometryEntity2dPtr process(const Circle2d<T>& entity) const;
75  template <typename T>
76  GeometryEntity2dPtr process(const Ellipse2d<T>& entity) const;
77  template <typename T>
78  GeometryEntity2dPtr process(const Square2d<T>& entity) const;
79  template <typename T>
80  GeometryEntity2dPtr process(const Rectangle2d<T>& entity) const;
81  template <typename T>
82  GeometryEntity2dPtr process(const Segment2d<T>& entity) const;
84 
85 // attributes
86 protected:
87 
88 };
89 
92 
93 inline eTransform2dType
95 {
96  return g_transform2dType;
97 }
98 
101 
102 } // end of namespace geom
103 } // end of namespace ipsdk
104 
105 #endif // __IPSDKGEOMETRY_MINENCLOSINGCIRCLETRANSFORM2D_H__
2d ellipse class associated to cartesian 2d coordinates. For a non rotated ellipse, the major axis follows the x axis and the minor axis follows the y axis.
Definition: Ellipse2d.h:40
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
static const eTransform2dType::domain g_transform2dType
geometry transformation type
Definition: MinEnclosingCircleTransform2d.h:35
minimum enclosing circle computation
Definition: GeometryTransform2dTypes.h:57
Point class associated to cartesian 2d coordinates.
Definition: GeometryEntity2dTypes.h:28
#define IPSDK_DECLARE_GEOMETRY_TRANSFORM_2D(libraryName, className)
Macro allowing to declare a geometry transform 2d.
Definition: GeometryTransform2dHdrMacros.h:26
Circle2d< ipReal64 > CircleType
output circle type
Definition: MinEnclosingCircleTransform2d.h:38
Closed polygon potentially associated to interior polygonal holes.
Definition: PolygonWithHoles2d.h:40
eTransform2dType getTransform2dType() const
method allowing to retrieve entity 2d transformation type
Definition: MinEnclosingCircleTransform2d.h:94
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Unordered collection of 2d points.
Definition: PointCloud2d.h:35
2d segment associated to two points
Definition: Segment2d.h:38
boost::shared_ptr< BaseGeometryEntity2d > GeometryEntity2dPtr
shared pointer to BaseGeometryEntity2d
Definition: GeometryEntity2dTypes.h:88
Closed polygon associated to an ordered collection of 2d points.
Definition: Polygon2d.h:38
2d rectangle class associated to cartesian 2d coordinates
Definition: Rectangle2d.h:35
2d circle associated to cartesian 2d coordinates
Definition: Circle2d.h:36
Base class for 2d geometry entities.
Definition: BaseGeometryEntity2d.h:34
boost::shared_ptr< CircleType > CirclePtr
shared pointer to output circle type
Definition: MinEnclosingCircleTransform2d.h:41
Base class for geometry 2d transformations.
Definition: BaseGeometryTransform2d.h:34
2d square class associated to cartesian 2d coordinates
Definition: Square2d.h:35
Shape 2d associated to one or more closed polygon 2d.
Definition: Shape2d.h:35
Rectangular 2d bounding box class associated to cartesian 2d coordinates.
Definition: BoundingBox2d.h:37
Algorithm allowing to compute minimum enclosing circle of a 2d geometry entity.
Definition: MinEnclosingCircleTransform2d.h:27
eTransform2dType
Enumerate describing geometry 2d transform type.
Definition: GeometryTransform2dTypes.h:33