IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MeasureResultUtils.h
Go to the documentation of this file.
1 // MeasureResultUtils.h:
3 // ---------------------
4 //
14 
15 #ifndef __IPSDKBASESHAPEANALYSIS_MEASURERESULTUTILS_H__
16 #define __IPSDKBASESHAPEANALYSIS_MEASURERESULTUTILS_H__
17 
21 #include <IPSDKUtil/Tools/ProcessingResult.h>
23 #include <boost/filesystem/path.hpp>
24 #include <vector>
25 
26 namespace ipsdk {
27 namespace shape {
28 namespace analysis {
29 
32 
39 saveCsvMeasureFile(const boost::filesystem::path& csvMeasureFilePath,
40  const MeasureSet& measureSet,
42 
54 template <typename T>
55 IPSDKBASESHAPEANALYSIS_API const std::vector<T>&
56 extractValueResults(const MeasureConstPtr& pMeasure,
57  const ipUInt64 cPlanIdx = 0);
58 
70 template <typename T>
71 IPSDKBASESHAPEANALYSIS_API const std::vector<std::vector<T> >&
72 extractCollResults(const MeasureConstPtr& pMeasure,
73  const ipUInt64 cPlanIdx = 0);
74 
80 template <typename T>
82 compare(const ValueMeasureResult<T>& msrResult1,
83  const ValueMeasureResult<T>& msrResult2,
84  const T tolerance = NumericLimits<T>::s_sqrt_eps);
85 
91 template <typename T>
93 compareRelative(const ValueMeasureResult<T>& msrResult1,
94  const ValueMeasureResult<T>& msrResult2,
95  const T tolerance = NumericLimits<T>::s_sqrt_eps);
96 
102 template <typename T>
104 compare(const CollMeasureResult<T>& msrResult1,
105  const CollMeasureResult<T>& msrResult2,
106  const T tolerance = NumericLimits<T>::s_sqrt_eps);
107 
113 template <typename T>
115 compareRelative(const CollMeasureResult<T>& msrResult1,
116  const CollMeasureResult<T>& msrResult2,
117  const T tolerance = NumericLimits<T>::s_sqrt_eps);
118 
127 template <typename T>
129 compareValue(const MeasureConstPtr& pMeasure1,
130  const MeasureConstPtr& pMeasure2,
131  const T tolerance = NumericLimits<T>::s_sqrt_eps);
132 
142 template <typename T>
144 compareRelativeValue(const MeasureConstPtr& pMeasure1,
145  const MeasureConstPtr& pMeasure2,
146  const T tolerance = NumericLimits<T>::s_sqrt_eps);
147 
156 template <typename T>
158 compareColl(const MeasureConstPtr& pMeasure1,
159  const MeasureConstPtr& pMeasure2,
160  const T tolerance = NumericLimits<T>::s_sqrt_eps);
161 
171 template <typename T>
173 compareRelativeColl(const MeasureConstPtr& pMeasure1,
174  const MeasureConstPtr& pMeasure2,
175  const T tolerance = NumericLimits<T>::s_sqrt_eps);
176 
179 
180 } // end of namespace analysis
181 } // end of namespace shape
182 } // end of namespace ipsdk
183 
184 #endif // __IPSDKBASESHAPEANALYSIS_MEASURERESULTUTILS_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
IPSDKBASESHAPEANALYSIS_API BoolResult saveCsvMeasureFile(const boost::filesystem::path &csvMeasureFilePath, const MeasureSet &measureSet, const eMsrResultCsvUnitFormat &msrResultCsvUnitFormat=eMsrResultCsvUnitFormat::eMRCUF_NextLine)
function allowing to save a measure result to csv file
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
boost::shared_ptr< const BaseMeasure > MeasureConstPtr
shared pointer to const shape measure object
Definition: MeasureTypes.h:82
IPSDKBASESHAPEANALYSIS_API bool compareRelativeValue(const MeasureConstPtr &pMeasure1, const MeasureConstPtr &pMeasure2, const T tolerance=NumericLimits< T >::s_sqrt_eps)
comparison of two measure results (value results case) with relative values comparison ...
IPSDKBASESHAPEANALYSIS_API bool compareValue(const MeasureConstPtr &pMeasure1, const MeasureConstPtr &pMeasure2, const T tolerance=NumericLimits< T >::s_sqrt_eps)
comparison of two measure results (value results case)
Definition of import/export macro for library.
Predefined types for measure results management.
#define IPSDKBASESHAPEANALYSIS_API
Import/Export macro for library IPSDKBaseShapeAnalysis.
Definition: IPSDKBaseShapeAnalysisExports.h:25
IPSDKBASESHAPEANALYSIS_API bool compareColl(const MeasureConstPtr &pMeasure1, const MeasureConstPtr &pMeasure2, const T tolerance=NumericLimits< T >::s_sqrt_eps)
comparison of two measure results (collection results case)
IPSDKBASESHAPEANALYSIS_API bool compareRelative(const ValueMeasureResult< T > &msrResult1, const ValueMeasureResult< T > &msrResult2, const T tolerance=NumericLimits< T >::s_sqrt_eps)
comparison of two ValueMeasureResult with relative values comparison
eMsrResultCsvUnitFormat
Definition: MeasureResultTypes.h:55
IPSDKBASESHAPEANALYSIS_API const std::vector< std::vector< T > > & extractCollResults(const MeasureConstPtr &pMeasure, const ipUInt64 cPlanIdx=0)
function allowing to extract measure results for measures associated to collections ...
ProcessingResult< bool > BoolResult
typedef for boolean results associated to a string description
Definition: ProcessingResultTypes.h:29
Predefined types for measures management.
unit string will be written on line just after column header line into measure result csv ...
Definition: MeasureResultTypes.h:61
IPSDKBASESHAPEANALYSIS_API const std::vector< T > & extractValueResults(const MeasureConstPtr &pMeasure, const ipUInt64 cPlanIdx=0)
function allowing to extract measure results for measures associated to values
IPSDKBASESHAPEANALYSIS_API bool compareRelativeColl(const MeasureConstPtr &pMeasure1, const MeasureConstPtr &pMeasure2, const T tolerance=NumericLimits< T >::s_sqrt_eps)
comparison of two measure results (collection results case) with relative values comparison ...
IPSDKBASESHAPEANALYSIS_API bool compare(const ValueMeasureResult< T > &msrResult1, const ValueMeasureResult< T > &msrResult2, const T tolerance=NumericLimits< T >::s_sqrt_eps)
comparison of two ValueMeasureResult