IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseImageYStripSeq2d.h
1 // BaseImageYStripSeq2d.h:
3 // -----------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_BASEIMAGEYSTRIPSEQ2D_H__
16 #define __IPSDKIMAGE_BASEIMAGEYSTRIPSEQ2D_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::BaseImageYStripSeq2d::_bufferType' : class 'ipsdk::image::eImageBufferType' needs to have dll-interface to be used by clients of class 'ipsdk::image::BaseImageYStripSeq2d'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKImage/Fragment/Strip/BaseImageStrip.h>
24 #include <IPSDKBaseData/Buffer/HybridBuffer.h>
25 
26 namespace ipsdk {
27 namespace image {
28 
31 
33 {
34  // declare serial class
36 
37 // predefined public types
38 public:
40  static const eImageStripType::domain g_imageStripType = eImageStripType::eIST_YSeq2d;
41 
42 public:
46  virtual ~BaseImageYStripSeq2d() = 0;
48 
49 // methods
50 public:
52  eImageStripType getImageStripType() const;
53 
54  //------------------------------------
57  //------------------------------------
58 
61  const eStripParsingDirection& getStripParsingDirection() const;
62 
65  ipUInt64 getSizeX() const;
66 
69  ipUInt64 getSizeT() const;
70 
73  ipUInt64 getStripStartOffsetY() const;
74 
77  ipUInt64 getStripSizeY() const;
78 
81  ipUInt64 getImageSizeY() const;
82 
85  bool isValidY(ipUInt64 y) const;
86 
89  const eImageBufferType& getBufferType() const;
90 
93  const ipUInt64 getFullStripSize() const;
94 
97  const ipUInt64 getPlanStripSize() const;
98 
101  const ipUInt64 getStripNbPlans() const;
103 
104  //--------------------
107  //--------------------
108 
111  ipUInt64 getZPlanIdx() const;
112 
115  ipUInt64 getCPlanIdx() const;
117 
123  const HybridBuffer& getBuffer(const ipUInt64 tPlanIdx) const;
124 
129  ImageYStrip2dConstPtr getImageYStrip2dPtr(const ipUInt64 tPlanIdx) const;
130  ImageYStrip2dPtr getImageYStrip2dPtr(const ipUInt64 tPlanIdx);
132 
133 protected:
137  void initBase(const ipUInt64 zPlanIdx,
138  const ipUInt64 cPlanIdx,
139  const ipUInt64 stripStartOffsetY,
140  const ipUInt64 stripSizeY,
141  const eStripAllocationType& stripAllocationType,
142  const eStripParsingDirection& stripParsingDirection,
143  const PlanStorageColl1d& temporalColl,
144  const DataIdentifierConstPtr& pImageIdentifier,
145  const DataItemMapConstPtr& pImageHeader);
146 
148  bool isBufferInitDerived() const;
149 
151  BoolResult initBufferDerived();
152 
154  void clearBufferDerived();
155 
157  eDataAccessMode retrieveAccessMode() const;
158 
159  //-----------------------------------
162  //-----------------------------------
163 
166  BoolResult readDataDerived() const;
167 
170  BoolResult writeDataDerived();
172 
179  const HybridBuffer& accessBuffer(const ipUInt64 tPlanIdx) const;
180  HybridBuffer& accessBuffer(const ipUInt64 tPlanIdx);
182 
184  void clearDerived();
185 
187  virtual void createSubStrip(const ipUInt64 zPlanIdx,
188  const ipUInt64 cPlanIdx,
189  const ipUInt64 tPlanIdx,
190  const ipUInt64 stripStartOffsetY,
191  const ipUInt64 stripSizeY,
192  const eStripAllocationType& stripAllocationType,
193  const eStripParsingDirection& stripParsingDirection,
194  const PlanStoragePtr& pPlanStorage,
195  const DataIdentifierConstPtr& pImageIdentifier,
196  const DataItemMapConstPtr& pImageHeader,
197  ImageYStrip2dPtr& pImageYStrip2d) const = 0;
198 
199 // attributes
200 private:
203  ipUInt64 _zPlanIdx;
204  ipUInt64 _cPlanIdx;
206 
208  ipUInt64 _sizeX;
209 
211  ipUInt64 _sizeT;
212 
214  ipUInt64 _stripStartOffsetY;
215 
217  ipUInt64 _stripSizeY;
218 
220  ipUInt64 _imageSizeY;
221 
223  eImageBufferType _bufferType;
224 
226  PlanStorageColl1d _temporalColl;
227 
229  typedef std::vector<ImageYStrip2dPtr> ImageYStrip2dColl;
230 
232  ImageYStrip2dColl _imageYStrip2dColl;
233 };
234 
237 
238 inline eImageStripType
240 {
241  return g_imageStripType;
242 }
243 
244 inline const HybridBuffer&
246 {
247  return accessBuffer(tPlanIdx);
248 }
249 
252 
253 } // end of namespace image
254 } // end of namespace ipsdk
255 
256 #pragma warning (pop)
257 
258 #endif // __IPSDKIMAGE_BASEIMAGEYSTRIPSEQ2D_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::shared_ptr< const BaseImageYStrip2d > ImageYStrip2dConstPtr
Definition: ImageStripTypes.h:118
eImageStripType getImageStripType() const
retrieve image strip type
Definition: BaseImageYStripSeq2d.h:239
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
sequence image 2d strip with splitting along Y axis
Definition: ImageStripTypes.h:56
eStripAllocationType
Enumerate describing image strip allocation policy.
Definition: ImageStripTypes.h:88
const HybridBuffer & accessBuffer(const ipUInt64 tPlanIdx) const
access to strip full buffer
static const eImageStripType::domain g_imageStripType
image strip type
Definition: BaseImageYStripSeq2d.h:40
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
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
Base class for sequence image 2d strip with splitting along Y axis.
Definition: BaseImageYStripSeq2d.h:32
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
boost::shared_ptr< BaseImageYStrip2d > ImageYStrip2dPtr
Definition: ImageStripTypes.h:117
const HybridBuffer & getBuffer(const ipUInt64 tPlanIdx) const
retrieve strip full buffer
Definition: BaseImageYStripSeq2d.h:245
eImageStripType
Enumerate describing image strip type.
Definition: ImageStripTypes.h:42
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78