15 #ifndef __IPSDKIMAGEPROCESSING_PLANINDEXEDSPLIT_H__ 16 #define __IPSDKIMAGEPROCESSING_PLANINDEXEDSPLIT_H__ 18 #include <IPSDKImageProcessing/DataSplit/PlanIndexed/BasePlanIndexedSplit.h> 19 #include <boost/type_traits/remove_const.hpp> 27 template <
typename TProcessor,
typename InputStorageType,
typename TAttribute>
67 void init(
const InputStorageType& pPlanIndexedColl,
71 const bool bCanBeSingle =
false);
92 template <
typename TProcessor,
typename InputStorageType,
typename TAttribute>
93 inline const std::string&
96 return TAttribute::getObjectNameStr();
99 template <
typename TProcessor,
typename InputStorageType,
typename TAttribute>
100 inline const std::string&
103 return TAttribute::getToolTipStr();
106 template <
typename TProcessor,
typename InputStorageType,
typename TAttribute>
112 const bool bCanBeSingle)
115 this->initBase(boost::const_pointer_cast<InputMutableValueType>(pPlanIndexedColl), sizeZ, sizeC, sizeT, bCanBeSingle);
118 template <
typename TProcessor,
typename InputStorageType,
typename TAttribute>
124 "This attribute is not part of processor class");
126 return dynamic_cast<const TProcessor*
>(&processor) != 0;
129 template <
typename TProcessor,
typename InputStorageType,
typename TAttribute>
136 TProcessor& tProcessor =
static_cast<TProcessor&
>(processor);
139 InputStorageType pPlanIndexedColl = boost::static_pointer_cast<
InputValueType>(_pPlanIndexedColl);
143 if (pPlanIndexedColl->getNbPlans() > 1) {
146 const ipUInt64 tPlanIdx = elementIdx / (_sizeZ * _sizeC);
147 const ipUInt64 cPlanIdx = (elementIdx - tPlanIdx * _sizeZ * _sizeC) / _sizeZ;
148 const ipUInt64 zPlanIdx = (elementIdx - tPlanIdx * _sizeZ * _sizeC - cPlanIdx * _sizeZ);
149 pOutputData = pPlanIndexedColl->getStorage(zPlanIdx, cPlanIdx, tPlanIdx);
152 pOutputData = pPlanIndexedColl->getStorage(0, 0, 0);
155 tProcessor.TProcessor::template set<TAttribute>(pOutputData);
166 #endif // __IPSDKIMAGEPROCESSING_PLANINDEXEDSPLIT_H__ TProcessor ProcessorType
processor type associated to object
Definition: PlanIndexedSplit.h:33
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
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
TAttribute::StorageType OutputStorageType
output storage type for split operation
Definition: PlanIndexedSplit.h:45
const std::string & getAttributeName() const
retrieve attribute name associated to split operation
Definition: PlanIndexedSplit.h:94
TAttribute AttributeType
attribute type associated to object
Definition: PlanIndexedSplit.h:36
Base class for processor class.
Definition: BaseProcessor.h:43
structure allowing to check whether a given attribute exists in attribute collection information ...
Definition: AttributeCollInfoCheckMacros.h:131
BoolResult processAttribute(processor::BaseProcessor &processor, const ipUInt32 elementIdx, const core::BaseRequestOrigin &requestOrigin)
initialize processor attribute associate to split operation for a given element index ...
Definition: PlanIndexedSplit.h:131
InputStorageType::element_type InputValueType
input value type for split operation
Definition: PlanIndexedSplit.h:39
Concrete class for split operation using input plan indexed data.
Definition: PlanIndexedSplit.h:28
const std::string & getAttributeToolTip() const
retrieve attribute tooltip associated to split operation
Definition: PlanIndexedSplit.h:101
Base class for request origin description.
Definition: BaseRequestOrigin.h:28
bool checkProcessorType(const processor::BaseProcessor &processor)
check processor type in derived class
Definition: PlanIndexedSplit.h:120
void init(const InputStorageType &pPlanIndexedColl, const ipUInt64 sizeZ, const ipUInt64 sizeC, const ipUInt64 sizeT, const bool bCanBeSingle=false)
initialization method for splitted objects
Definition: PlanIndexedSplit.h:108
Base class for plan indexed split operations for data dispatch.
Definition: BasePlanIndexedSplit.h:34
boost::remove_const< InputValueType >::type InputMutableValueType
input mutable value type for split operation
Definition: PlanIndexedSplit.h:42
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53