IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
EnvelopeTransform2d.h
1 // EnvelopeTransform2d.h:
3 // ----------------------
4 //
17 
18 #ifndef __IPSDKGEOMETRY_ENVELOPETRANSFORM2D_H__
19 #define __IPSDKGEOMETRY_ENVELOPETRANSFORM2D_H__
20 
21 #include <IPSDKGeometry/Transform/2d/BaseGeometryTransform2d.h>
22 
23 namespace ipsdk {
24 namespace geom {
25 
26 template <typename T>
27 class BaseTypedGeometryEntity2d;
28 
31 
33 {
34  // declare geometry transform 2d
36 
37 // predefined public types
38 public:
40  static const eTransform2dType::domain g_transform2dType = eTransform2dType::eT2DT_Envelope;
41 
42 public:
48 
49 // methods
50 public:
52  eTransform2dType getTransform2dType() const;
53 
56  template <typename T>
57  static BoundingBox2d<T> envelope(const BaseTypedGeometryEntity2d<T>& entity);
58 
59 protected:
62  template <typename T>
63  GeometryEntity2dPtr process(const Point2d<T>& entity) const;
64  GeometryEntity2dPtr process(const Vector2d& entity) const;
65  template <typename T>
66  GeometryEntity2dPtr process(const BoundingBox2d<T>& entity) const;
67  template <typename T>
68  GeometryEntity2dPtr process(const PointCloud2d<T>& entity) const;
69  template <typename T>
70  GeometryEntity2dPtr process(const Polygon2d<T>& entity) const;
71  template <typename T>
72  GeometryEntity2dPtr process(const PolygonWithHoles2d<T>& entity) const;
73  GeometryEntity2dPtr process(const Shape2d& entity) const;
74  template <typename T>
75  GeometryEntity2dPtr process(const Circle2d<T>& entity) const;
76  template <typename T>
77  GeometryEntity2dPtr process(const Ellipse2d<T>& entity) const;
78  template <typename T>
79  GeometryEntity2dPtr process(const Square2d<T>& entity) const;
80  template <typename T>
81  GeometryEntity2dPtr process(const Rectangle2d<T>& entity) const;
82  template <typename T>
83  GeometryEntity2dPtr process(const Segment2d<T>& entity) const;
85 
86 // attributes
87 protected:
88 
89 };
90 
93 
94 inline eTransform2dType
96 {
97  return g_transform2dType;
98 }
99 
102 
103 } // end of namespace geom
104 } // end of namespace ipsdk
105 
106 #endif // __IPSDKGEOMETRY_ENVELOPETRANSFORM2D_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
Envelope (bounding box) computation.
Definition: GeometryTransform2dTypes.h:53
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
Closed polygon potentially associated to interior polygonal holes.
Definition: PolygonWithHoles2d.h:40
static const eTransform2dType::domain g_transform2dType
geometry transformation type
Definition: EnvelopeTransform2d.h:40
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Base class for typed 3d geometry entities.
Definition: BaseTypedGeometryEntity2d.h:27
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
eTransform2dType getTransform2dType() const
method allowing to retrieve entity 2d transformation type
Definition: EnvelopeTransform2d.h:95
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
Algorithm allowing to compute envelope (axis aligned bounding box) of a 2d geometry entity...
Definition: EnvelopeTransform2d.h:32
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
eTransform2dType
Enumerate describing geometry 2d transform type.
Definition: GeometryTransform2dTypes.h:33