IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Transform3dFactory.h
1 // Transform3dFactory.h:
3 // ---------------------
4 //
14 
15 #ifndef __IPSDKMATH_TRANSFORM3DFACTORY_H__
16 #define __IPSDKMATH_TRANSFORM3DFACTORY_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::math::transform::Transform3dFactory::_transformMap' : class 'std::map<ipsdk::math::transform::eGeometricTransform3dType,ipsdk::math::transform::Transform3dFactory::TransformInfo,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' needs to have dll-interface to be used by clients of class 'ipsdk::math::transform::Transform3dFactory'
20 // warning C4275: interface non dll class 'boost::noncopyable_::noncopyable' utilisée comme base d'une interface dll class 'ipsdk::math::transform::Transform3dFactory'
21 #pragma warning (push)
22 #pragma warning (disable : 4275 4251)
23 
26 #include <IPSDKUtil/BaseTypes.h>
27 #include <boost/noncopyable.hpp>
28 #include <map>
29 
30 namespace ipsdk {
31 namespace math {
32 namespace transform {
33 
34 template <typename T>
36 
39 
40 class IPSDKMATH_API Transform3dFactory : public boost::noncopyable
41 {
42  // friend class for protected members access
43  template <typename T>
44  friend struct TransformRegistrator3d;
45 
46 protected:
49 
50 public:
53 
54 // methods
55 public:
58  template <typename T>
59  static bool isRegistred()
60  {
62  }
63 
66  static bool isRegistred(const eGeometricTransform3dType& geometricTransform3dType);
67 
72  static ipUInt32 getNbParams(const eGeometricTransform3dType& geometricTransform3dType);
73 
78  static GeometricTransform3dPtr createTransform(const eGeometricTransform3dType& geometricTransform3dType);
79 
86  static GeometricTransform3dPtr createTransform(const eGeometricTransform3dType& geometricTransform3dType,
87  const Vector& params);
88 
89 protected:
91  static Transform3dFactory& getInstance();
92 
94  typedef GeometricTransform3dPtr (*CreatorFun)();
95 
99  void registerTransform(const eGeometricTransform3dType& geometricTransform3dType,
100  const ipUInt32 nbParams,
101  const CreatorFun& pCreationFun);
102 
103 // attributes
104 protected:
107  typedef std::pair<ipUInt32, CreatorFun> TransformInfo;
108 
111  typedef std::map<eGeometricTransform3dType, TransformInfo> TransformMap;
112 
115 };
116 
119 
120 } // end of namespace transform
121 } // end of namespace math
122 } // end of namespace ipsdk
123 
124 #pragma warning (pop)
125 
126 #endif // __IPSDKMATH_TRANSFORM3DFACTORY_H__
Definition of import/export macro for library.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::shared_ptr< ipsdk::math::transform::BaseGeometricTransform3d > GeometricTransform3dPtr
shared pointer to ipsdk::math::transform::BaseGeometricTransform3d
Definition: GeometricTransform3dTypes.h:96
TransformMap _transformMap
map allowing to store transform informations
Definition: Transform3dFactory.h:114
Predefined types for geometric transform 3d management.
static bool isRegistred()
method allowing to check whether a geometric transformation is registred
Definition: Transform3dFactory.h:59
std::pair< ipUInt32, CreatorFun > TransformInfo
Definition: Transform3dFactory.h:107
boost::numeric::ublas::vector< ipReal64 > Vector
vector type associated to library
Definition: LinearAlgebraTypes.h:36
Base types for multiplatform compatibility.
structure used to retrieve enumerate value from transform
Definition: GeometricTransform3dTypes.h:66
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
Definition: Transform3dFactory.h:40
eGeometricTransform3dType
geometric transform 3d type
Definition: GeometricTransform3dTypes.h:35
structure allowing to register a transform class
Definition: Transform3dFactory.h:35
std::map< eGeometricTransform3dType, TransformInfo > TransformMap
Definition: Transform3dFactory.h:111
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53