IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MemoryImage.h
1 // MemoryImage.h:
3 // --------------
4 //
14 
15 #ifndef __IPSDKIMAGE_MEMORYIMAGE_H__
16 #define __IPSDKIMAGE_MEMORYIMAGE_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::image::MemoryImage::_pGeometry' : class 'boost::shared_ptr<T>' needs to have dll-interface to be used by clients of class 'ipsdk::image::MemoryImage'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKImage/Image/BaseCompleteImage.h>
24 
25 namespace ipsdk {
26 namespace image {
27 
30 
32 {
33  // declare serial class
35 
36  // friend class for protected members access
37  friend boost::shared_ptr<MemoryImage> boost::make_shared<MemoryImage>();
38 
39 // predefined public types
40 public:
42  static const eImageType::domain g_imageType = eImageType::eIT_Memory;
43 
44 protected:
46  MemoryImage();
47 
48 public:
50  ~MemoryImage();
51 
52 // methods
53 public:
55  eImageType getImageType() const;
56 
58  ipBool isGpuImage() const;
59 
61  ipBool isDiskImage() const;
62 
65  virtual BoolResult init(const BaseImageGeometry& geometry);
66 
69  eImageAccessMode getAccessMode() const;
70 
75  BoolResult resize(const BaseImageGeometry& geometry);
76 
81  const void* getDataPtr(const PlanIndex& planIndex) const;
82  void* getDataPtr(const PlanIndex& planIndex);
84 
88  const void* getDataPtr(const ipUInt64 zPlanIdx,
89  const ipUInt64 cPlanIdx,
90  const ipUInt64 tPlanIdx) const;
91  void* getDataPtr(const ipUInt64 zPlanIdx,
92  const ipUInt64 cPlanIdx,
93  const ipUInt64 tPlanIdx);
94 
96 
97 protected:
100  BoolResult createImagePlans(const BaseImageGeometry& geometry,
101  PlanStorageColl3d& imagePlans);
102 
103 // attributes
104 protected:
105 
106 };
107 
110 
111 inline eImageType
113 {
114  return g_imageType;
115 }
116 
117 inline ipBool
119 {
120  return false;
121 }
122 
123 inline ipBool
125 {
126  return false;
127 }
128 
131 
132 } // end of namespace image
133 } // end of namespace ipsdk
134 
135 #pragma warning (pop)
136 
137 #endif // __IPSDKIMAGE_MEMORYIMAGE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Image class with data stored into memory.
Definition: MemoryImage.h:31
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
ipBool isGpuImage() const
returns true if the image is loaded on GPU
Definition: MemoryImage.h:118
eImageType getImageType() const
retrieve image type
Definition: MemoryImage.h:112
Base class for image geometry.
Definition: BaseImageGeometry.h:38
IPSDKIMAGE_API ImageGeometryPtr geometry(const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const VolumeGeometry &volumeGeometry, const ColorGeometry &colorGeometry, const TemporalGeometry &temporalGeometry)
create an image geometry
memory image
Definition: ImageTypes.h:60
#define IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:79
eImageType
Enumerate describing image type.
Definition: ImageTypes.h:58
std::vector< PlanStorageColl2d > PlanStorageColl3d
Definition: ImageTypes.h:196
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
static const eImageType::domain g_imageType
type associated to attribute
Definition: MemoryImage.h:42
Class used to store image plan index.
Definition: PlanIndex.h:26
bool ipBool
Base types definition.
Definition: BaseTypes.h:47
ipBool isDiskImage() const
returns true if the image is a disk one
Definition: MemoryImage.h:124
Base class for complete images.
Definition: BaseCompleteImage.h:34
eImageAccessMode
Image access mode.
Definition: ImageTypes.h:110