IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
DistributedPlanStorage.h
1 // DistributedPlanStorage.h:
3 // -------------------------
4 //
16 
17 #ifndef __IPSDKIMAGE_DISTRIBUTEDPLANSTORAGE_H__
18 #define __IPSDKIMAGE_DISTRIBUTEDPLANSTORAGE_H__
19 
20 // suppression warnings
21 // warning C4251: 'ipsdk::image::DistributedPlanStorage::_pManager' : class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class
22 #pragma warning (push)
23 #pragma warning (disable : 4251)
24 
25 #include <IPSDKImage/Storage/BasePlanStorage.h>
27 
28 namespace ipsdk {
29 namespace image {
30 
33 
35 {
36  // declare serial class
38 
39 // predefined public types
40 public:
42  static const ePlanStorageType::domain g_planStorageType = ePlanStorageType::ePST_Distributed;
43 
44 public:
50 
51 // methods
52 public:
54  ePlanStorageType getPlanStorageType() const;
55 
61  void init(const ImagePlanGeometry& planGeometry,
62  const DataIdentifierConstPtr& pImageIdentifier,
63  const PlanIndex& planIndex,
64  const LocationMap& locationMap);
65 
68  const DataIdentifierConstPtr& getImageIdentifier() const;
69 
72  const Guid& getImageGuid() const;
73 
76  const std::string& getImageName() const;
77 
80  const PlanIndex& getPlanIndex() const;
81 
84  ipUInt64 getZPlanIdx() const;
85 
88  ipUInt64 getCPlanIdx() const;
89 
92  ipUInt64 getTPlanIdx() const;
93 
96  const LocationMap& getLocationMap() const;
97 
102  void getGuidSet(const ipUInt64 startOffsetY,
103  const ipUInt64 sizeY,
104  GuidSet& guidSet) const;
105 
109  void getGuidSet(GuidSet& guidSet) const;
110 
113  eImageAccessMode getAccessMode() const;
114 
119  bool hasRowDataAccess(const ipUInt64 startOffsetY,
120  const ipUInt64 sizeY = 1) const;
121 
124  bool canBeRemotlyAccessed() const;
125 
129  bool hasBinary8BitsStorage() const;
130 
139  const void* getRowDataPtr(const ipUInt64 offsetY) const;
140  void* getRowDataPtr(const ipUInt64 offsetY);
142 
147  bool hasRemoteData() const;
148 
149 protected:
152  BoolResult resizePlan(const ImagePlanGeometry& planGeometry);
153 
156  BoolResult readRawData(const ipUInt64 startOffset,
157  const ipUInt64 size,
158  void* pData) const;
159 
162  BoolResult readAreaData(const ipUInt64 areaStartOffsetX,
163  const ipUInt64 areaSizeX,
164  const ipUInt64 areaStartOffsetY,
165  const BufferPtrColl& dataColl) const;
166 
171  BoolResult writeRawData(const ipUInt64 startOffset,
172  const ipUInt64 size,
173  const void* pData);
174 
179  BoolResult writeAreaData(const ipUInt64 areaStartOffsetX,
180  const ipUInt64 areaSizeX,
181  const ipUInt64 areaStartOffsetY,
182  const BufferConstPtrColl& dataColl);
183 
185  void clearPlanData();
186 
187 // attributes
188 protected:
191 
194 
198 
201  bool _bOwnData;
202 };
203 
206 
207 inline ePlanStorageType
209 {
210  return g_planStorageType;
211 }
212 
215 
216 } // end of namespace image
217 } // end of namespace ipsdk
218 
219 #pragma warning (pop)
220 
221 #endif // __IPSDKIMAGE_DISTRIBUTEDPLANSTORAGE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
distributed plan storage (potentially hold by remote computers)
Definition: PlanStorageTypes.h:41
PlanIndex _planIndex
plan indexes for plan in full image
Definition: DistributedPlanStorage.h:193
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
std::map< ElementsRange, Guid > LocationMap
collection associating a strip range with a socket Guid
Definition: DistributedImageTypes.h:28
Class encapsulating distributed plan storage.
Definition: DistributedPlanStorage.h:34
LocationMap _locationMap
Definition: DistributedPlanStorage.h:197
Class encapsulating an auto initialized uuid.
Definition: Guid.h:27
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
ePlanStorageType getPlanStorageType() const
retrieve plan storage type
Definition: DistributedPlanStorage.h:208
DataIdentifierConstPtr _pImageIdentifier
identifier associated to full image
Definition: DistributedPlanStorage.h:190
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
Class used to store image plan index.
Definition: PlanIndex.h:26
Class encapsulating image plan geometry.
Definition: ImagePlanGeometry.h:33
ePlanStorageType
Enumerate describing plan storage type.
Definition: PlanStorageTypes.h:33
std::set< Guid > GuidSet
collection of unique ordered guid
Definition: GuidTypes.h:27
boost::shared_ptr< const DataIdentifier > DataIdentifierConstPtr
shared pointer to const data identifier
Definition: DataIdentifierTypes.h:31
Predefined types for distributed image management.
bool _bOwnData
Definition: DistributedPlanStorage.h:201
static const ePlanStorageType::domain g_planStorageType
plan storage type
Definition: DistributedPlanStorage.h:42
eImageAccessMode
Image access mode.
Definition: ImageTypes.h:110