IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PreviousImageZStrip3dSplit.h
1 // PreviousImageZStrip3dSplit.h:
3 // -----------------------------
4 //
20 
21 #ifndef __IPSDKIMAGEPROCESSING_PREVIOUSIMAGEZSTRIP3DSPLIT_H__
22 #define __IPSDKIMAGEPROCESSING_PREVIOUSIMAGEZSTRIP3DSPLIT_H__
23 
24 #include <IPSDKImageProcessing/DataSplit/Strip/PreviousZStrip3d/BasePreviousImageZStrip3dSplit.h>
25 
26 namespace ipsdk {
27 namespace imaproc {
28 
31 
32 template <typename TProcessor, typename InputDataType, typename TAttribute>
34  typename TAttribute::ValueType>
35 {
36 // predefined public types
37 public:
39  typedef TProcessor ProcessorType;
40 
42  typedef TAttribute AttributeType;
43 
45  typedef typename TAttribute::ValueType OutputType;
46 
47 public:
53 
54 // methods
55 public:
57  const std::string& getAttributeName() const;
58 
60  const std::string& getAttributeToolTip() const;
61 
67  void init(const boost::shared_ptr<InputDataType>& pImage,
68  const image::eStripParsingDirection& stripParsingDirection);
69 
70 protected:
72  bool checkProcessorType(const processor::BaseProcessor& processor);
73 
78  const boost::shared_ptr<OutputType>& pImageZStrip3d);
79 
80 // attributes
81 protected:
82 
83 };
84 
87 
88 template <typename TProcessor, typename InputDataType, typename TAttribute>
89 inline const std::string&
91 {
92  return TAttribute::getObjectNameStr();
93 }
94 
95 template <typename TProcessor, typename InputDataType, typename TAttribute>
96 inline const std::string&
98 {
99  return TAttribute::getToolTipStr();
100 }
101 
102 template <typename TProcessor, typename InputDataType, typename TAttribute>
103 inline void
104 PreviousImageZStrip3dSplit<TProcessor, InputDataType, TAttribute>::init(const boost::shared_ptr<InputDataType>& pImage,
105  const image::eStripParsingDirection& stripParsingDirection)
106 {
107  // call of base class initialization method
108  this->initBase(pImage, stripParsingDirection);
109 }
110 
111 template <typename TProcessor, typename InputDataType, typename TAttribute>
112 inline bool
114 {
115  // check for consistency between processor and attribute
117  "This attribute is not part of processor class");
118 
119  return dynamic_cast<const TProcessor*>(&processor) != 0;
120 }
121 
122 template <typename TProcessor, typename InputDataType, typename TAttribute>
123 inline BoolResult
125  const boost::shared_ptr<OutputType>& pImageZStrip3d)
126 {
127  // cast of input processor object
128  TProcessor& tProcessor = static_cast<TProcessor&>(processor);
129 
130  // update of processor attribute value
131  tProcessor.TProcessor::template set<TAttribute>(pImageZStrip3d);
132 
133  return true;
134 }
135 
138 
139 } // end of namespace imaproc
140 } // end of namespace ipsdk
141 
142 #endif // __IPSDKIMAGEPROCESSING_PREVIOUSIMAGEZSTRIP3DSPLIT_H__
Class allowing to encapsulate a typed process result associated to a string description.
Definition: ProcessingResult.h:28
TProcessor ProcessorType
processor type associated to object
Definition: PreviousImageZStrip3dSplit.h:39
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
const std::string & getAttributeToolTip() const
retrieve attribute tooltip associated to split operation
Definition: PreviousImageZStrip3dSplit.h:97
const std::string & getAttributeName() const
retrieve attribute name associated to split operation
Definition: PreviousImageZStrip3dSplit.h:90
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
bool checkProcessorType(const processor::BaseProcessor &processor)
check processor type in derived class
Definition: PreviousImageZStrip3dSplit.h:113
TAttribute AttributeType
attribute type associated to object
Definition: PreviousImageZStrip3dSplit.h:42
Concrete class for split operation allowing to generate z strips 3d :
Definition: PreviousImageZStrip3dSplit.h:33
eStripParsingDirection
Enumerate describing strip parsing direction.
Definition: ImageStripTypes.h:72
BoolResult processAttribute(processor::BaseProcessor &processor, const boost::shared_ptr< OutputType > &pImageZStrip3d)
initialize processor attribute associate to split operation for a given element index ...
Definition: PreviousImageZStrip3dSplit.h:124
Base class for split operation allowing to generate z strips 3d :
Definition: BasePreviousImageZStrip3dSplit.h:40
void init(const boost::shared_ptr< InputDataType > &pImage, const image::eStripParsingDirection &stripParsingDirection)
initialization method for splitted objects
Definition: PreviousImageZStrip3dSplit.h:104
TAttribute::ValueType OutputType
output data type for split operation
Definition: PreviousImageZStrip3dSplit.h:45