IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseImageYStrip3d.h
1 // BaseImageYStrip3d.h:
3 // --------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_BASEIMAGEYSTRIP3D_H__
16 #define __IPSDKIMAGE_BASEIMAGEYSTRIP3D_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::BaseImageYStrip3d::_stripParsingDirection' : class 'ipsdk::image::eStripParsingDirection' needs to have dll-interface to be used by clients of class 'ipsdk::image::BaseImageYStrip3d'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKImage/Fragment/Strip/BaseImageStrip.h>
24 #include <IPSDKBaseData/Buffer/FragHybridBuffer.h>
25 #include <vector>
26 
27 namespace ipsdk {
28 namespace image {
29 
32 
34 {
35  // declare serial class
37 
38 // predefined public types
39 public:
41  static const eImageStripType::domain g_imageStripType = eImageStripType::eIST_Y3d;
42 
43 public:
47  virtual ~BaseImageYStrip3d() = 0;
49 
50 // methods
51 public:
53  eImageStripType getImageStripType() const;
54 
55  //------------------------------------
58  //------------------------------------
59 
62  const eStripParsingDirection& getStripParsingDirection() const;
63 
66  ipUInt64 getSizeX() const;
67 
70  ipUInt64 getSizeZ() const;
71 
74  ipUInt64 getStripStartOffsetY() const;
75 
78  ipUInt64 getStripSizeY() const;
79 
82  ipUInt64 getImageSizeY() const;
83 
86  bool isValidY(ipUInt64 y) 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 getCPlanIdx() const;
113 
116  ipUInt64 getTPlanIdx() const;
118 
124  const FragHybridBuffer& getBuffer(const ipUInt64 yPlanIdx) const;
125 
126 protected:
130  void initBase(const ipUInt64 cPlanIdx,
131  const ipUInt64 tPlanIdx,
132  const ipUInt64 stripStartOffsetY,
133  const ipUInt64 stripSizeY,
134  const eStripAllocationType& stripAllocationType,
135  const eStripParsingDirection& stripParsingDirection,
136  const PlanStorageColl1d& volumeColl,
137  const DataIdentifierConstPtr& pImageIdentifier,
138  const DataItemMapConstPtr& pImageHeader);
139 
141  bool isBufferInitDerived() const;
142 
144  BoolResult initBufferDerived();
145 
147  void clearBufferDerived();
148 
150  eDataAccessMode retrieveAccessMode() const;
151 
152  //-----------------------------------
155  //-----------------------------------
156 
159  BoolResult readDataDerived() const;
160 
163  BoolResult writeDataDerived();
165 
172  const FragHybridBuffer& accessBuffer(const ipUInt64 yPlanIdx) const;
173  FragHybridBuffer& accessBuffer(const ipUInt64 yPlanIdx);
175 
177  void clearDerived();
178 
179 // attributes
180 private:
182  eStripParsingDirection _stripParsingDirection;
183 
186  ipUInt64 _cPlanIdx;
187  ipUInt64 _tPlanIdx;
189 
191  ipUInt64 _sizeX;
192 
194  ipUInt64 _sizeZ;
195 
197  ipUInt64 _stripStartOffsetY;
198 
200  ipUInt64 _stripSizeY;
201 
203  ipUInt64 _imageSizeY;
204 
206  eImageBufferType _bufferType;
207 
209  PlanStorageColl1d _volumeColl;
210 
212  typedef std::vector<FragHybridBuffer> FragHybridBufferColl;
213 
215  mutable FragHybridBufferColl _fragHybridBufferColl;
216 };
217 
220 
221 inline eImageStripType
223 {
224  return g_imageStripType;
225 }
226 
227 inline const FragHybridBuffer&
229 {
230  return accessBuffer(yPlanIdx);
231 }
232 
235 
236 } // end of namespace image
237 } // end of namespace ipsdk
238 
239 #pragma warning (pop)
240 
241 #endif // __IPSDKIMAGE_BASEIMAGEYSTRIP3D_H__
const FragHybridBuffer & getBuffer(const ipUInt64 yPlanIdx) const
retrieve strip full buffer
Definition: BaseImageYStrip3d.h:228
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Base class for image 3d strip with splitting along Y axis.
Definition: BaseImageYStrip3d.h:33
eDataAccessMode
Enumerate describing access mode for an image fragment data.
Definition: ImageFragmentTypes.h:45
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:97
const FragHybridBuffer & accessBuffer(const ipUInt64 yPlanIdx) const
access to strip full buffer
image 3d strip with splitting along Y axis
Definition: ImageStripTypes.h:52
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
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
eImageStripType getImageStripType() const
retrieve image strip type
Definition: BaseImageYStrip3d.h:222
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
std::vector< PlanStoragePtr > PlanStorageColl1d
Definition: ImageTypes.h:184
eImageStripType
Enumerate describing image strip type.
Definition: ImageStripTypes.h:42
static const eImageStripType::domain g_imageStripType
image strip type
Definition: BaseImageYStrip3d.h:41
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78