IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
ReInterpretedPlanStorage.h
1 // ReInterpretedPlanStorage.h:
3 // ---------------------------
4 //
16 
17 #ifndef __IPSDKIMAGE_REINTERPRETEDPLANSTORAGE_H__
18 #define __IPSDKIMAGE_REINTERPRETEDPLANSTORAGE_H__
19 
20 // suppression warnings
21 // warning C4251: 'ipsdk::image::ReInterpretedPlanStorage::_pOriginalPlanStorage' : class 'boost::shared_ptr<ipsdk::image::BasePlanStorage>' needs to have dll-interface to be used by clients of class 'ipsdk::image::ReInterpretedPlanStorage'
22 #pragma warning (push)
23 #pragma warning (disable : 4251)
24 
25 #include <IPSDKImage/Storage/BasePlanStorage.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 ePlanStorageType::domain g_planStorageType = ePlanStorageType::ePST_ReInterpreted;
42 
43 public:
49 
50 // methods
51 public:
53  ePlanStorageType getPlanStorageType() const;
54 
60  void init(const PlanStoragePtr& pOriginalPlanStorage,
61  const ImagePlanGeometry& targetPlanGeometry);
62 
66  const BasePlanStorage& getOriginalPlanStorage() const;
67 
70  eImageAccessMode getAccessMode() const;
71 
77  const void* getDataPtr() const;
78  void* getDataPtr();
80 
85  bool hasRowDataAccess(const ipUInt64 startOffsetY,
86  const ipUInt64 sizeY = 1) const;
87 
90  bool canBeRemotlyAccessed() const;
91 
95  bool hasBinary8BitsStorage() const;
96 
99  ipUInt64 getFullBufferSize() const;
100 
101 protected:
104  BoolResult resizePlan(const ImagePlanGeometry& planGeometry);
105 
108  BoolResult readRawData(const ipUInt64 startOffset,
109  const ipUInt64 size,
110  void* pData) const;
111 
116  BoolResult writeRawData(const ipUInt64 startOffset,
117  const ipUInt64 size,
118  const void* pData);
119 
121  void clearPlanData();
122 
123 // attributes
124 protected:
127 };
128 
131 
132 inline ePlanStorageType
134 {
135  return g_planStorageType;
136 }
137 
140 
141 } // end of namespace image
142 } // end of namespace ipsdk
143 
144 #pragma warning (pop)
145 
146 #endif // __IPSDKIMAGE_REINTERPRETEDPLANSTORAGE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
static const ePlanStorageType::domain g_planStorageType
plan storage type
Definition: ReInterpretedPlanStorage.h:41
re interpreted virtual plan storage associated to a real plan storage
Definition: PlanStorageTypes.h:43
ePlanStorageType getPlanStorageType() const
retrieve plan storage type
Definition: ReInterpretedPlanStorage.h:133
Base class for image plan data storage.
Definition: BasePlanStorage.h:38
#define IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:79
PlanStoragePtr _pOriginalPlanStorage
underlying original plan associated to reinterpreted plan storage
Definition: ReInterpretedPlanStorage.h:126
Class allowing to encapsulate a virtual reinterpreted plan storage associated to a real plan storage...
Definition: ReInterpretedPlanStorage.h:33
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
Class encapsulating image plan geometry.
Definition: ImagePlanGeometry.h:33
ePlanStorageType
Enumerate describing plan storage type.
Definition: PlanStorageTypes.h:33
boost::shared_ptr< BasePlanStorage > PlanStoragePtr
shared pointer to image plan storage
Definition: PlanStorageTypes.h:55
eImageAccessMode
Image access mode.
Definition: ImageTypes.h:110