IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
UserPlanStorage.h
1 // UserPlanStorage.h:
3 // ------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_USERPLANSTORAGE_H__
16 #define __IPSDKIMAGE_USERPLANSTORAGE_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::UserPlanStorage::_pUserImageAccessor' : class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'ipsdk::image::UserPlanStorage'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKImage/Storage/BasePlanStorage.h>
25 
26 namespace ipsdk {
27 namespace image {
28 
31 
33 {
34  // declare dynamic serializable class
36 
37 // predefined public types
38 public:
40  static const ePlanStorageType::domain g_planStorageType = ePlanStorageType::ePST_User;
41 
42 public:
46  ~UserPlanStorage();
48 
49 // methods
50 public:
52  ePlanStorageType getPlanStorageType() const;
53 
55  void init(UserImageAccessorPtr& pUserImageAccessor,
56  ipUInt64 zPlanIdx,
57  ipUInt64 cPlanIdx,
58  ipUInt64 tPlanIdx);
59 
62  const BaseUserImageAccessor& getUserImageAccessor() const;
63 
66  ipUInt64 getZPlanIdx() const;
67 
70  ipUInt64 getCPlanIdx() const;
71 
74  ipUInt64 getTPlanIdx() const;
75 
78  eImageAccessMode getAccessMode() const;
79 
85  const void* getDataPtr() const;
86  void* getDataPtr();
88 
91  bool canBeRemotlyAccessed() const;
92 
96  bool hasBinary8BitsStorage() const;
97 
98 protected:
101  BoolResult resizePlan(const ImagePlanGeometry& planGeometry);
102 
105  BoolResult readRawData(const ipUInt64 startOffset,
106  const ipUInt64 size,
107  void* pData) const;
108 
113  BoolResult writeRawData(const ipUInt64 startOffset,
114  const ipUInt64 size,
115  const void* pData);
116 
118  void clearPlanData();
119 
120 // attributes
121 protected:
124 
127 
130 
133 };
134 
137 
138 inline ePlanStorageType
140 {
141  return g_planStorageType;
142 }
143 
146 
147 } // end of namespace image
148 } // end of namespace ipsdk
149 
150 #pragma warning (pop)
151 
152 #endif // __IPSDKIMAGE_USERPLANSTORAGE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
boost::shared_ptr< BaseUserImageAccessor > UserImageAccessorPtr
shared pointer to user images accessor
Definition: UserImageTypes.h:23
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
Base class for user image accessors.
Definition: BaseUserImageAccessor.h:31
ipUInt64 _tPlanIdx
t plan index for plan in full image
Definition: UserPlanStorage.h:132
Predefined types for user images manipulation.
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
#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
static const ePlanStorageType::domain g_planStorageType
plan storage type
Definition: UserPlanStorage.h:40
ipUInt64 _cPlanIdx
c plan index for plan in full image
Definition: UserPlanStorage.h:129
user plan storage
Definition: PlanStorageTypes.h:39
Class encapsulating user plan data.
Definition: UserPlanStorage.h:32
ipUInt64 _zPlanIdx
z plan index for plan in full image
Definition: UserPlanStorage.h:126
eImageAccessMode
Image access mode.
Definition: ImageTypes.h:110
UserImageAccessorPtr _pUserImageAccessor
pointer to user image accessor
Definition: UserPlanStorage.h:123
ePlanStorageType getPlanStorageType() const
retrieve plan storage type
Definition: UserPlanStorage.h:139