IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseStaticImageZStrip3dWithKernelSplit.h
1 // BaseStaticImageZStrip3dWithKernelSplit.h:
3 // -----------------------------------------
4 //
15 
16 #ifndef __IPSDKIMAGEPROCESSING_BASESTATICIMAGEZSTRIP3DWITHKERNELSPLIT_H__
17 #define __IPSDKIMAGEPROCESSING_BASESTATICIMAGEZSTRIP3DWITHKERNELSPLIT_H__
18 
19 // suppression warnings
20 // warning C4251: 'ipsdk::imaproc::BaseStaticImageZStrip3dWithKernelSplit<InputDataType,OutputDataType>::_stripParsingDirection' : class 'ipsdk::image::eStripParsingDirection' needs to have dll-interface to be used by clients of class 'ipsdk::imaproc::BaseStaticImageZStrip3dWithKernelSplit<InputDataType,OutputDataType>'
21 #pragma warning (push)
22 #pragma warning (disable : 4251)
23 
24 #include <IPSDKImageProcessing/DataSplit/StaticStrip/BaseStaticImageStripSplit.h>
28 #include <boost/thread/mutex.hpp>
29 #include <map>
30 
31 namespace ipsdk {
32 namespace imaproc {
33 
36 
37 template <typename InputDataType, typename OutputDataType>
39 {
40 // predefined public types
41 public:
43  typedef OutputDataType OutputType;
44 
46  typedef typename OutputDataType::BorderStorageType BorderStorageType;
47 
49  typedef std::map<ElementsRange, BorderStorageType> BorderStorageMap;
50 
51 public:
57 
58 // methods
59 public:
62  {
64  }
65 
70  ipUInt64 getKernelSizeX() const;
71  ipUInt64 getKernelSizeY() const;
72  ipUInt64 getKernelSizeZ() const;
74 
79  ipUInt64 getStartingKernelSizeX() const;
80  ipUInt64 getStartingKernelSizeY() const;
81  ipUInt64 getStartingKernelSizeZ() const;
83 
88  ipUInt64 getEndingKernelSizeX() const;
89  ipUInt64 getEndingKernelSizeY() const;
90  ipUInt64 getEndingKernelSizeZ() const;
92 
93 protected:
96  virtual BoolResult processAttribute(processor::BaseProcessor& processor,
97  const boost::shared_ptr<OutputDataType>& pImageZStrip3dWithKernel) = 0;
98 
102  BoolResult extractStrip(const ipUInt64 stripStartingOffsetZ,
103  const ipUInt64 stripSizeZ,
104  const image::BaseImage& image,
105  const core::BaseRequestOrigin& requestOrigin,
106  BorderStorageType& pStrip,
107  BorderStorageMap& stripMap);
108 
112  BoolResult storeStrip(const ipUInt64 stripStartingOffsetZ,
113  const ipUInt64 stripSizeZ,
114  const image::BaseImage& image,
115  const core::BaseRequestOrigin& requestOrigin,
116  BorderStorageMap& stripMap);
117 
136  void initBase(const boost::shared_ptr<InputDataType>& pImage,
137  const ElementsRangeColl& planElementInfoColl,
138  const KernelXYZ& kernelXYZ,
139  const image::eStripAllocationType& stripAllocationType,
140  const image::eStripParsingDirection& stripParsingDirection);
141 
160  void initBase(const boost::shared_ptr<InputDataType>& pImage,
161  const ElementsRangeColl& planElementInfoColl,
162  const StructuringElementXYZ& structuringElementXYZ,
163  const image::eStripAllocationType& stripAllocationType,
164  const image::eStripParsingDirection& stripParsingDirection);
165 
184  void initBase(const boost::shared_ptr<InputDataType>& pImage,
185  const ElementsRangeColl& planElementInfoColl,
186  const ipUInt64 startingKernelSizeX,
187  const ipUInt64 endingKernelSizeX,
188  const ipUInt64 startingKernelSizeY,
189  const ipUInt64 endingKernelSizeY,
190  const ipUInt64 startingKernelSizeZ,
191  const ipUInt64 endingKernelSizeZ,
192  const image::eStripAllocationType& stripAllocationType,
193  const image::eStripParsingDirection& stripParsingDirection);
194 
195 private:
199  BoolResult processAttribute(processor::BaseProcessor& processor,
200  const ipUInt32 elementIdx,
201  const core::BaseRequestOrigin& requestOrigin);
202 
203 // attributes
204 protected:
207 
210 
214 
217 
220 
223 
226 
229 
232 
236 
240 
242  boost::mutex _mutex;
243 };
244 
247 
248 } // end of namespace imaproc
249 } // end of namespace ipsdk
250 
251 #pragma warning (pop)
252 
253 #endif // __IPSDKIMAGEPROCESSING_BASESTATICIMAGEZSTRIP3DWITHKERNELSPLIT_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::mutex _mutex
mutex used to prevent concurrent accesses
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:242
std::vector< ElementsRange > ElementsRangeColl
collection of strip split element informations
Definition: StaticImageStripSplitTypes.h:49
eStaticImageStripSplitType
Enumerate describing static image sstrip split type.
Definition: StaticImageStripSplitTypes.h:35
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
OutputDataType::BorderStorageType BorderStorageType
border strip storage type
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:46
OutputDataType OutputType
output data type for split operation
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:43
BorderStorageMap _endingInternalStripsMap
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:239
eStaticImageStripSplitType getStaticImageStripSplitType() const
retrieve static image strip split operation type
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:61
image::eStripAllocationType _stripAllocationType
flag indicating whether splitted strip allocation should be forced
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:209
ipUInt64 _endingKernelSizeY
starting kernel size along Y direction associated to object
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:225
std::map< ElementsRange, BorderStorageType > BorderStorageMap
collection of border strip index by range
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:49
ipUInt64 _startingKernelSizeZ
starting kernel size along Z direction associated to object
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:228
Base class for processor class.
Definition: BaseProcessor.h:43
eStripAllocationType
Enumerate describing image strip allocation policy.
Definition: ImageStripTypes.h:88
ipUInt64 _startingKernelSizeY
starting kernel size along Y direction associated to object
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:222
ipUInt64 _startingKernelSizeX
starting kernel size along X direction associated to object
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:216
Static split operation generating image 3d strip with splitting along Z axis associated to a kernel...
Definition: StaticImageStripSplitTypes.h:41
#define IPSDKIMAGEPROCESSING_API
Import/Export macro for library IPSDKImageProcessing.
Definition: IPSDKImageProcessingExports.h:25
Predefined types for image strips management.
BorderStorageMap _startingInternalStripsMap
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:235
Base class for static image strip split operations for data dispatch.
Definition: BaseStaticImageStripSplit.h:36
Base class for request origin description.
Definition: BaseRequestOrigin.h:28
Predefined types for structuring element management.
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 static split operation generating image z strips 3d associated to a kernel...
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:38
ipUInt64 _endingKernelSizeX
starting kernel size along X direction associated to object
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:219
Base class for images data type.
Definition: BaseImage.h:43
Predefined types for kernel management.
image::eStripParsingDirection _stripParsingDirection
strip parsing direction associated to attribute
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:206
ipUInt64 _endingKernelSizeZ
starting kernel size along Z direction associated to object
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:231
ElementsRangeColl _planElementInfoColl
Definition: BaseStaticImageZStrip3dWithKernelSplit.h:213
Class encapsulating a 3d kernel spanning along x, y and z axis.
Definition: KernelXYZ.h:34
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53