IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ImageZStrip3dWithKernelSplit.h
1 // ImageZStrip3dWithKernelSplit.h:
3 // -------------------------------
4 //
15 
16 #ifndef __IPSDKIMAGEPROCESSING_IMAGEZSTRIP3DWITHKERNELSPLIT_H__
17 #define __IPSDKIMAGEPROCESSING_IMAGEZSTRIP3DWITHKERNELSPLIT_H__
18 
19 #include <IPSDKImageProcessing/DataSplit/Strip/ZStrip3dWithKernel/BaseImageZStrip3dWithKernelSplit.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 
72  void init(const boost::shared_ptr<InputDataType>& pImage,
73  const KernelXYZ& kernelXYZ,
74  const image::eStripAllocationType& stripAllocationType,
75  const image::eStripParsingDirection& stripParsingDirection);
76 
92  void init(const boost::shared_ptr<InputDataType>& pImage,
93  const StructuringElementXYZ& structuringElementXYZ,
94  const image::eStripAllocationType& stripAllocationType,
95  const image::eStripParsingDirection& stripParsingDirection);
96 
112  void init(const boost::shared_ptr<InputDataType>& pImage,
113  const ipUInt64 startingKernelSizeX,
114  const ipUInt64 endingKernelSizeX,
115  const ipUInt64 startingKernelSizeY,
116  const ipUInt64 endingKernelSizeY,
117  const ipUInt64 startingKernelSizeZ,
118  const ipUInt64 endingKernelSizeZ,
119  const image::eStripAllocationType& stripAllocationType,
120  const image::eStripParsingDirection& stripParsingDirection);
121 
122 protected:
124  bool checkProcessorType(const processor::BaseProcessor& processor);
125 
130  const boost::shared_ptr<OutputType>& pImageZStrip3dWithKernel);
131 
132 // attributes
133 protected:
134 
135 };
136 
139 
140 template <typename TProcessor, typename InputDataType, typename TAttribute>
141 inline const std::string&
143 {
144  return TAttribute::getObjectNameStr();
145 }
146 
147 template <typename TProcessor, typename InputDataType, typename TAttribute>
148 inline const std::string&
150 {
151  return TAttribute::getToolTipStr();
152 }
153 
154 template <typename TProcessor, typename InputDataType, typename TAttribute>
155 inline void
157  const KernelXYZ& kernelXYZ,
158  const image::eStripAllocationType& stripAllocationType,
159  const image::eStripParsingDirection& stripParsingDirection)
160 {
161  // call of base class initialization method
162  this->initBase(pImage,
163  kernelXYZ,
164  stripAllocationType, stripParsingDirection);
165 }
166 
167 template <typename TProcessor, typename InputDataType, typename TAttribute>
168 inline void
170  const StructuringElementXYZ& structuringElementXYZ,
171  const image::eStripAllocationType& stripAllocationType,
172  const image::eStripParsingDirection& stripParsingDirection)
173 {
174  // call of base class initialization method
175  this->initBase(pImage,
176  structuringElementXYZ,
177  stripAllocationType, stripParsingDirection);
178 }
179 
180 template <typename TProcessor, typename InputDataType, typename TAttribute>
181 inline void
183  const ipUInt64 startingKernelSizeX,
184  const ipUInt64 endingKernelSizeX,
185  const ipUInt64 startingKernelSizeY,
186  const ipUInt64 endingKernelSizeY,
187  const ipUInt64 startingKernelSizeZ,
188  const ipUInt64 endingKernelSizeZ,
189  const image::eStripAllocationType& stripAllocationType,
190  const image::eStripParsingDirection& stripParsingDirection)
191 {
192  // call of base class initialization method
193  this->initBase(pImage,
194  startingKernelSizeX, endingKernelSizeX,
195  startingKernelSizeY, endingKernelSizeY,
196  startingKernelSizeZ, endingKernelSizeZ,
197  stripAllocationType, stripParsingDirection);
198 }
199 
200 template <typename TProcessor, typename InputDataType, typename TAttribute>
201 inline bool
203 {
204  // check for consistency between processor and attribute
206  "This attribute is not part of processor class");
207 
208  return dynamic_cast<const TProcessor*>(&processor) != 0;
209 }
210 
211 template <typename TProcessor, typename InputDataType, typename TAttribute>
212 inline BoolResult
214  const boost::shared_ptr<OutputType>& pImageZStrip3dWithKernel)
215 {
216  // cast of input processor object
217  TProcessor& tProcessor = static_cast<TProcessor&>(processor);
218 
219  // update of processor attribute value
220  tProcessor.TProcessor::template set<TAttribute>(pImageZStrip3dWithKernel);
221 
222  return true;
223 }
224 
227 
228 } // end of namespace imaproc
229 } // end of namespace ipsdk
230 
231 #endif // __IPSDKIMAGEPROCESSING_IMAGEZSTRIP3DWITHKERNELSPLIT_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
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
BoolResult processAttribute(processor::BaseProcessor &processor, const boost::shared_ptr< OutputType > &pImageZStrip3dWithKernel)
initialize processor attribute associate to split operation for a given element index ...
Definition: ImageZStrip3dWithKernelSplit.h:213
TAttribute AttributeType
attribute type associated to object
Definition: ImageZStrip3dWithKernelSplit.h:37
const std::string & getAttributeName() const
retrieve attribute name associated to split operation
Definition: ImageZStrip3dWithKernelSplit.h:142
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
Concrete class for split operation generating image z strips 3d associated to a kernel.
Definition: ImageZStrip3dWithKernelSplit.h:28
Class encapsulating a 3d structuring element spanning along x, y and z axis.
Definition: StructuringElementXYZ.h:35
eStripParsingDirection
Enumerate describing strip parsing direction.
Definition: ImageStripTypes.h:72
Base class for split operation generating image z strips 3d associated to a kernel.
Definition: BaseImageZStrip3dWithKernelSplit.h:38
bool checkProcessorType(const processor::BaseProcessor &processor)
check processor type in derived class
Definition: ImageZStrip3dWithKernelSplit.h:202
const std::string & getAttributeToolTip() const
retrieve attribute tooltip associated to split operation
Definition: ImageZStrip3dWithKernelSplit.h:149
TProcessor ProcessorType
processor type associated to object
Definition: ImageZStrip3dWithKernelSplit.h:34
Class encapsulating a 3d kernel spanning along x, y and z axis.
Definition: KernelXYZ.h:34
TAttribute::ValueType OutputType
output data type for split operation
Definition: ImageZStrip3dWithKernelSplit.h:40
void init(const boost::shared_ptr< InputDataType > &pImage, const KernelXYZ &kernelXYZ, const image::eStripAllocationType &stripAllocationType, const image::eStripParsingDirection &stripParsingDirection)
initialization method for splitted objects
Definition: ImageZStrip3dWithKernelSplit.h:156