IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
StaticImageZStrip3dWithKernelSplit.h
1 // StaticImageZStrip3dWithKernelSplit.h:
3 // -------------------------------------
4 //
15 
16 #ifndef __IPSDKIMAGEPROCESSING_STATICIMAGEZSTRIP3DWITHKERNELSPLIT_H__
17 #define __IPSDKIMAGEPROCESSING_STATICIMAGEZSTRIP3DWITHKERNELSPLIT_H__
18 
19 #include <IPSDKImageProcessing/DataSplit/StaticStrip/ZStrip3dWithKernel/BaseStaticImageZStrip3dWithKernelSplit.h>
20 
21 namespace ipsdk {
22 namespace imaproc {
23 
26 
27 template <typename TProcessor, typename InputDataType, typename TAttribute>
29  typename TAttribute::ValueType>
30 {
31 // predefined public types
32 public:
34  typedef TProcessor ProcessorType;
35 
37  typedef TAttribute AttributeType;
38 
40  typedef typename TAttribute::ValueType OutputType;
41 
42 public:
48 
49 // methods
50 public:
52  const std::string& getAttributeName() const;
53 
55  const std::string& getAttributeToolTip() const;
56 
75  void init(const boost::shared_ptr<InputDataType>& pImage,
76  const ElementsRangeColl& planElementInfoColl,
77  const KernelXYZ& kernelXYZ,
78  const image::eStripAllocationType& stripAllocationType,
79  const image::eStripParsingDirection& stripParsingDirection);
80 
99  void init(const boost::shared_ptr<InputDataType>& pImage,
100  const ElementsRangeColl& planElementInfoColl,
101  const StructuringElementXYZ& structuringElementXYZ,
102  const image::eStripAllocationType& stripAllocationType,
103  const image::eStripParsingDirection& stripParsingDirection);
104 
123  void init(const boost::shared_ptr<InputDataType>& pImage,
124  const ElementsRangeColl& planElementInfoColl,
125  const ipUInt64 startingKernelSizeX,
126  const ipUInt64 endingKernelSizeX,
127  const ipUInt64 startingKernelSizeY,
128  const ipUInt64 endingKernelSizeY,
129  const ipUInt64 startingKernelSizeZ,
130  const ipUInt64 endingKernelSizeZ,
131  const image::eStripAllocationType& stripAllocationType,
132  const image::eStripParsingDirection& stripParsingDirection);
133 
134 protected:
136  bool checkProcessorType(const processor::BaseProcessor& processor);
137 
142  const boost::shared_ptr<OutputType>& pImageZStrip3dWithKernel);
143 
144 // attributes
145 protected:
146 
147 };
148 
151 
152 template <typename TProcessor, typename InputDataType, typename TAttribute>
153 inline const std::string&
155 {
156  return TAttribute::getObjectNameStr();
157 }
158 
159 template <typename TProcessor, typename InputDataType, typename TAttribute>
160 inline const std::string&
162 {
163  return TAttribute::getToolTipStr();
164 }
165 
166 template <typename TProcessor, typename InputDataType, typename TAttribute>
167 inline void
169  const ElementsRangeColl& planElementInfoColl,
170  const KernelXYZ& kernelXYZ,
171  const image::eStripAllocationType& stripAllocationType,
172  const image::eStripParsingDirection& stripParsingDirection)
173 {
174  // call of base class initialization method
175  this->initBase(pImage, planElementInfoColl,
176  kernelXYZ,
177  stripAllocationType, stripParsingDirection);
178 }
179 
180 template <typename TProcessor, typename InputDataType, typename TAttribute>
181 inline void
183  const ElementsRangeColl& planElementInfoColl,
184  const StructuringElementXYZ& structuringElementXYZ,
185  const image::eStripAllocationType& stripAllocationType,
186  const image::eStripParsingDirection& stripParsingDirection)
187 {
188  // call of base class initialization method
189  this->initBase(pImage, planElementInfoColl,
190  structuringElementXYZ,
191  stripAllocationType, stripParsingDirection);
192 }
193 
194 template <typename TProcessor, typename InputDataType, typename TAttribute>
195 inline void
197  const ElementsRangeColl& planElementInfoColl,
198  const ipUInt64 startingKernelSizeX,
199  const ipUInt64 endingKernelSizeX,
200  const ipUInt64 startingKernelSizeY,
201  const ipUInt64 endingKernelSizeY,
202  const ipUInt64 startingKernelSizeZ,
203  const ipUInt64 endingKernelSizeZ,
204  const image::eStripAllocationType& stripAllocationType,
205  const image::eStripParsingDirection& stripParsingDirection)
206 {
207  // call of base class initialization method
208  this->initBase(pImage, planElementInfoColl,
209  startingKernelSizeX, endingKernelSizeX,
210  startingKernelSizeY, endingKernelSizeY,
211  startingKernelSizeZ, endingKernelSizeZ,
212  stripAllocationType, stripParsingDirection);
213 }
214 
215 template <typename TProcessor, typename InputDataType, typename TAttribute>
216 inline bool
218 {
219  // check for consistency between processor and attribute
221  "This attribute is not part of processor class");
222 
223  return dynamic_cast<const TProcessor*>(&processor) != 0;
224 }
225 
226 template <typename TProcessor, typename InputDataType, typename TAttribute>
227 inline BoolResult
229  const boost::shared_ptr<OutputType>& pImageZStrip3dWithKernel)
230 {
231  // cast of input processor object
232  TProcessor& tProcessor = static_cast<TProcessor&>(processor);
233 
234  // update of processor attribute value
235  tProcessor.TProcessor::template set<TAttribute>(pImageZStrip3dWithKernel);
236 
237  return true;
238 }
239 
242 
243 } // end of namespace imaproc
244 } // end of namespace ipsdk
245 
246 #endif // __IPSDKIMAGEPROCESSING_STATICIMAGEZSTRIP3DWITHKERNELSPLIT_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
void init(const boost::shared_ptr< InputDataType > &pImage, const ElementsRangeColl &planElementInfoColl, const KernelXYZ &kernelXYZ, const image::eStripAllocationType &stripAllocationType, const image::eStripParsingDirection &stripParsingDirection)
base class initialization method
Definition: StaticImageZStrip3dWithKernelSplit.h:168
std::vector< ElementsRange > ElementsRangeColl
collection of strip split element informations
Definition: StaticImageStripSplitTypes.h:49
TAttribute AttributeType
attribute type associated to object
Definition: StaticImageZStrip3dWithKernelSplit.h:37
TProcessor ProcessorType
processor type associated to object
Definition: StaticImageZStrip3dWithKernelSplit.h:34
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
const std::string & getAttributeName() const
retrieve attribute name associated to split operation
Definition: StaticImageZStrip3dWithKernelSplit.h:154
bool checkProcessorType(const processor::BaseProcessor &processor)
check processor type in derived class
Definition: StaticImageZStrip3dWithKernelSplit.h:217
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: StaticImageZStrip3dWithKernelSplit.h:161
BoolResult processAttribute(processor::BaseProcessor &processor, const boost::shared_ptr< OutputType > &pImageZStrip3dWithKernel)
initialize processor attribute associate to split operation for a given element index ...
Definition: StaticImageZStrip3dWithKernelSplit.h:228
Concrete class for static split operation generating image z strips 3d associated to a kernel...
Definition: StaticImageZStrip3dWithKernelSplit.h:28
Class encapsulating a 3d structuring element spanning along x, y and z axis.
Definition: StructuringElementXYZ.h:35
TAttribute::ValueType OutputType
output data type for split operation
Definition: StaticImageZStrip3dWithKernelSplit.h:40
eStripParsingDirection
Enumerate describing strip parsing direction.
Definition: ImageStripTypes.h:72
Base class for static split operation generating image z strips 3d associated to a kernel...
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:38
Class encapsulating a 3d kernel spanning along x, y and z axis.
Definition: KernelXYZ.h:34