IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
StaticImageZStrip3dSplit.h
1 // StaticImageZStrip3dSplit.h:
3 // ---------------------------
4 //
14 
15 #ifndef __IPSDKIMAGEPROCESSING_STATICIMAGEZSTRIP3DSPLIT_H__
16 #define __IPSDKIMAGEPROCESSING_STATICIMAGEZSTRIP3DSPLIT_H__
17 
18 #include <IPSDKImageProcessing/DataSplit/StaticStrip/ZStrip3d/BaseStaticImageZStrip3dSplit.h>
19 
20 namespace ipsdk {
21 namespace imaproc {
22 
25 
26 template <typename TProcessor, typename InputDataType, typename TAttribute>
28  typename TAttribute::ValueType>
29 {
30 // predefined public types
31 public:
33  typedef TProcessor ProcessorType;
34 
36  typedef TAttribute AttributeType;
37 
39  typedef typename TAttribute::ValueType OutputType;
40 
41 public:
47 
48 // methods
49 public:
51  const std::string& getAttributeName() const;
52 
54  const std::string& getAttributeToolTip() const;
55 
62  void init(const boost::shared_ptr<InputDataType>& pImage,
63  const ElementsRangeColl& planElementInfoColl,
64  const image::eStripAllocationType& stripAllocationType,
65  const image::eStripParsingDirection& stripParsingDirection);
66 
67 protected:
69  bool checkProcessorType(const processor::BaseProcessor& processor);
70 
75  const boost::shared_ptr<OutputType>& pImageZStrip3d);
76 
77 // attributes
78 protected:
79 
80 };
81 
84 
85 template <typename TProcessor, typename InputDataType, typename TAttribute>
86 inline const std::string&
88 {
89  return TAttribute::getObjectNameStr();
90 }
91 
92 template <typename TProcessor, typename InputDataType, typename TAttribute>
93 inline const std::string&
95 {
96  return TAttribute::getToolTipStr();
97 }
98 
99 template <typename TProcessor, typename InputDataType, typename TAttribute>
100 inline void
101 StaticImageZStrip3dSplit<TProcessor, InputDataType, TAttribute>::init(const boost::shared_ptr<InputDataType>& pImage,
102  const ElementsRangeColl& planElementInfoColl,
103  const image::eStripAllocationType& stripAllocationType,
104  const image::eStripParsingDirection& stripParsingDirection)
105 {
106  // call of base class initialization method
107  this->initBase(pImage, planElementInfoColl, stripAllocationType, stripParsingDirection);
108 }
109 
110 template <typename TProcessor, typename InputDataType, typename TAttribute>
111 inline bool
113 {
114  // check for consistency between processor and attribute
116  "This attribute is not part of processor class");
117 
118  return dynamic_cast<const TProcessor*>(&processor) != 0;
119 }
120 
121 template <typename TProcessor, typename InputDataType, typename TAttribute>
122 inline BoolResult
124  const boost::shared_ptr<OutputType>& pImageZStrip3d)
125 {
126  // cast of input processor object
127  TProcessor& tProcessor = static_cast<TProcessor&>(processor);
128 
129  // update of processor attribute value
130  tProcessor.TProcessor::template set<TAttribute>(pImageZStrip3d);
131 
132  return true;
133 }
134 
137 
138 } // end of namespace imaproc
139 } // end of namespace ipsdk
140 
141 #endif // __IPSDKIMAGEPROCESSING_STATICIMAGEZSTRIP3DSPLIT_H__
const std::string & getAttributeName() const
retrieve attribute name associated to split operation
Definition: StaticImageZStrip3dSplit.h:87
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 boost::shared_ptr< InputDataType > &pImage, const ElementsRangeColl &planElementInfoColl, const image::eStripAllocationType &stripAllocationType, const image::eStripParsingDirection &stripParsingDirection)
initialization method for splitted objects
Definition: StaticImageZStrip3dSplit.h:101
std::vector< ElementsRange > ElementsRangeColl
collection of strip split element informations
Definition: StaticImageStripSplitTypes.h:49
bool checkProcessorType(const processor::BaseProcessor &processor)
check processor type in derived class
Definition: StaticImageZStrip3dSplit.h:112
TProcessor ProcessorType
processor type associated to object
Definition: StaticImageZStrip3dSplit.h:33
Concrete class for static split operation generating image z strips 3d.
Definition: StaticImageZStrip3dSplit.h:27
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
eStripAllocationType
Enumerate describing image strip allocation policy.
Definition: ImageStripTypes.h:88
const std::string & getAttributeToolTip() const
retrieve attribute tooltip associated to split operation
Definition: StaticImageZStrip3dSplit.h:94
BoolResult processAttribute(processor::BaseProcessor &processor, const boost::shared_ptr< OutputType > &pImageZStrip3d)
initialize processor attribute associate to split operation for a given element index ...
Definition: StaticImageZStrip3dSplit.h:123
TAttribute::ValueType OutputType
output data type for split operation
Definition: StaticImageZStrip3dSplit.h:39
Base class for static split operation generating image z strips 3d.
Definition: BaseStaticImageZStrip3dSplit.h:33
eStripParsingDirection
Enumerate describing strip parsing direction.
Definition: ImageStripTypes.h:72
TAttribute AttributeType
attribute type associated to object
Definition: StaticImageZStrip3dSplit.h:36