IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ShapeMeasureSetInitializerOperators.h
Go to the documentation of this file.
1 // ShapeMeasureSetInitializerOperators.h:
3 // --------------------------------------
4 //
14 
15 #ifndef __IPSDKIMAGEPROCESSING_SHAPEMEASURESETINITIALIZEROPERATORS_H__
16 #define __IPSDKIMAGEPROCESSING_SHAPEMEASURESETINITIALIZEROPERATORS_H__
17 
20 #include <IPSDKImageProcessing/OutputInitializer/ShapeMeasureSet/CreateShapeMeasureSetInitializer.h>
21 #include <boost/make_shared.hpp>
22 
23 namespace ipsdk {
24 namespace imaproc {
25 
28 
33 template <typename OutputAttributeType>
35 createFromInfo(const boost::weak_ptr<OutputAttributeType>& pOutputAttribute,
36  const ShapeMeasureInfoSetAttributeConstWeakPtr& pInputShapeMeasureInfoSetAttribute)
37 {
38  // retrieve initializer type
39  typedef CreateShapeMeasureSetInitializer<OutputAttributeType> OutputInitializerType;
40 
41  // create initializer
42  boost::shared_ptr<OutputInitializerType> pInitializer = boost::make_shared<OutputInitializerType>();
43  pInitializer->init(pOutputAttribute, pInputShapeMeasureInfoSetAttribute);
44 
45  return pInitializer;
46 }
47 template <typename OutputAttributeType>
49 createFromInfo(const boost::shared_ptr<OutputAttributeType>& pOutputAttribute,
50  const ShapeMeasureInfoSetAttributeConstPtr& pInputShapeMeasureInfoSetAttribute)
51 {
52  return createFromInfo(boost::weak_ptr<OutputAttributeType>(pOutputAttribute),
53  ShapeMeasureInfoSetAttributeConstWeakPtr(pInputShapeMeasureInfoSetAttribute));
54 }
56 
63 createMeasureSetFromInfo(const ShapeMeasureInfoSetAttributeConstWeakPtr& pInputShapeMeasureInfoSetAttribute);
64 
67 
68 } // end of namespace imaproc
69 } // end of namespace ipsdk
70 
71 #endif // __IPSDKIMAGEPROCESSING_SHAPEMEASURESETINITIALIZEROPERATORS_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
processor::OutputInitializerPtr createFromInfo(const boost::weak_ptr< OutputAttributeType > &pOutputAttribute, const ShapeMeasureInfoSetAttributeConstWeakPtr &pInputShapeMeasureInfoSetAttribute)
function allowing to initialize a shape measure set attribute with respect to a given input measure i...
Definition: ShapeMeasureSetInitializerOperators.h:35
void init(const ShapeMeasureSetAttributeWeakPtr &pOutputAttribute, const ShapeMeasureInfoSetAttributeConstWeakPtr &pInputShapeMeasureInfoSetAttribute)
initialize object
Definition of import/export macro for library.
boost::shared_ptr< BaseOutputInitializer > OutputInitializerPtr
shared pointer to output intializer
Definition: OutputInitializerTypes.h:51
#define IPSDKIMAGEPROCESSING_API
Import/Export macro for library IPSDKImageProcessing.
Definition: IPSDKImageProcessingExports.h:25
Class allowing to create an output shape measure set.
Definition: CreateShapeMeasureSetInitializer.h:29
IPSDKIMAGEPROCESSING_API ipsdk::shape::analysis::MeasureSetPtr createMeasureSetFromInfo(const ShapeMeasureInfoSetAttributeConstWeakPtr &pInputShapeMeasureInfoSetAttribute)
wrapper function allowing a delayed creation of a shape measure set with respect to a given input mea...
boost::shared_ptr< MeasureSet > MeasureSetPtr
shared pointer to shape measure set
Definition: MeasureTypes.h:97
boost::shared_ptr< const BaseShapeMeasureInfoSetAttribute > ShapeMeasureInfoSetAttributeConstPtr
Definition: ShapeMeasureInfoSetAttributeTypes.h:34
boost::weak_ptr< const BaseShapeMeasureInfoSetAttribute > ShapeMeasureInfoSetAttributeConstWeakPtr
Definition: ShapeMeasureInfoSetAttributeTypes.h:40