16 #ifndef __IPSDKIMAGEPROCESSING_FROMOTHERPLANINDEXEDINITIALIZER_H__ 17 #define __IPSDKIMAGEPROCESSING_FROMOTHERPLANINDEXEDINITIALIZER_H__ 19 #include <IPSDKImageProcessing/OutputInitializer/PlanIndexed/BaseFromOtherPlanIndexedInitializer.h> 21 #include <boost/make_shared.hpp> 22 #include <boost/function.hpp> 30 template <
typename OutputAttributeType>
36 typedef typename OutputAttributeType::ValueType
ValueType;
39 typedef typename OutputAttributeType::StorageType
StorageType;
48 typedef boost::function<typename OutputAttributeType::PlanStorageType ()>
PlanCreator;
77 BoolResult initAttribute(BasePlanIndexedAttribute& baseAttributeOut,
91 template <
typename OutputAttributeType>
97 _pPlanCreator =
static_cast<const PlanCreator&
>(&boost::make_shared<PlanValueType>);
100 this->initBase(pOutputAttribute, pInputAttribute);
103 template <
typename OutputAttributeType>
110 _pPlanCreator = pPlanCreator;
113 this->initBase(pOutputAttribute, pInputAttribute);
116 template <
typename OutputAttributeType>
124 OutputAttributeType& attributeOut =
static_cast<OutputAttributeType&
>(baseAttributeOut);
127 if (attributeOut.isInit() ==
false)
128 attributeOut.
init(boost::make_shared<ValueType>());
131 ValueType& coll = *attributeOut.getStorage();
145 #endif // __IPSDKIMAGEPROCESSING_FROMOTHERPLANINDEXEDINITIALIZER_H__ boost::weak_ptr< const BasePlanIndexedAttribute > PlanIndexedAttributeConstWeakPtr
weak pointer to const plan indexed attribute
Definition: PlanIndexedAttributeTypes.h:39
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
void init(const PlanIndexedAttributeWeakPtr &pOutputAttribute, const PlanIndexedAttributeConstWeakPtr &pInputAttribute)
initialize object
Definition: FromOtherPlanIndexedInitializer.h:93
OutputAttributeType::ValueType ValueType
value type associated to attribute
Definition: FromOtherPlanIndexedInitializer.h:36
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
boost::function< typename OutputAttributeType::PlanStorageType()> PlanCreator
plan creator function
Definition: FromOtherPlanIndexedInitializer.h:48
OutputAttributeType::StorageType StorageType
storage type associated to attribute
Definition: FromOtherPlanIndexedInitializer.h:39
Base class for plan indexed attributes.
Definition: BasePlanIndexedAttribute.h:33
OutputAttributeType::PlanStorageType PlanStorageType
plan storage type associated to attribute
Definition: FromOtherPlanIndexedInitializer.h:45
OutputAttributeType::PlanValueType PlanValueType
plan value type associated to attribute
Definition: FromOtherPlanIndexedInitializer.h:42
PlanCreator _pPlanCreator
function used to create new plan shared pointers
Definition: FromOtherPlanIndexedInitializer.h:85
boost::weak_ptr< BasePlanIndexedAttribute > PlanIndexedAttributeWeakPtr
weak pointer to plan indexed attribute
Definition: PlanIndexedAttributeTypes.h:36
Class allowing initialization of a plan indexed collection from an other plan indexed collection...
Definition: FromOtherPlanIndexedInitializer.h:31
Utility functions for plan indexed collection initializer.
Base class for initialization of a plan indexed collection from an other plan indexed collection...
Definition: BaseFromOtherPlanIndexedInitializer.h:32