IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
DiskPlanStorage.h
1 // DiskPlanStorage.h:
3 // ------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_DISKPLANSTORAGE_H__
16 #define __IPSDKIMAGE_DISKPLANSTORAGE_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::DiskPlanStorage::_pImageFile' : class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'ipsdk::image::DiskPlanStorage'
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_Disk;
41 
42 public:
46  ~DiskPlanStorage();
48 
49 // methods
50 public:
52  ePlanStorageType getPlanStorageType() const;
53 
55  void init(DiskImageAccessorPtr& pDiskImageAccessor,
56  ipUInt64 zPlanIdx,
57  ipUInt64 cPlanIdx,
58  ipUInt64 tPlanIdx);
59 
62  const BaseDiskImageAccessor& getDiskImageAccessor() const;
63 
66  ipUInt64 getZPlanIdx() const;
67 
70  ipUInt64 getCPlanIdx() const;
71 
74  ipUInt64 getTPlanIdx() const;
75 
78  eImageAccessMode getAccessMode() const;
79 
82  bool canBeRemotlyAccessed() const;
83 
87  bool hasBinary8BitsStorage() const;
88 
90  virtual ipBool isDiskPlanStorage() const;
91 
92 protected:
95  BoolResult resizePlan(const ImagePlanGeometry& planGeometry);
96 
99  BoolResult readRawData(const ipUInt64 startOffset,
100  const ipUInt64 size,
101  void* pData) const;
102 
107  BoolResult writeRawData(const ipUInt64 startOffset,
108  const ipUInt64 size,
109  const void* pData);
110 
112  void clearPlanData();
113 
114 // attributes
115 protected:
118 
121 
124 
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_DISKPLANSTORAGE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Predefined types for image file manipulation.
Base class for image files accessors.
Definition: BaseDiskImageAccessor.h:31
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
boost::shared_ptr< BaseDiskImageAccessor > DiskImageAccessorPtr
shared pointer to disk image accessor
Definition: DiskImageTypes.h:23
ipUInt64 _cPlanIdx
c plan index for plan in full image
Definition: DiskPlanStorage.h:123
disk plan storage
Definition: PlanStorageTypes.h:37
static const ePlanStorageType::domain g_planStorageType
plan storage type
Definition: DiskPlanStorage.h:40
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
ipUInt64 _zPlanIdx
z plan index for plan in full image
Definition: DiskPlanStorage.h:120
Class encapsulating disk plan data.
Definition: DiskPlanStorage.h:32
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
bool ipBool
Base types definition.
Definition: BaseTypes.h:47
Class encapsulating image plan geometry.
Definition: ImagePlanGeometry.h:33
ePlanStorageType
Enumerate describing plan storage type.
Definition: PlanStorageTypes.h:33
ePlanStorageType getPlanStorageType() const
retrieve plan storage type
Definition: DiskPlanStorage.h:133
ipUInt64 _tPlanIdx
t plan index for plan in full image
Definition: DiskPlanStorage.h:126
DiskImageAccessorPtr _pDiskImageAccessor
pointer to image file accessor
Definition: DiskPlanStorage.h:117
eImageAccessMode
Image access mode.
Definition: ImageTypes.h:110