18 #ifndef __IPSDKIMAGEPROCESSING_FROMIMAGEPLANINDEXEDINITIALIZER_H__ 19 #define __IPSDKIMAGEPROCESSING_FROMIMAGEPLANINDEXEDINITIALIZER_H__ 21 #include <IPSDKImageProcessing/OutputInitializer/PlanIndexed/BaseFromImagePlanIndexedInitializer.h> 23 #include <boost/make_shared.hpp> 24 #include <boost/function.hpp> 32 template <
typename OutputAttributeType>
38 typedef typename OutputAttributeType::ValueType
ValueType;
41 typedef typename OutputAttributeType::StorageType
StorageType;
50 typedef boost::function<typename OutputAttributeType::PlanStorageType ()>
PlanCreator;
81 BoolResult initAttribute(BasePlanIndexedAttribute& baseAttributeOut,
95 template <
typename OutputAttributeType>
102 _pPlanCreator =
static_cast<const PlanCreator&
>(&boost::make_shared<PlanValueType>);
105 this->initBase(pOutputAttribute, pInputImageAttribute, fromImagePlanIndexedPolicy);
108 template <
typename OutputAttributeType>
116 _pPlanCreator = pPlanCreator;
119 this->initBase(pOutputAttribute, pInputImageAttribute, fromImagePlanIndexedPolicy);
122 template <
typename OutputAttributeType>
130 OutputAttributeType& attributeOut =
static_cast<OutputAttributeType&
>(baseAttributeOut);
133 if (attributeOut.isInit() ==
false)
134 attributeOut.
init(boost::make_shared<ValueType>());
137 ValueType& coll = *attributeOut.getStorage();
151 #endif // __IPSDKIMAGEPROCESSING_FROMIMAGEPLANINDEXEDINITIALIZER_H__ Class allowing to encapsulate a typed process result associated to a string description.
Definition: ProcessingResult.h:28
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::function< typename OutputAttributeType::PlanStorageType()> PlanCreator
plan creator function
Definition: FromImagePlanIndexedInitializer.h:50
boost::weak_ptr< const BaseImageAttribute > ImageAttributeConstWeakPtr
Definition: ImageAttributeTypes.h:38
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
void initPlanIndexed(const ipUInt64 sizeZ, const ipUInt64 sizeC, const ipUInt64 sizeT, T &coll, boost::function< typename T::StorageType()> planCreator)
function allowing to initialize a plan indexed collection with respect to given components sizes ...
Definition: PlanIndexedInitializerUtils.h:34
void init(const PlanIndexedAttributeWeakPtr &pOutputAttribute, const ImageAttributeConstWeakPtr &pInputImageAttribute, const eFromImagePlanIndexedPolicy &fromImagePlanIndexedPolicy)
initialize object
Definition: FromImagePlanIndexedInitializer.h:97
OutputAttributeType::PlanStorageType PlanStorageType
plan storage type associated to attribute
Definition: FromImagePlanIndexedInitializer.h:47
PlanCreator _pPlanCreator
function used to create new plan shared pointers
Definition: FromImagePlanIndexedInitializer.h:89
OutputAttributeType::ValueType ValueType
value type associated to attribute
Definition: FromImagePlanIndexedInitializer.h:38
Base class for plan indexed attributes.
Definition: BasePlanIndexedAttribute.h:33
eFromImagePlanIndexedPolicy
enumerate describing rule behavior for image plans matching
Definition: PlanIndexedInitializerTypes.h:47
boost::weak_ptr< BasePlanIndexedAttribute > PlanIndexedAttributeWeakPtr
weak pointer to plan indexed attribute
Definition: PlanIndexedAttributeTypes.h:36
Utility functions for plan indexed collection initializer.
OutputAttributeType::PlanValueType PlanValueType
plan value type associated to attribute
Definition: FromImagePlanIndexedInitializer.h:44
OutputAttributeType::StorageType StorageType
storage type associated to attribute
Definition: FromImagePlanIndexedInitializer.h:41
Class allowing to initialize a plan indexed collection from plans of an image.
Definition: FromImagePlanIndexedInitializer.h:33
Base class for initialization of a plan indexed collection from plans of an image.
Definition: BaseFromImagePlanIndexedInitializer.h:33