IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ScaleTransform2d.h
1 // ScaleTransform2d.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_SCALETRANSFORM2D_H__
16 #define __IPSDKGEOMETRY_SCALETRANSFORM2D_H__
17 
18 #include <IPSDKGeometry/Transform/2d/BaseGeometryTransform2d.h>
19 #include <IPSDKMath/Geometry/2d/Transform/Scale2d.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_Scale;
36 
37 public:
41  ScaleTransform2d(const ipReal64 scale);
45 
46 // methods
47 public:
49  eTransform2dType getTransform2dType() const;
50 
53  void init(const ipReal64 scale);
54  void init(const math::transform::Scale2d& transform);
56 
57 protected:
60  template <typename T>
61  void processPoint(Point2dData<T>& entity) const;
62  template <typename T>
63  bool processInSitu(Point2d<T>& entity) const;
64  bool processInSitu(Vector2d& entity) const;
65  template <typename T>
66  bool processInSitu(BoundingBox2d<T>& entity) const;
67  template <typename T>
68  bool processInSitu(PointCloud2d<T>& entity) const;
69  template <typename T>
70  bool processInSitu(Polygon2d<T>& entity) const;
71  template <typename T>
72  bool processInSitu(PolygonWithHoles2d<T>& entity) const;
73  bool processInSitu(Shape2d& entity) const;
74  template <typename T>
75  bool processInSitu(Circle2d<T>& entity) const;
76  template <typename T>
77  bool processInSitu(Ellipse2d<T>& entity) const;
78  template <typename T>
79  bool processInSitu(Square2d<T>& entity) const;
80  template <typename T>
81  bool processInSitu(Rectangle2d<T>& entity) const;
82  template <typename T>
83  bool processInSitu(Segment2d<T>& entity) const;
85 
86 // attributes
87 protected:
90 };
91 
94 
95 inline eTransform2dType
97 {
98  return g_transform2dType;
99 }
100 
101 inline void
103 {
104  _transform.setParams(scale);
105 }
106 
107 inline void
109 {
110  _transform = transform;
111 }
112 
115 
116 } // end of namespace geom
117 } // end of namespace ipsdk
118 
119 #endif // __IPSDKGEOMETRY_SCALETRANSFORM2D_H__
math::transform::Scale2d _transform
underlying transformation
Definition: ScaleTransform2d.h:89
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
eTransform2dType getTransform2dType() const
method allowing to retrieve entity 2d transformation type
Definition: ScaleTransform2d.h:96
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
#define IPSDK_DECLARE_GEOMETRY_TRANSFORM_2D(libraryName, className)
Macro allowing to declare a geometry transform 2d.
Definition: GeometryTransform2dHdrMacros.h:26
static const eTransform2dType::domain g_transform2dType
geometry transformation type
Definition: ScaleTransform2d.h:35
Closed polygon potentially associated to interior polygonal holes.
Definition: PolygonWithHoles2d.h:40
void setParams(const ipReal64 scale)
select parameters associated to transformation
Definition: Scale2d.h:109
Isotropic 2d scale transformation.
Definition: ScaleTransform2d.h:27
Definition: Scale2d.h:32
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Unordered collection of 2d points.
Definition: PointCloud2d.h:35
Scale.
Definition: GeometryTransform2dTypes.h:39
void init(const ipReal64 scale)
initialization of transformation parameters
Definition: ScaleTransform2d.h:102
2d segment associated to two points
Definition: Segment2d.h:38
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
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
Lightweight structure used to store Point2d data.
Definition: GeometryEntity2dTypes.h:26
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