IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MeasureSet.h
1 // MeasureSet.h:
3 // -------------
4 //
14 
15 #ifndef __IPSDKBASESHAPEANALYSIS_MEASURESET_H__
16 #define __IPSDKBASESHAPEANALYSIS_MEASURESET_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::shape::analysis::MeasureSet::_measureColl' : class 'std::map<_Kty,_Ty>' needs to have dll-interface to be used by clients of class 'ipsdk::shape::analysis::MeasureSet'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
27 #include <IPSDKSerialization/Engine/BaseObjectWithSkeleton.h>
28 #include <boost/enable_shared_from_this.hpp>
29 #include <boost/smart_ptr/make_shared_object.hpp>
30 
31 namespace ipsdk {
32 namespace shape {
33 namespace analysis {
34 
37 
39  public boost::enable_shared_from_this<MeasureSet>
40 {
41  // declare serial class
42  IPSDK_DECLARE_SERIAL_WITHOUT_COPY(IPSDKBaseShapeAnalysis, MeasureSet)
43 
44  // friend class for protected members access
45  friend MeasureSetPtr boost::make_shared<MeasureSet>();
46 
47 protected:
49  MeasureSet();
50 
51 public:
53  ~MeasureSet();
54 
55 // methods
56 public:
60  static MeasureSetPtr createMeasureSet(const MeasureInfoSetConstPtr& pMeasureInfoSet);
61 
63  ipUInt64 getNbMeasure() const;
64 
66  ipUInt64 getNbEntities() const;
67 
69  ipUInt64 getNbColorPlans() const;
70 
72  const MeasureInfoSet& getMeasureInfoSet() const;
73 
75  const MeasureColl& getMeasureColl() const;
76 
80  const GeometricCalibrationConstPtr& getGlobalGeometricCalibration() const;
81 
84  bool is2dMeasureSet() const;
85 
88  bool is3dMeasureSet() const;
89 
92  bool isMsrProcessingPolicy(const eMsrProcessingPolicy& msrProcessingPolicy) const;
93 
96  bool isProcessingStatus(const eMsrProcessingStatus& msrProcessingStatus) const;
97 
100  bool isReadyToProcess() const;
101 
106  MeasureConstPtr getMeasure(const std::string& measureName) const;
107  const MeasurePtr& getMeasure(const std::string& measureName);
109 
112  BoolResult startProcessing(const ipUInt64 nbColorPlans,
113  const ipUInt64 nbEntities);
114 
120  void setMsrGlobalInfo(const eMsrInputImageId& msrInputImageId,
121  const MsrGlobalInfoConstPtr& pMsrGlobalInfo);
122 
125  bool hasMsrGlobalInfo(const eMsrInputImageId& msrInputImageId) const;
126 
130  const MeasureGlobalInfo& getMsrGlobalInfo(const eMsrInputImageId& msrInputImageId) const;
131 
134  bool extractNextReadyMeasureSet(MeasureSetPtr& pSubMeasureSet,
135  eMsrProcessingPolicy& msrProcessingPolicy,
136  eMsrShapeRequirements& msrShapeRequirements,
137  MeasureConfigConstPtr& pMeasureConfig);
138 
141  bool isStillNeeded(const eMsrInputShapeCollId& shapeCollId,
142  const GeometricCalibration& calibration) const;
143 
145  bool isStillNeeded(const eMsrInputImageId& imageId,
146  const BaseIntensityPreProcessorConfig& intensityPreProcessorConfig) const;
147 
150  MeasureSetPtr extractSubMeasureSet(const ipUInt64 subDataStartOffset,
151  const ipUInt64 nbSubData) const;
152  MeasureSetPtr extractSubMeasureSet(const UInt64Vector& subDataIdxColl) const;
154 
159  BoolResult indivisibleMeasure();
160 
165  BoolResult genericMeasure(const ipUInt64 shapeIdx);
166 
174  void genericCollectResults(const ipUInt64 resultStartIndex,
175  const MeasureSet& subMeasureSet);
176 
181  BoolResult geometry2dMeasure(const ipUInt64 shapeIdx,
182  const geom::Shape2d& shape2d);
183 
191  void geometry2dCollectResults(const ipUInt64 resultStartIndex,
192  const MeasureSet& subMeasureSet);
193 
198  BoolResult geometry3dMeasure(const ipUInt64 shapeIdx,
199  const geom::Shape3d& shape3d);
200 
208  void geometry3dCollectResults(const ipUInt64 resultStartIndex,
209  const MeasureSet& subMeasureSet);
210 
211 
216  BoolResult intensityStartShapeMeasures(const ipUInt64 shapeIdx);
217 
223  BoolResult intensityMeasure(const ipUInt64 cPlanIdx,
224  const ipUInt64 shapeIdx,
225  const geom::RowSegments& rowSegments,
226  const image::eImageBufferType& imageBufferType,
227  const ipUInt64 rowIdx,
228  const ipUInt64 zPlanIdx,
229  const void* pBuf);
230 
235  BoolResult intensityEndShapeMeasures(const ipUInt64 shapeIdx);
236 
244  BoolResult intensityCollectResults(const UInt64Vector& resultIndexColl,
245  const MeasureSet& subMeasureSet);
246 
252  void endProcessing(const geom::Shape2dConstVector& shape2dColl);
253 
259  void endProcessing(const geom::Shape3dConstVector& shape3dColl);
260 
262  void clearProcessing();
263 
264 // attributes
265 protected:
268 
271 
274 };
275 
278 
279 } // end of namespace analysis
280 } // end of namespace shape
281 } // end of namespace ipsdk
282 
283 #pragma warning (pop)
284 
285 #endif // __IPSDKBASESHAPEANALYSIS_MEASURESET_H__
boost::shared_ptr< const MeasureGlobalInfo > MsrGlobalInfoConstPtr
shared pointer to const measure global information object
Definition: MeasureGlobalInfoTypes.h:35
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Base class for objects allowing to define preprocessing configuration for images used as inputs of sh...
Definition: BaseIntensityPreProcessorConfig.h:31
boost::shared_ptr< BaseMeasure > MeasurePtr
shared pointer to shape measure object
Definition: MeasureTypes.h:65
boost::shared_ptr< const MeasureConfig > MeasureConfigConstPtr
shared pointer to const MeasureConfig object
Definition: MeasureConfigTypes.h:89
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
boost::shared_ptr< const ipsdk::GeometricCalibration > GeometricCalibrationConstPtr
shared pointer to const ipsdk::GeometricCalibration
Definition: GeometricCalibrationTypes.h:31
std::vector< ipUInt64 > UInt64Vector
stl vector collections
Definition: BaseCollections.h:35
Definition of import/export macro for library.
#define IPSDKBASESHAPEANALYSIS_API
Import/Export macro for library IPSDKBaseShapeAnalysis.
Definition: IPSDKBaseShapeAnalysisExports.h:25
ipUInt64 _nbEntities
number of entities associated to measure set
Definition: MeasureSet.h:273
Object allowing to agregate a collection of measure.
Definition: MeasureSet.h:38
eMsrInputShapeCollId
Enumerate allowing to identify shape collection used for processing.
Definition: MeasureConfigTypes.h:38
Object allowing to agregate a collection of measure informations.
Definition: MeasureInfoSet.h:38
#define IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:79
eMsrProcessingStatus
Enumerate describing measure processing status.
Definition: MeasureTypes.h:48
MeasureInfoSetConstPtr _pMeasureInfoSet
shared pointer to associated measure information set
Definition: MeasureSet.h:267
std::vector< RowSegment > RowSegments
collection of row segments
Definition: GeometryEntityTypes.h:63
eMsrShapeRequirements
Enumerate describing shape data requirement for measure computation.
Definition: MeasureInfoTypes.h:86
eMsrProcessingPolicy
Enumerate describing measure processing policy.
Definition: MeasureInfoTypes.h:42
Predefined base collection types for library.
Base class for serialization object with three serialization modes :
Definition: BaseObjectWithSkeleton.h:33
std::vector< Shape2dConstPtr > Shape2dConstVector
collection of shape 2d const shared pointers
Definition: Shape2dTypes.h:45
Class allowing to encapsulate an image geometric calibration.
Definition: GeometricCalibration.h:33
Predefined types for measures management.
std::map< std::string, MeasurePtr > MeasureColl
collection of shared pointer to shape measure object
Definition: MeasureTypes.h:91
std::vector< Shape3dConstPtr > Shape3dConstVector
collection of const standard shape
Definition: Shape3dTypes.h:43
eMsrInputImageId
Enumerate allowing to identify used input image for processing.
Definition: MeasureConfigTypes.h:70
Shape 2d associated to one or more closed polygon 2d.
Definition: Shape2d.h:35
Predefined type for image management.
Shape 3d associated to one or more closed mesh 3d.
Definition: Shape3d.h:34
boost::shared_ptr< MeasureSet > MeasureSetPtr
shared pointer to shape measure set
Definition: MeasureTypes.h:97
Predefined types for shape measurement operations global informations.
Definition: MeasureGlobalInfo.h:36
boost::shared_ptr< const MeasureInfoSet > MeasureInfoSetConstPtr
shared pointer to const shape measure information set
Definition: MeasureInfoTypes.h:160
MeasureColl _measureColl
collection of measure associated to object
Definition: MeasureSet.h:270
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78