IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseRawYStrip3dParser.h
1 // BaseRawYStrip3dParser.h:
3 // ------------------------
4 //
14 
15 #ifndef __IPSDKIMAGEPROCESSING_BASERAWYSTRIP3DPARSER_H__
16 #define __IPSDKIMAGEPROCESSING_BASERAWYSTRIP3DPARSER_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::imaproc::BaseRawYStrip3dParser<BaseStripAttributeClassType>::_pImageYStrip3d' : class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'ipsdk::imaproc::BaseRawYStrip3dParser<BaseStripAttributeClassType>'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
24 #include <IPSDKImageProcessing/Algorithm/Parser/Strip/BaseStripParser.h>
25 #include <IPSDKImage/Fragment/Strip/YStrip3d/BaseImageYStrip3d.h>
26 #include <boost/shared_ptr.hpp>
27 #include <boost/mpl/equal_to.hpp>
28 #include <boost/mpl/not_equal_to.hpp>
29 #include <boost/mpl/int.hpp>
30 #include <boost/mpl/if.hpp>
31 
32 namespace ipsdk {
33 namespace imaproc {
34 
37 
38 template <typename BaseStripAttributeClassType>
40 {
41 // predefined public types
42 public:
44  static const eIOStatus::domain g_attributeIO = BaseStripAttributeClassType::g_dataIOStatus;
45 
47  typedef typename BaseStripAttributeClassType::ValueType ValueType;
48 
50  typedef typename BaseStripAttributeClassType::StorageType StorageType;
51 
52 public:
56  virtual ~BaseRawYStrip3dParser() = 0;
58 
59 // methods
60 public:
63  {
65  }
66 
72  void init(const StorageType& pImageYStrip3d);
73 
78  ipUInt64 getBufferSize() const;
79 
83  ipUInt64 getSizeZ() const;
84 
91  template <typename T>
92  typename boost::enable_if<typename boost::mpl::not_equal_to<boost::mpl::int_<g_attributeIO>,
93  boost::mpl::int_<eIOStatus::eIOS_Output> >::type,
94  const T*>::type
95  getBuffer(const ipUInt64 zPlanIdx) const
96  {
97  return static_cast<const T*>(accessBuffer(zPlanIdx));
98  }
99  template <typename T>
100  typename boost::enable_if<typename boost::mpl::not_equal_to<boost::mpl::int_<g_attributeIO>,
101  boost::mpl::int_<eIOStatus::eIOS_Input> >::type,
102  T*>::type
103  getBuffer(const ipUInt64 zPlanIdx)
104  {
105  return static_cast<T*>(accessBuffer(zPlanIdx));
106  }
108 
109 private:
116  const void* accessBuffer(const ipUInt64 zPlanIdx) const;
117  void* accessBuffer(const ipUInt64 zPlanIdx);
119 
121  void updateToInitDataDerived();
122 
124  void updateToMainDataDerived();
125 
127  void updateToFinalDataDerived();
128 
130  void clearDerived();
131 
132 // attributes
133 protected:
136 
139 
142 
145 
148 
151 
154 
157 
160 
163 };
164 
167 
168 } // end of namespace imaproc
169 } // end of namespace ipsdk
170 
171 #pragma warning (pop)
172 
173 #endif // __IPSDKIMAGEPROCESSING_BASERAWYSTRIP3DPARSER_H__
StorageType _pImageYStrip3d
shared pointer to y strip 3d
Definition: BaseRawYStrip3dParser.h:135
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
FragHybridBufferPtr _pFinalDataBuffer
buffer used to store final data to process
Definition: BaseRawYStrip3dParser.h:162
boost::shared_ptr< FragHybridBuffer > FragHybridBufferPtr
shared pointer to FragHybridBuffer
Definition: BufferTypes.h:82
BaseStripAttributeClassType::StorageType StorageType
storage type associated to object
Definition: BaseRawYStrip3dParser.h:50
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
ipUInt64 _stripSizeY
strip size along Y axis
Definition: BaseRawYStrip3dParser.h:150
eStripParserType
Enumerate describing strip parser type.
Definition: StripParserTypes.h:30
BaseStripAttributeClassType::ValueType ValueType
value type associated to object
Definition: BaseRawYStrip3dParser.h:47
image::eStripParsingDirection _stripParsingDirection
strip parsing direction
Definition: BaseRawYStrip3dParser.h:138
eDataType _dataType
base data buffer type associated to input strips
Definition: BaseRawYStrip3dParser.h:141
Definition of import/export macro for library.
FragHybridBufferPtr _pCurDataBuffer
buffer used to store data currently processed
Definition: BaseRawYStrip3dParser.h:153
Base class for raw y strip 3d parsing.
Definition: BaseRawYStrip3dParser.h:39
#define IPSDKIMAGEPROCESSING_API
Import/Export macro for library IPSDKImageProcessing.
Definition: IPSDKImageProcessingExports.h:25
eStripParserType getStripParserType() const
retrieve strip parser type
Definition: BaseRawYStrip3dParser.h:62
boost::enable_if< typename boost::mpl::not_equal_to< boost::mpl::int_< g_attributeIO >, boost::mpl::int_< eIOStatus::eIOS_Input > >::type, T * >::type getBuffer(const ipUInt64 zPlanIdx)
retrieve buffer associated to current operation
Definition: BaseRawYStrip3dParser.h:103
eDataType
Enumerate describing a base type.
Definition: BaseTypes.h:77
ipUInt64 _sizeX
image size along X axis
Definition: BaseRawYStrip3dParser.h:144
eStripParsingDirection
Enumerate describing strip parsing direction.
Definition: ImageStripTypes.h:72
FragHybridBufferPtr _pInitialDataBuffer
buffer used to store initial data to process
Definition: BaseRawYStrip3dParser.h:156
Base class for objects allowing to parse strip attribute data.
Definition: BaseStripParser.h:27
boost::enable_if< typename boost::mpl::not_equal_to< boost::mpl::int_< g_attributeIO >, boost::mpl::int_< eIOStatus::eIOS_Output > >::type, const T * >::type getBuffer(const ipUInt64 zPlanIdx) const
retrieve buffer associated to current operation
Definition: BaseRawYStrip3dParser.h:95
ipUInt64 _sizeZ
image size along Z axis
Definition: BaseRawYStrip3dParser.h:147
Y strip 3d parser allowing raw data parsing.
Definition: StripParserTypes.h:56
FragHybridBufferPtr _pMainDataBuffer
buffer used to store main data to process
Definition: BaseRawYStrip3dParser.h:159