IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseImageXStrip2d.h
1 // BaseImageXStrip2d.h:
3 // --------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_BASEIMAGEXSTRIP2D_H__
16 #define __IPSDKIMAGE_BASEIMAGEXSTRIP2D_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::BaseImageXStrip2d::_stripParsingDirection' : class 'ipsdk::image::eStripParsingDirection' needs to have dll-interface to be used by clients of class 'ipsdk::image::BaseImageXStrip2d'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKImage/Fragment/Strip/BaseImageStrip.h>
24 #include <IPSDKBaseData/Buffer/FragHybridBuffer.h>
25 
26 namespace ipsdk {
27 namespace image {
28 
29 class BaseImageXStrip2dWithKernel;
30 
33 
35 {
36  // declare serial class
38 
39  // friend class for protected members access
40  friend class BaseImageXStrip2dWithKernel;
41 
42 // predefined public types
43 public:
45  static const eImageStripType::domain g_imageStripType = eImageStripType::eIST_X2d;
46 
47 public:
51  virtual ~BaseImageXStrip2d() = 0;
53 
54 // methods
55 public:
57  eImageStripType getImageStripType() const;
58 
59  //------------------------------------
62  //------------------------------------
63 
66  const eStripParsingDirection& getStripParsingDirection() const;
67 
70  ipUInt64 getSizeY() const;
71 
74  ipUInt64 getStripStartOffsetX() const;
75 
78  ipUInt64 getStripSizeX() const;
79 
82  ipUInt64 getImageSizeX() const;
83 
86  bool isValidX(ipUInt64 x) const;
87 
90  const eImageBufferType& getBufferType() const;
91 
94  const ipUInt64 getFullStripSize() const;
95 
98  const ipUInt64 getPlanStripSize() const;
99 
102  const ipUInt64 getStripNbPlans() const;
104 
105  //--------------------
108  //--------------------
109 
112  ipUInt64 getZPlanIdx() const;
113 
116  ipUInt64 getCPlanIdx() const;
117 
120  ipUInt64 getTPlanIdx() const;
122 
126  const FragHybridBuffer& getBuffer() const;
127 
131  FragHybridBufferConstPtr getBufferPtr() const;
132 
133 protected:
135  void initBase(const ipUInt64 zPlanIdx,
136  const ipUInt64 cPlanIdx,
137  const ipUInt64 tPlanIdx,
138  const ipUInt64 stripStartOffsetX,
139  const ipUInt64 stripSizeX,
140  const eStripAllocationType& stripAllocationType,
141  const eStripParsingDirection& stripParsingDirection,
142  const PlanStoragePtr& pPlanStorage,
143  const DataIdentifierConstPtr& pImageIdentifier,
144  const DataItemMapConstPtr& pImageHeader);
145 
147  bool isBufferInitDerived() const;
148 
150  BoolResult initBufferDerived();
151 
153  void clearBufferDerived();
154 
156  eDataAccessMode retrieveAccessMode() const;
157 
158  //-----------------------------------
161  //-----------------------------------
162 
165  BoolResult readDataDerived() const;
166 
169  BoolResult writeDataDerived();
171 
175  const FragHybridBuffer& accessBuffer() const;
176  FragHybridBuffer& accessBuffer();
178 
180  void clearDerived();
181 
182 // attributes
183 private:
185  eStripParsingDirection _stripParsingDirection;
186 
189  ipUInt64 _zPlanIdx;
190  ipUInt64 _cPlanIdx;
191  ipUInt64 _tPlanIdx;
193 
195  ipUInt64 _sizeY;
196 
198  ipUInt64 _stripStartOffsetX;
199 
201  ipUInt64 _stripSizeX;
202 
204  ipUInt64 _imageSizeX;
205 
207  eImageBufferType _bufferType;
208 
210  PlanStoragePtr _pPlanStorage;
211 
213  FragHybridBufferPtr _pBuffer;
214 };
215 
218 
219 inline eImageStripType
221 {
222  return g_imageStripType;
223 }
224 
225 inline const FragHybridBuffer&
227 {
228  return accessBuffer();
229 }
230 
233 
234 } // end of namespace image
235 } // end of namespace ipsdk
236 
237 #pragma warning (pop)
238 
239 #endif // __IPSDKIMAGE_BASEIMAGEXSTRIP2D_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::shared_ptr< FragHybridBuffer > FragHybridBufferPtr
shared pointer to FragHybridBuffer
Definition: BufferTypes.h:82
eDataAccessMode
Enumerate describing access mode for an image fragment data.
Definition: ImageFragmentTypes.h:45
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
const FragHybridBuffer & accessBuffer() const
access to strip full buffer
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:97
image 2d strip with splitting along X axis
Definition: ImageStripTypes.h:44
Class allowing to encapsulate an hybrid form of fragment buffer.
Definition: FragHybridBuffer.h:53
eStripAllocationType
Enumerate describing image strip allocation policy.
Definition: ImageStripTypes.h:88
eImageStripType getImageStripType() const
retrieve image strip type
Definition: BaseImageXStrip2d.h:220
Base class for image strip fragments.
Definition: BaseImageStrip.h:34
boost::shared_ptr< const DataItemMap > DataItemMapConstPtr
shared pointer to const DataItemMap
Definition: DataItemTypes.h:170
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
Base class for image 2d strip with splitting along X axis associated to a kernel. ...
Definition: BaseImageXStrip2dWithKernel.h:33
boost::shared_ptr< BasePlanStorage > PlanStoragePtr
shared pointer to image plan storage
Definition: PlanStorageTypes.h:55
eStripParsingDirection
Enumerate describing strip parsing direction.
Definition: ImageStripTypes.h:72
boost::shared_ptr< const DataIdentifier > DataIdentifierConstPtr
shared pointer to const data identifier
Definition: DataIdentifierTypes.h:31
Base class for image 2d strip with splitting along X axis.
Definition: BaseImageXStrip2d.h:34
eImageStripType
Enumerate describing image strip type.
Definition: ImageStripTypes.h:42
boost::shared_ptr< const FragHybridBuffer > FragHybridBufferConstPtr
shared pointer to FragHybridBuffer
Definition: BufferTypes.h:83
static const eImageStripType::domain g_imageStripType
image strip type
Definition: BaseImageXStrip2d.h:45
const FragHybridBuffer & getBuffer() const
retrieve strip full buffer
Definition: BaseImageXStrip2d.h:226
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78