IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
StaticImageStripSplitOperators.h
Go to the documentation of this file.
1 // StaticImageStripSplitOperators.h:
3 // ---------------------------------
4 //
14 
15 #ifndef __IPSDKIMAGEPROCESSING_STATICIMAGESTRIPSPLITOPERATORS_H__
16 #define __IPSDKIMAGEPROCESSING_STATICIMAGESTRIPSPLITOPERATORS_H__
17 
19 #include <IPSDKImageProcessing/DataSplit/StaticStrip/YStrip2d/StaticImageYStrip2dSplit.h>
20 #include <IPSDKImageProcessing/DataSplit/StaticStrip/ZStrip3d/StaticImageZStrip3dSplit.h>
21 #include <IPSDKImageProcessing/DataSplit/StaticStrip/ZStrip3dWithKernel/StaticImageZStrip3dWithKernelSplit.h>
22 #include <boost/mpl/if.hpp>
23 #include <boost/mpl/bool.hpp>
24 #include <boost/make_shared.hpp>
25 
26 namespace ipsdk {
27 namespace imaproc {
28 
31 
34 template <typename TProcessor, typename TAttribute>
35 inline boost::shared_ptr<StaticImageYStrip2dSplit<TProcessor, image::BaseImage, TAttribute> >
37  const ElementsRangeColl& rowElementInfoColl,
40 {
42  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
43  pDataSplit->init(pImage, rowElementInfoColl, stripAllocationType, stripParsingDirection);
44 
45  return pDataSplit;
46 }
47 template <typename TProcessor, typename TAttribute>
48 inline boost::shared_ptr<StaticImageYStrip2dSplit<TProcessor, const image::BaseImage, TAttribute> >
50  const ElementsRangeColl& rowElementInfoColl,
53 {
55  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
56  pDataSplit->init(pImage, rowElementInfoColl, stripAllocationType, stripParsingDirection);
57 
58  return pDataSplit;
59 }
60 template <typename TProcessor, typename TAttribute, typename TInputAttribute>
61 inline boost::shared_ptr<StaticImageYStrip2dSplit<TProcessor,
62  typename boost::mpl::if_<boost::mpl::bool_<TInputAttribute::g_bOutput>,
64  const image::BaseImage
65  >::type,
66  TAttribute> >
67 staticYStrip2dSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
68  const ElementsRangeColl& rowElementInfoColl,
71 {
72  return staticYStrip2dSplit<TProcessor, TAttribute>(pInputAttribute->getStorage(), rowElementInfoColl, stripAllocationType, stripParsingDirection);
73 }
75 
78 template <typename TProcessor, typename TAttribute>
79 inline boost::shared_ptr<StaticImageZStrip3dSplit<TProcessor, image::BaseImage, TAttribute> >
81  const ElementsRangeColl& planElementInfoColl,
84 {
86  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
87  pDataSplit->init(pImage, planElementInfoColl, stripAllocationType, stripParsingDirection);
88 
89  return pDataSplit;
90 }
91 template <typename TProcessor, typename TAttribute>
92 inline boost::shared_ptr<StaticImageZStrip3dSplit<TProcessor, const image::BaseImage, TAttribute> >
94  const ElementsRangeColl& planElementInfoColl,
97 {
99  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
100  pDataSplit->init(pImage, planElementInfoColl, stripAllocationType, stripParsingDirection);
101 
102  return pDataSplit;
103 }
104 template <typename TProcessor, typename TAttribute, typename TInputAttribute>
105 inline boost::shared_ptr<StaticImageZStrip3dSplit<TProcessor,
106  typename boost::mpl::if_<boost::mpl::bool_<TInputAttribute::g_bOutput>,
108  const image::BaseImage
109  >::type,
110  TAttribute> >
111 staticZStrip3dSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
112  const ElementsRangeColl& planElementInfoColl,
115 {
116  return staticZStrip3dSplit<TProcessor, TAttribute>(pInputAttribute->getStorage(), planElementInfoColl, stripAllocationType, stripParsingDirection);
117 }
119 
122 template <typename TProcessor, typename TAttribute>
123 inline boost::shared_ptr<StaticImageZStrip3dWithKernelSplit<TProcessor, const image::BaseImage, TAttribute> >
125  const ElementsRangeColl& planElementInfoColl,
126  const KernelXYZ& kernelXYZ,
129 {
131  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
132  pDataSplit->init(pImage, planElementInfoColl, kernelXYZ, stripAllocationType, stripParsingDirection);
133 
134  return pDataSplit;
135 }
136 template <typename TProcessor, typename TAttribute>
137 inline boost::shared_ptr<StaticImageZStrip3dWithKernelSplit<TProcessor, const image::BaseImage, TAttribute> >
139  const ElementsRangeColl& planElementInfoColl,
140  const StructuringElementXYZ& structuringElementXYZ,
143 {
145  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
146  pDataSplit->init(pImage, planElementInfoColl, structuringElementXYZ, stripAllocationType, stripParsingDirection);
147 
148  return pDataSplit;
149 }
150 template <typename TProcessor, typename TAttribute>
151 inline boost::shared_ptr<StaticImageZStrip3dWithKernelSplit<TProcessor, const image::BaseImage, TAttribute> >
153  const ElementsRangeColl& planElementInfoColl,
154  const ipUInt32 startingKernelSizeX,
155  const ipUInt32 endingKernelSizeX,
156  const ipUInt32 startingKernelSizeY,
157  const ipUInt32 endingKernelSizeY,
158  const ipUInt32 startingKernelSizeZ,
159  const ipUInt32 endingKernelSizeZ,
162 {
164  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
165  pDataSplit->init(pImage, planElementInfoColl, startingKernelSizeX, endingKernelSizeX, startingKernelSizeY, endingKernelSizeY, startingKernelSizeZ, endingKernelSizeZ, stripAllocationType, stripParsingDirection);
166 
167  return pDataSplit;
168 }
169 template <typename TProcessor, typename TAttribute, typename TInputAttribute>
170 inline boost::shared_ptr<StaticImageZStrip3dWithKernelSplit<TProcessor,
171  typename boost::mpl::if_<boost::mpl::bool_<TInputAttribute::g_bOutput>,
173  const image::BaseImage
174  >::type,
175  TAttribute> >
176 staticZStrip3dWithKernelSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
177  const ElementsRangeColl& planElementInfoColl,
178  const KernelXYZ& kernelXYZ,
181 {
182  return staticZStrip3dWithKernelSplit<TProcessor, TAttribute>(pInputAttribute->getStorage(), planElementInfoColl, kernelXYZ, stripAllocationType, stripParsingDirection);
183 }
184 template <typename TProcessor, typename TAttribute, typename TInputAttribute>
185 inline boost::shared_ptr<StaticImageZStrip3dWithKernelSplit<TProcessor,
186  typename boost::mpl::if_<boost::mpl::bool_<TInputAttribute::g_bOutput>,
188  const image::BaseImage
189  >::type,
190  TAttribute> >
191 staticZStrip3dWithKernelSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
192  const ElementsRangeColl& planElementInfoColl,
193  const StructuringElementXYZ& structuringElementXYZ,
196 {
197  return staticZStrip3dWithKernelSplit<TProcessor, TAttribute>(pInputAttribute->getStorage(), planElementInfoColl, structuringElementXYZ, stripAllocationType, stripParsingDirection);
198 }
199 template <typename TProcessor, typename TAttribute, typename TInputAttribute>
200 inline boost::shared_ptr<StaticImageZStrip3dWithKernelSplit<TProcessor,
201  typename boost::mpl::if_<boost::mpl::bool_<TInputAttribute::g_bOutput>,
203  const image::BaseImage
204  >::type,
205  TAttribute> >
206 staticZStrip3dWithKernelSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
207  const ElementsRangeColl& planElementInfoColl,
208  const ipUInt32 startingKernelSizeX,
209  const ipUInt32 endingKernelSizeX,
210  const ipUInt32 startingKernelSizeY,
211  const ipUInt32 endingKernelSizeY,
212  const ipUInt32 startingKernelSizeZ,
213  const ipUInt32 endingKernelSizeZ,
216 {
217  return staticZStrip3dWithKernelSplit<TProcessor, TAttribute>(pInputAttribute->getStorage(), planElementInfoColl, startingKernelSizeX, endingKernelSizeX, startingKernelSizeY, endingKernelSizeY, startingKernelSizeZ, endingKernelSizeZ, stripAllocationType, stripParsingDirection);
218 }
220 
223 
224 } // end of namespace imaproc
225 } // end of namespace ipsdk
226 
227 #endif // __IPSDKIMAGEPROCESSING_STATICIMAGESTRIPSPLITOPERATORS_H__
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
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
boost::shared_ptr< StaticImageZStrip3dWithKernelSplit< TProcessor, const image::BaseImage, TAttribute > > staticZStrip3dWithKernelSplit(const image::ImageConstPtr &pImage, const ElementsRangeColl &planElementInfoColl, const KernelXYZ &kernelXYZ, const image::eStripAllocationType &stripAllocationType=image::eStripAllocationType::eSAT_NoAllocation, const image::eStripParsingDirection &stripParsingDirection=image::eStripParsingDirection::eSPD_Direct)
Definition: StaticImageStripSplitOperators.h:124
boost::shared_ptr< BaseImage > ImagePtr
Definition: ImageTypes.h:139
Concrete class for static split operation generating image z strips 3d.
Definition: StaticImageZStrip3dSplit.h:27
eStripAllocationType
Enumerate describing image strip allocation policy.
Definition: ImageStripTypes.h:88
boost::shared_ptr< StaticImageZStrip3dSplit< TProcessor, image::BaseImage, TAttribute > > staticZStrip3dSplit(const image::ImagePtr &pImage, const ElementsRangeColl &planElementInfoColl, const image::eStripAllocationType &stripAllocationType=image::eStripAllocationType::eSAT_NoAllocation, const image::eStripParsingDirection &stripParsingDirection=image::eStripParsingDirection::eSPD_Direct)
Definition: StaticImageStripSplitOperators.h:80
direct strip parsing direction (default behavior)
Definition: ImageStripTypes.h:76
Concrete class for static split operation generating image z strips 3d associated to a kernel...
Definition: StaticImageZStrip3dWithKernelSplit.h:28
void init(const boost::shared_ptr< InputDataType > &pImage, const ElementsRangeColl &rowElementInfoColl, const image::eStripAllocationType &stripAllocationType, const image::eStripParsingDirection &stripParsingDirection)
initialization method for splitted objects
Definition: StaticImageYStrip2dSplit.h:101
boost::shared_ptr< const BaseImage > ImageConstPtr
Definition: ImageTypes.h:140
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
Concrete class for static split operation generating image y strips 2d.
Definition: StaticImageYStrip2dSplit.h:27
Base class for images data type.
Definition: BaseImage.h:43
Do not force any allocation (standard case)
Definition: ImageStripTypes.h:90
Predefined operators for static data split used for data dispatch.
boost::shared_ptr< StaticImageYStrip2dSplit< TProcessor, image::BaseImage, TAttribute > > staticYStrip2dSplit(const image::ImagePtr &pImage, const ElementsRangeColl &rowElementInfoColl, const image::eStripAllocationType &stripAllocationType=image::eStripAllocationType::eSAT_NoAllocation, const image::eStripParsingDirection &stripParsingDirection=image::eStripParsingDirection::eSPD_Direct)
Definition: StaticImageStripSplitOperators.h:36
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