IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ImageTileCollSplitOperators.h
Go to the documentation of this file.
1 // ImageTileCollSplitOperators.h:
3 // ------------------------------
4 //
15 
16 #ifndef __IPSDKIMAGEPROCESSING_IMAGETILECOLLSPLITOPERATORS_H__
17 #define __IPSDKIMAGEPROCESSING_IMAGETILECOLLSPLITOPERATORS_H__
18 
20 #include <IPSDKImageProcessing/DataSplit/TileColl/InputImageTile2dCollSplit.h>
21 #include <IPSDKImageProcessing/DataSplit/TileColl/ImageTile2dCollSplit.h>
23 #include <IPSDKImageProcessing/DataSplit/TileColl/InputImageTile3dCollSplit.h>
24 #include <IPSDKImageProcessing/DataSplit/TileColl/ImageTile3dCollSplit.h>
25 #include <IPSDKImage/Image/BaseImage.h>
26 #include <boost/mpl/if.hpp>
27 #include <boost/make_shared.hpp>
28 
29 namespace ipsdk {
30 namespace imaproc {
31 
34 
37 template <typename TProcessor, typename TOutputAttribute>
38 inline boost::shared_ptr<InputImageTile2dCollSplit<TProcessor, TOutputAttribute> >
40  const image::Border2dPolicy& border2dPolicy,
41  const Tile2dCoordsColl& tile2dCoordsColl)
42 {
44  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
45  pDataSplit->init(pImage, border2dPolicy, tile2dCoordsColl);
46 
47  return pDataSplit;
48 }
49 template <typename TProcessor, typename TOutputAttribute, typename TInputAttribute>
50 inline typename boost::enable_if_c<TInputAttribute::g_imageProcessingAttributeType == eImageProcessingAttributeType::eIPAT_Image &&
51  TInputAttribute::g_bOutput == false,
52  boost::shared_ptr<InputImageTile2dCollSplit<TProcessor, TOutputAttribute> > >::type
53 tile2dCollSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
54  const image::Border2dPolicy& border2dPolicy,
55  const Tile2dCoordsColl& tile2dCoordsColl)
56 {
57  return tile2dCollSplit<TProcessor, TOutputAttribute>(pInputAttribute->getStorage(), border2dPolicy, tile2dCoordsColl);
58 }
59 template <typename TProcessor, typename TOutputAttribute>
60 inline boost::shared_ptr<ImageTile2dCollSplit<TProcessor, TOutputAttribute> >
62  const Tile2dCoordsColl& tile2dCoordsColl)
63 {
65  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
66  pDataSplit->init(pImage, tile2dCoordsColl);
67 
68  return pDataSplit;
69 }
70 template <typename TProcessor, typename TOutputAttribute, typename TInputAttribute>
71 inline typename boost::enable_if_c<TInputAttribute::g_imageProcessingAttributeType == eImageProcessingAttributeType::eIPAT_Image &&
72  TInputAttribute::g_bOutput == true,
73  boost::shared_ptr<ImageTile2dCollSplit<TProcessor, TOutputAttribute> > >::type
74 tile2dCollSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
75  const Tile2dCoordsColl& tile2dCoordsColl)
76 {
77  return tile2dCollSplit<TProcessor, TOutputAttribute>(pInputAttribute->getStorage(), tile2dCoordsColl);
78 }
80 
83 template <typename TProcessor, typename TOutputAttribute>
84 inline boost::shared_ptr<InputImageTile3dCollSplit<TProcessor, TOutputAttribute> >
86  const image::Border3dPolicy& border3dPolicy,
87  const Tile3dCoordsColl& tile3dCoordsColl)
88 {
90  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
91  pDataSplit->init(pImage, border3dPolicy, tile3dCoordsColl);
92 
93  return pDataSplit;
94 }
95 template <typename TProcessor, typename TOutputAttribute, typename TInputAttribute>
96 inline typename boost::enable_if_c<TInputAttribute::g_imageProcessingAttributeType == eImageProcessingAttributeType::eIPAT_Image &&
97  TInputAttribute::g_bOutput == false,
98  boost::shared_ptr<InputImageTile3dCollSplit<TProcessor, TOutputAttribute> > >::type
99 tile3dCollSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
100  const image::Border3dPolicy& border3dPolicy,
101  const Tile3dCoordsColl& tile3dCoordsColl)
102 {
103  return tile3dCollSplit<TProcessor, TOutputAttribute>(pInputAttribute->getStorage(), border3dPolicy, tile3dCoordsColl);
104 }
105 template <typename TProcessor, typename TOutputAttribute>
106 inline boost::shared_ptr<ImageTile3dCollSplit<TProcessor, TOutputAttribute> >
108  const Tile3dCoordsColl& tile3dCoordsColl)
109 {
111  boost::shared_ptr<DataSplit> pDataSplit = boost::make_shared<DataSplit>();
112  pDataSplit->init(pImage, tile3dCoordsColl);
113 
114  return pDataSplit;
115 }
116 template <typename TProcessor, typename TOutputAttribute, typename TInputAttribute>
117 inline typename boost::enable_if_c<TInputAttribute::g_imageProcessingAttributeType == eImageProcessingAttributeType::eIPAT_Image &&
118  TInputAttribute::g_bOutput == true,
119  boost::shared_ptr<ImageTile3dCollSplit<TProcessor, TOutputAttribute> > >::type
120 tile3dCollSplit(const boost::shared_ptr<TInputAttribute>& pInputAttribute,
121  const Tile3dCoordsColl& tile3dCoordsColl)
122 {
123  return tile3dCollSplit<TProcessor, TOutputAttribute>(pInputAttribute->getStorage(), tile3dCoordsColl);
124 }
126 
129 
130 } // end of namespace imaproc
131 } // end of namespace ipsdk
132 
133 #endif // __IPSDKIMAGEPROCESSING_IMAGETILECOLLSPLITOPERATORS_H__
Concrete class for input image tile 2d collection split operations for data dispatch using predefined...
Definition: InputImageTile2dCollSplit.h:31
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Concrete class for image tile 3d collection split operations for data dispatch using predefined coord...
Definition: ImageTile3dCollSplit.h:29
void init(const boost::shared_ptr< InputImageType > &pImage, const Tile2dCoordsColl &tile2dCoordsColl, const ipUInt32 nbMinEltsPerSplit=1, const ipUInt32 nbMaxEltsPerSplit=NumericLimits< ipUInt32 >::max())
object initialization method
Definition: ImageTile2dCollSplit.h:129
boost::shared_ptr< InputImageType > InputImagePtrType
shared pointer to input image type associated to operation
Definition: InputImageTile3dCollSplit.h:48
void init(const boost::shared_ptr< InputImageType > &pImage, const image::Border2dPolicy &border2dPolicy, const Tile2dCoordsColl &tile2dCoordsColl, const ipUInt64 nbMinEltsPerSplit=1, const ipUInt64 nbMaxEltsPerSplit=NumericLimits< ipUInt64 >::max())
object initialization method
Definition: InputImageTile2dCollSplit.h:133
boost::shared_ptr< InputImageType > InputImagePtrType
shared pointer to input image type associated to operation
Definition: InputImageTile2dCollSplit.h:48
Concrete class for image tile 3d collection split operations for data dispatch using predefined coord...
Definition: InputImageTile3dCollSplit.h:31
boost::shared_ptr< InputImageTile3dCollSplit< TProcessor, TOutputAttribute > > tile3dCollSplit(const typename InputImageTile3dCollSplit< TProcessor, TOutputAttribute >::InputImagePtrType &pImage, const image::Border3dPolicy &border3dPolicy, const Tile3dCoordsColl &tile3dCoordsColl)
Definition: ImageTileCollSplitOperators.h:85
std::vector< Tile3dCoords > Tile3dCoordsColl
collection of tile 3d coordinates
Definition: ImageTileCollSplitTypes.h:87
boost::shared_ptr< InputImageTile2dCollSplit< TProcessor, TOutputAttribute > > tile2dCollSplit(const typename InputImageTile2dCollSplit< TProcessor, TOutputAttribute >::InputImagePtrType &pImage, const image::Border2dPolicy &border2dPolicy, const Tile2dCoordsColl &tile2dCoordsColl)
Definition: ImageTileCollSplitOperators.h:39
std::vector< Tile2dCoords > Tile2dCoordsColl
collection of tile 2d coordinates
Definition: ImageTileCollSplitTypes.h:62
void init(const boost::shared_ptr< InputImageType > &pImage, const Tile3dCoordsColl &tile3dCoordsColl, const ipUInt32 nbMinEltsPerSplit=1, const ipUInt32 nbMaxEltsPerSplit=NumericLimits< ipUInt32 >::max())
object initialization method
Definition: ImageTile3dCollSplit.h:129
void init(const boost::shared_ptr< InputImageType > &pImage, const image::Border3dPolicy &border3dPolicy, const Tile3dCoordsColl &tile3dCoordsColl, const ipUInt64 nbMinEltsPerSplit=1, const ipUInt64 nbMaxEltsPerSplit=NumericLimits< ipUInt32 >::max())
object initialization method
Definition: InputImageTile3dCollSplit.h:133
Class used to define policy for 2d strip borders management during a kernel algorithm processing...
Definition: Border2dPolicy.h:34
boost::shared_ptr< InputImageType > InputImagePtrType
shared pointer to input image type associated to operation
Definition: ImageTile3dCollSplit.h:46
Concrete class for image tile 2d collection split operations for data dispatch using predefined coord...
Definition: ImageTile2dCollSplit.h:29
boost::shared_ptr< InputImageType > InputImagePtrType
shared pointer to input image type associated to operation
Definition: ImageTile2dCollSplit.h:46
Predefined operators for dynamic data split used for data dispatch.
Class used to define policy for 3d strip borders management during a kernel algorithm processing...
Definition: Border3dPolicy.h:34
Predefined types for image processing attributes management.
Attribute associated to an image.
Definition: ImageProcessingAttributeTypes.h:43