IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseImageZStrip3d.h
1 // BaseImageZStrip3d.h:
3 // --------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_BASEIMAGEZSTRIP3D_H__
16 #define __IPSDKIMAGE_BASEIMAGEZSTRIP3D_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::BaseImageZStrip3d::_stripParsingDirection' : class 'ipsdk::image::eStripParsingDirection' needs to have dll-interface to be used by clients of class 'ipsdk::image::BaseImageZStrip3d'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKImage/Fragment/Strip/BaseImageStrip.h>
25 
26 namespace ipsdk {
27 namespace image {
28 
29 class BaseImageZStrip3dWithKernel;
30 
33 
35 {
36  // declare serial class
38 
39  // friend class for protected members access
40  friend class BaseImageZStrip3dWithKernel;
41  friend class BaseImageZStripColor3d;
42 
43 // predefined public types
44 public:
46  static const eImageStripType::domain g_imageStripType = eImageStripType::eIST_Z3d;
47 
48 public:
52  virtual ~BaseImageZStrip3d() = 0;
54 
55 // methods
56 public:
58  eImageStripType getImageStripType() const;
59 
60  //------------------------------------
63  //------------------------------------
64 
67  const eStripParsingDirection& getStripParsingDirection() const;
68 
71  ipUInt64 getSizeX() const;
72 
75  ipUInt64 getSizeY() const;
76 
79  ipUInt64 getStripStartOffsetZ() const;
80 
83  ipUInt64 getStripSizeZ() const;
84 
87  ipUInt64 getImageSizeZ() const;
88 
91  bool isValidZ(ipUInt64 z) const;
92 
95  const eImageBufferType& getBufferType() const;
96 
99  const ipUInt64 getFullStripSize() const;
100 
103  const ipUInt64 getPlanStripSize() const;
104 
107  const ipUInt64 getStripNbPlans() const;
109 
110  //--------------------
113  //--------------------
114 
117  ipUInt64 getCPlanIdx() const;
118 
121  ipUInt64 getTPlanIdx() const;
123 
129  const HybridBuffer& getBuffer(const ipUInt64 zPlanIdx) const;
130 
135  ImageYStrip2dConstPtr getImageYStrip2dPtr(const ipUInt64 zPlanIdx) const;
136  ImageYStrip2dPtr getImageYStrip2dPtr(const ipUInt64 zPlanIdx);
138 
140  virtual ipBool fromDisk() const;
141 
142 protected:
148  void initBase(const ipUInt64 cPlanIdx,
149  const ipUInt64 tPlanIdx,
150  const ipUInt64 stripStartOffsetZ,
151  const ipUInt64 stripSizeZ,
152  const ipUInt64 imageSizeZ,
153  const eStripAllocationType& stripAllocationType,
154  const eStripParsingDirection& stripParsingDirection,
155  const PlanStorageColl1d& volumeColl,
156  const DataIdentifierConstPtr& pImageIdentifier,
157  const DataItemMapConstPtr& pImageHeader);
158 
160  bool isBufferInitDerived() const;
161 
163  BoolResult initBufferDerived();
164 
166  void clearBufferDerived();
167 
169  eDataAccessMode retrieveAccessMode() const;
170 
171  //-----------------------------------
174  //-----------------------------------
175 
178  BoolResult readDataDerived() const;
179 
182  BoolResult writeDataDerived();
184 
191  const HybridBuffer& accessBuffer(const ipUInt64 zPlanIdx) const;
192  HybridBuffer& accessBuffer(const ipUInt64 zPlanIdx);
194 
196  void clearDerived();
197 
199  virtual void createSubStrip(const ipUInt64 zPlanIdx,
200  const ipUInt64 cPlanIdx,
201  const ipUInt64 tPlanIdx,
202  const eStripAllocationType& stripAllocationType,
203  const eStripParsingDirection& stripParsingDirection,
204  const PlanStoragePtr& pPlanStorage,
205  const DataIdentifierConstPtr& pImageIdentifier,
206  const DataItemMapConstPtr& pImageHeader,
207  ImageYStrip2dPtr& pImageYStrip2d) const = 0;
208 
209 // attributes
210 private:
212  eStripParsingDirection _stripParsingDirection;
213 
216  ipUInt64 _cPlanIdx;
217  ipUInt64 _tPlanIdx;
219 
221  ipUInt64 _sizeX;
222 
224  ipUInt64 _sizeY;
225 
227  ipUInt64 _stripStartOffsetZ;
228 
230  ipUInt64 _stripSizeZ;
231 
233  ipUInt64 _imageSizeZ;
234 
236  eImageBufferType _bufferType;
237 
239  PlanStorageColl1d _volumeColl;
240 
242  typedef std::vector<ImageYStrip2dPtr> ImageYStrip2dColl;
243 
245  ImageYStrip2dColl _imageYStrip2dColl;
246 };
247 
250 
251 inline eImageStripType
253 {
254  return g_imageStripType;
255 }
256 
257 inline const HybridBuffer&
259 {
260  return accessBuffer(zPlanIdx);
261 }
262 
265 
266 } // end of namespace image
267 } // end of namespace ipsdk
268 
269 #pragma warning (pop)
270 
271 #endif // __IPSDKIMAGE_BASEIMAGEZSTRIP3D_H__
image 3d strip with splitting along Z axis
Definition: ImageStripTypes.h:58
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::shared_ptr< const BaseImageYStrip2d > ImageYStrip2dConstPtr
Definition: ImageStripTypes.h:118
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 HybridBuffer & getBuffer(const ipUInt64 zPlanIdx) const
retrieve strip full buffer
Definition: BaseImageZStrip3d.h:258
static const eImageStripType::domain g_imageStripType
image strip type
Definition: BaseImageZStrip3d.h:46
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:97
Predefined types for buffer manipulations.
eStripAllocationType
Enumerate describing image strip allocation policy.
Definition: ImageStripTypes.h:88
Base class for image strip fragments.
Definition: BaseImageStrip.h:34
Base class for image 3d strip with splitting along Z axis.
Definition: BaseImageZStrip3d.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
bool ipBool
Base types definition.
Definition: BaseTypes.h:47
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
const HybridBuffer & accessBuffer(const ipUInt64 zPlanIdx) const
access to strip full buffer
Class allowing to encapsulate an hybrid form of buffer.
Definition: HybridBuffer.h:52
std::vector< PlanStoragePtr > PlanStorageColl1d
Definition: ImageTypes.h:184
eImageStripType getImageStripType() const
retrieve image strip type
Definition: BaseImageZStrip3d.h:252
boost::shared_ptr< BaseImageYStrip2d > ImageYStrip2dPtr
Definition: ImageStripTypes.h:117
Base class for image 3d strip with splitting along Z axis associated to a kernel. ...
Definition: BaseImageZStrip3dWithKernel.h:33
eImageStripType
Enumerate describing image strip type.
Definition: ImageStripTypes.h:42
Base class for color image 3d strip with splitting along Z axis.
Definition: BaseImageZStripColor3d.h:33
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78