IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
AreaMsr2d.h
1 // AreaMsr2d.h:
3 // ------------
4 //
18 
19 #ifndef __IPSDKGEOMETRY_AREAMSR2D_H__
20 #define __IPSDKGEOMETRY_AREAMSR2D_H__
21 
22 #include <IPSDKGeometry/Measure/2d/BaseTypedGeometryMeasure2d.h>
23 
24 namespace ipsdk {
25 namespace geom {
26 
29 
31 {
32  // declare geometry measure 2d
34 
35 // predefined public types
36 public:
39 
41  static const eMeasure2dType::domain g_measure2dType = eMeasure2dType::eM2DT_Area;
42 
43 public:
46  AreaMsr2d();
47  ~AreaMsr2d();
49 
50 // methods
51 public:
53  eMeasure2dType getMeasure2dType() const;
54 
55 protected:
58  template <typename T>
59  bool process(const Point2d<T>& entity, ipReal64& result) const;
60  bool process(const Vector2d& entity, ipReal64& result) const;
61  template <typename T>
62  bool process(const BoundingBox2d<T>& entity, ipReal64& result) const;
63  template <typename T>
64  bool process(const Polygon2d<T>& entity, ipReal64& result) const;
65  template <typename T>
66  bool process(const PolygonWithHoles2d<T>& entity, ipReal64& result) const;
67  bool process(const Shape2d& entity, ipReal64& result) const;
68  template <typename T>
69  bool process(const Circle2d<T>& entity, ipReal64& result) const;
70  template <typename T>
71  bool process(const Ellipse2d<T>& entity, ipReal64& result) const;
72  template <typename T>
73  bool process(const Square2d<T>& entity, ipReal64& result) const;
74  template <typename T>
75  bool process(const Rectangle2d<T>& entity, ipReal64& result) const;
77 
78 // attributes
79 protected:
80 
81 };
82 
85 
86 inline eMeasure2dType
88 {
89  return g_measure2dType;
90 }
91 
94 
95 } // end of namespace geom
96 } // end of namespace ipsdk
97 
98 #endif // __IPSDKGEOMETRY_AREAMSR2D_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
Point class associated to cartesian 2d coordinates.
Definition: GeometryEntity2dTypes.h:28
Area measurement algorithm applied to a 2d geometry entity.
Definition: AreaMsr2d.h:30
eMeasure2dType getMeasure2dType() const
method allowing to retrieve entity 2d measure type
Definition: AreaMsr2d.h:87
#define IPSDK_DECLARE_GEOMETRY_MEASURE_2D(libraryName, className)
Macro allowing to declare a geometry measure 2d.
Definition: GeometryMeasure2dHdrMacros.h:26
eMeasure2dType
Enumerate describing geometry 2d measure type.
Definition: GeometryMeasure2dTypes.h:33
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Closed polygon potentially associated to interior polygonal holes.
Definition: PolygonWithHoles2d.h:40
static const eMeasure2dType::domain g_measure2dType
geometry entity measurement type
Definition: AreaMsr2d.h:41
Base class for typed geometry measures 2d.
Definition: BaseTypedGeometryMeasure2d.h:27
BaseTypedGeometryMeasure2d< ipReal64 >::DataType DataType
Output data type associated to measure.
Definition: AreaMsr2d.h:38
Area.
Definition: GeometryMeasure2dTypes.h:37
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Closed polygon associated to an ordered collection of 2d points.
Definition: Polygon2d.h:38
Vector class associated to polar 2d coordinates.
Definition: Vector2d.h:32
2d rectangle class associated to cartesian 2d coordinates
Definition: Rectangle2d.h:35
2d circle associated to cartesian 2d coordinates
Definition: Circle2d.h:36
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