IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseImageZStripColor3d.h
1 // BaseImageZStripColor3d.h:
3 // -------------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_BASEIMAGEZSTRIPCOLOR3D_H__
16 #define __IPSDKIMAGE_BASEIMAGEZSTRIPCOLOR3D_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::BaseImageZStripColor3d::_bufferType' : class 'ipsdk::image::eImageBufferType' needs to have dll-interface to be used by clients of class 'ipsdk::image::BaseImageYStripColor2d'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKImage/Fragment/Strip/BaseImageStrip.h>
24 #include <IPSDKImage/Geometry/Component/ColorGeometry.h>
25 #include <IPSDKBaseData/Buffer/HybridBuffer.h>
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_ZColor3d;
42 
43 public:
47  virtual ~BaseImageZStripColor3d() = 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 getSizeY() const;
71 
74  ipUInt64 getStripStartOffsetZ() const;
75 
78  ipUInt64 getStripSizeZ() const;
79 
82  ipUInt64 getImageSizeZ() const;
83 
84 
87  const ColorGeometry& getColorGeometry() const;
88 
91  const eColorGeometryType& getColorGeometryType() const;
92 
95  ipUInt64 getSizeC() const;
96 
99  bool isValidZ(ipUInt64 z) const;
100 
103  const eImageBufferType& getBufferType() const;
104 
107  const ipUInt64 getFullStripSize() const;
108 
111  const ipUInt64 getPlanStripSize() const;
112 
115  const ipUInt64 getStripNbPlans() const;
117 
118  //--------------------
121  //--------------------
122 
125  ipUInt64 getTPlanIdx() const;
127 
133  const HybridBuffer& getBuffer(const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx) const;
134 
139  ImageZStrip3dConstPtr getImageZStrip3dPtr(const ipUInt64 cPlanIdx) const;
140  ImageZStrip3dPtr getImageZStrip3dPtr(const ipUInt64 cPlanIdx);
142 
143 protected:
151  void initBase(const ipUInt64 tPlanIdx,
152  const ColorGeometry& colorGeometry,
153  const ipUInt64 stripStartOffsetZ,
154  const ipUInt64 stripSizeZ,
155  const ipUInt64 imageSizeZ,
156  const eStripAllocationType& stripAllocationType,
157  const eStripParsingDirection& stripParsingDirection,
158  const PlanStorageColl2d& colorVolumeColl,
159  const DataIdentifierConstPtr& pImageIdentifier,
160  const DataItemMapConstPtr& pImageHeader);
161 
163  bool isBufferInitDerived() const;
164 
166  BoolResult initBufferDerived();
167 
169  void clearBufferDerived();
170 
172  eDataAccessMode retrieveAccessMode() const;
173 
174  //-----------------------------------
177  //-----------------------------------
178 
181  BoolResult readDataDerived() const;
182 
185  BoolResult writeDataDerived();
187 
192  const HybridBuffer& accessBuffer(const ipUInt64 cPlanIdx, const ipUInt64 zPlanIdx) const;
193  HybridBuffer& accessBuffer(const ipUInt64 cPlanIdx, const ipUInt64 zPlanIdx);
195 
197  void clearDerived();
198 
201  virtual void createSubStrip(const ipUInt64 cPlanIdx,
202  const ipUInt64 tPlanIdx,
203  const ipUInt64 stripStartOffsetZ,
204  const ipUInt64 stripSizeZ,
205  const ipUInt64 imageSizeZ,
206  const eStripAllocationType& stripAllocationType,
207  const eStripParsingDirection& stripParsingDirection,
208  const PlanStorageColl1d& planStorage,
209  const DataIdentifierConstPtr& pImageIdentifier,
210  const DataItemMapConstPtr& pImageHeader,
211  ImageZStrip3dPtr& pImageZStrip3d) const = 0;
212 
213 // attributes
214 private:
216  eStripParsingDirection _stripParsingDirection;
217 
219  ipUInt64 _tPlanIdx;
220 
222  ColorGeometry _colorGeometry;
223 
225  ipUInt64 _sizeX;
226 
228  ipUInt64 _sizeY;
229 
231  ipUInt64 _stripStartOffsetZ;
232 
234  ipUInt64 _stripSizeZ;
235 
237  ipUInt64 _imageSizeZ;
238 
240  eImageBufferType _bufferType;
241 
243  PlanStorageColl2d _colorVolumeColl;
244 
246  typedef std::vector<ImageZStrip3dPtr> ImageZStrip3dColl;
247 
249  ImageZStrip3dColl _imageZStrip3dColl;
250 };
251 
254 
255 inline eImageStripType
257 {
258  return g_imageStripType;
259 }
260 
261 inline const HybridBuffer&
262 BaseImageZStripColor3d::getBuffer(const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx) const
263 {
264  return accessBuffer(zPlanIdx, cPlanIdx);
265 }
266 
269 
270 } // end of namespace image
271 } // end of namespace ipsdk
272 
273 #pragma warning (pop)
274 
275 #endif // __IPSDKIMAGE_BASEIMAGEZSTRIPCOLOR3D_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eDataAccessMode
Enumerate describing access mode for an image fragment data.
Definition: ImageFragmentTypes.h:45
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
boost::shared_ptr< BaseImageZStrip3d > ImageZStrip3dPtr
Definition: ImageStripTypes.h:147
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:97
std::vector< PlanStorageColl1d > PlanStorageColl2d
Definition: ImageTypes.h:190
eColorGeometryType
Color geometry type.
Definition: GeometryComponentTypes.h:45
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: BaseImageZStripColor3d.h:256
const HybridBuffer & getBuffer(const ipUInt64 zPlanIdx, const ipUInt64 cPlanIdx) const
retrieve strip full buffer
Definition: BaseImageZStripColor3d.h:262
eStripParsingDirection
Enumerate describing strip parsing direction.
Definition: ImageStripTypes.h:72
Class encapsulating color geometryThis class allows to define geometry color size and type (grey...
Definition: ColorGeometry.h:35
boost::shared_ptr< const DataIdentifier > DataIdentifierConstPtr
shared pointer to const data identifier
Definition: DataIdentifierTypes.h:31
Class allowing to encapsulate an hybrid form of buffer.
Definition: HybridBuffer.h:52
std::vector< PlanStoragePtr > PlanStorageColl1d
Definition: ImageTypes.h:184
color image 3d strip with splitting along Z axis
Definition: ImageStripTypes.h:62
eImageStripType
Enumerate describing image strip type.
Definition: ImageStripTypes.h:42
static const eImageStripType::domain g_imageStripType
image strip type
Definition: BaseImageZStripColor3d.h:41
Base class for color image 3d strip with splitting along Z axis.
Definition: BaseImageZStripColor3d.h:33
const HybridBuffer & accessBuffer(const ipUInt64 cPlanIdx, const ipUInt64 zPlanIdx) const
access to strip full buffer
boost::shared_ptr< const BaseImageZStrip3d > ImageZStrip3dConstPtr
Definition: ImageStripTypes.h:148
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78