IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseImageGeometry.h
1 // BaseImageGeometry.h:
3 // --------------------
4 //
15 
16 #ifndef __IPSDKIMAGE_BASEIMAGEGEOMETRY_H__
17 #define __IPSDKIMAGE_BASEIMAGEGEOMETRY_H__
18 
19 // suppression warnings
20 // warning C4251: 'ipsdk::image::BaseImageGeometry::_imageBufferType' : class 'ipsdk::image::eImageBufferType' needs to have dll-interface to be used by clients of class 'ipsdk::image::BaseImageGeometry'
21 #pragma warning (push)
22 #pragma warning (disable : 4251)
23 
25 #include <IPSDKImage/Geometry/Component/VolumeGeometry.h>
26 #include <IPSDKImage/Geometry/Component/ColorGeometry.h>
27 #include <IPSDKImage/Geometry/Component/TemporalGeometry.h>
28 #include <IPSDKImage/Geometry/Plan/ImagePlanGeometry.h>
30 #include <IPSDKSerialization/Engine/BaseSerializationObject.h>
31 
32 namespace ipsdk {
33 namespace image {
34 
37 
39 {
40  // declare serial class
42 
43  // friend class for protected access
44  friend class BaseCompleteImage;
45  friend class DiskPlanStorage;
46  friend class UserPlanStorage;
47 
48 public:
52  virtual ~BaseImageGeometry() = 0;
54 
55 // methods
56 public:
58  virtual eImageGeometryType getImageGeometryType() const = 0;
59 
61  bool isInit() const;
62 
66  const VolumeGeometry& getVolumeGeometry() const;
67  VolumeGeometry& getVolumeGeometry();
68  const eVolumeGeometryType& getVolumeGeometryType() const;
69  ipUInt64 getSizeZ() const;
71 
75  const ColorGeometry& getColorGeometry() const;
76  ColorGeometry& getColorGeometry();
77  const eColorGeometryType& getColorGeometryType() const;
78  ipUInt64 getSizeC() const;
80 
84  const TemporalGeometry& getTemporalGeometry() const;
85  TemporalGeometry& getTemporalGeometry();
86  const eTemporalGeometryType& getTemporalGeometryType() const;
87  ipUInt64 getSizeT() const;
89 
93  ipUInt64 getSizeX() const;
94  ipUInt64 getSizeY() const;
96 
99  ipUInt64 getNbTotPlans() const;
100 
104  bool isValidPlanIdx(const ipUInt64 zPlanIdx,
105  const ipUInt64 cPlanIdx,
106  const ipUInt64 tPlanIdx) const;
107  bool isValidPlanIdx(const PlanIndex& planIdx) const;
109 
112  bool isValidPixelIdx(const ipUInt64 x,
113  const ipUInt64 y) const;
114 
117  ipUInt64 getNbPixels() const;
118 
121  ipUInt64 getFullMemorySize() const;
122 
127  const eImageBufferType& getBufferType() const;
128 
131  virtual const eImageBufferType& getBufferType(const ipUInt64 tPlanIdx) const;
132 
135  void resize(const VolumeGeometry& volumeGeometry,
136  const ColorGeometry& colorGeometry,
137  const TemporalGeometry& temporalGeometry,
138  const ipUInt64 sizeX,
139  const ipUInt64 sizeY);
140 
145  virtual void resize(const VolumeGeometry& volumeGeometry,
146  const ColorGeometry& colorGeometry,
147  const TemporalGeometry& temporalGeometry,
148  const ipUInt64 sizeX,
149  const ipUInt64 sizeY,
150  const eImageBufferType& imageBufferType);
151 
156  virtual void setImageBufferType(const eImageBufferType& imageBufferType);
157 
161  ImagePlanGeometry getPlanGeometry(const ipUInt64 tPlanIdx) const;
162 
165  ipUInt64 getPlanNbPixels() const;
166 
170  ipUInt64 getPlanMemorySize(const ipUInt64 tPlanIdx = 0) const;
171 
178  void setVolumeGeometryType(const eVolumeGeometryType& vType);
179  void setColorGeometryType(const eColorGeometryType& cType);
180  void setTemporalGeometryType(const eTemporalGeometryType& tType);
182 
184  void clear();
185 
186 protected:
188  void initBase(const VolumeGeometry& volumeGeometry,
189  const ColorGeometry& colorGeometry,
190  const TemporalGeometry& temporalGeometry,
191  const ipUInt64 sizeX,
192  const ipUInt64 sizeY,
193  const eImageBufferType& imageBufferType);
194 
196  virtual void clearDerived() {}
197 
198 // attributes
199 private:
201  VolumeGeometry _volumeGeometry;
202 
204  ColorGeometry _colorGeometry;
205 
207  TemporalGeometry _temporalGeometry;
208 
210  ipUInt64 _sizeX;
211  ipUInt64 _sizeY;
212 
216  eImageBufferType _imageBufferType;
217 
219  bool _bInit;
220 };
221 
224 
225 inline bool
227 {
228  return _bInit;
229 }
230 
233 
234 } // end of namespace image
235 } // end of namespace ipsdk
236 
237 #pragma warning (pop)
238 
239 #endif // __IPSDKIMAGE_BASEIMAGEGEOMETRY_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
IPSDKGEOMETRY_API ipUInt64 getNbPixels(const ipsdk::geom::RowIntersections &)
return the number of pixels in the input RowIntersections data structure
eImageGeometryType
Image geometry type.
Definition: ImageGeometryTypes.h:42
eColorGeometryType
Color geometry type.
Definition: GeometryComponentTypes.h:45
Base class for image geometry.
Definition: BaseImageGeometry.h:38
#define IPSDK_DECLARE_ABSTRACT_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on abstract class
Definition: SerializationHdrMacro.h:91
eTemporalGeometryType
Temporal geometry type.
Definition: GeometryComponentTypes.h:76
Definition of import/export macro for library.
Predefined types for image geometry management.
Class encapsulating disk plan data.
Definition: DiskPlanStorage.h:32
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
eVolumeGeometryType
Volume geometry type.
Definition: GeometryComponentTypes.h:32
Class used to store image plan index.
Definition: PlanIndex.h:26
Class encapsulating image plan geometry.
Definition: ImagePlanGeometry.h:33
Class encapsulating volume geometryThis class allows to define geometry volume size and type (2d or 3...
Definition: VolumeGeometry.h:34
Class encapsulating color geometryThis class allows to define geometry color size and type (grey...
Definition: ColorGeometry.h:35
Class encapsulating user plan data.
Definition: UserPlanStorage.h:32
Class encapsulating temporal geometryThis class allows to define geometry temporal size and type (sin...
Definition: TemporalGeometry.h:35
bool isInit() const
retrieve object initialisation flag
Definition: BaseImageGeometry.h:226
Base class for serializable class.
Definition: BaseSerializationObject.h:33
Base class for complete images.
Definition: BaseCompleteImage.h:34
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78
virtual void clearDerived()
clear of object data in derived class
Definition: BaseImageGeometry.h:196