IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CollMeasureResult.h
1 // CollMeasureResult.h:
3 // --------------------
4 //
16 
17 #ifndef __IPSDKBASESHAPEANALYSIS_COLLMEASURERESULT_H__
18 #define __IPSDKBASESHAPEANALYSIS_COLLMEASURERESULT_H__
19 
20 // suppression warnings
21 // warning C4251: 'ipsdk::shape::analysis::CollMeasureResult<T>::_coll' : class 'std::vector<std::vector<T>>' needs to have dll-interface to be used by clients of class 'ipsdk::shape::analysis::CollMeasureResult<T>'
22 #pragma warning (push)
23 #pragma warning (disable : 4251)
24 
25 #include <IPSDKBaseShapeAnalysis/Measure/Result/BaseCollMeasureResult.h>
27 #include <vector>
28 
29 namespace ipsdk {
30 namespace shape {
31 namespace analysis {
32 
35 
36 template <typename T>
38 {
39  // declare serial class
40  IPSDK_DECLARE_SERIAL_WITH_COPY(IPSDKBaseShapeAnalysis, CollMeasureResult)
41 
42 // predefined public type
43 public:
45  typedef T UnderlyingDataType;
46 
48  typedef std::vector<T> ValueType;
49 
51  typedef std::vector<ValueType> CollType;
52 
54  typedef std::vector<CollType> ColorCollType;
55 
56 public:
62 
63 // methods
64 public:
66  inline eDataType getMsrResultDataType() const;
67 
72  const ColorCollType& getColorColl() const;
73  ColorCollType& getColorColl();
75 
80  const CollType& getColl(const ipUInt64 cPlanIdx = 0) const;
81  CollType& getColl(const ipUInt64 cPlanIdx = 0);
83 
84 protected:
86  void initDerived(const ipUInt64 nbColorPlans,
87  const ipUInt64 nbEntities);
88 
91  void collectResultsDerived(const ipUInt64 resultStartIndex,
92  const BaseMeasureResult& baseSubResults);
93  void collectResultsDerived(const UInt64Vector& subDataIdxColl,
94  const BaseMeasureResult& baseSubResults);
96 
99  void extractResultsDerived(const ipUInt64 resultStartIndex,
100  const BaseMeasureResult& baseMainResults);
101  void extractResultsDerived(const UInt64Vector& mainDataIdxColl,
102  const BaseMeasureResult& baseMainResults);
104 
106  void clearDerived();
107 
108 // attributes
109 protected:
112 };
113 
116 
117 template <typename T>
118 inline eDataType
120 {
121  return DataType2Enum<T>::getEnum();
122 }
123 
126 
127 } // end of namespace analysis
128 } // end of namespace shape
129 } // end of namespace ipsdk
130 
131 #pragma warning (pop)
132 
133 #endif // __IPSDKBASESHAPEANALYSIS_COLLMEASURERESULT_H__
#define IPSDK_DECLARE_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:73
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
ColorCollType _coll
result collection associated to object
Definition: CollMeasureResult.h:111
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
std::vector< ipUInt64 > UInt64Vector
stl vector collections
Definition: BaseCollections.h:35
Header part of macros set for class serialization.
Base class for measure results associated to a collection of values for each shape.
Definition: BaseCollMeasureResult.h:28
static eDataType getEnum()
retrieve enum value associated to base type
Definition: BaseTypes.h:113
#define IPSDKBASESHAPEANALYSIS_API
Import/Export macro for library IPSDKBaseShapeAnalysis.
Definition: IPSDKBaseShapeAnalysisExports.h:25
std::vector< T > ValueType
measure type associated to object
Definition: CollMeasureResult.h:48
eDataType getMsrResultDataType() const
retrieve underlying data type associated to object
Definition: CollMeasureResult.h:119
eDataType
Enumerate describing a base type.
Definition: BaseTypes.h:77
Base class for measure results.
Definition: BaseMeasureResult.h:29
T UnderlyingDataType
underlying measure data type associated to object
Definition: CollMeasureResult.h:45
Class associated to measure results agregating a collection of values for each shape.
Definition: CollMeasureResult.h:37
std::vector< CollType > ColorCollType
color (by color plan) collection type associated to object
Definition: CollMeasureResult.h:54
std::vector< ValueType > CollType
collection type associated to object
Definition: CollMeasureResult.h:51