IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PythonImageAccessor.h
Go to the documentation of this file.
1 // PythonImageAccessor.h:
3 // -----------------------
4 //
14 
15 #ifndef __TESTIMAGES_PYTHONIMAGEACCESSOR_H__
16 #define __TESTIMAGES_PYTHONIMAGEACCESSOR_H__
17 
18 #include <IPSDKImage/Accessor/BaseDiskImageAccessor.h>
19 #include <IPSDKImage/Geometry/BaseImageGeometry.h>
20 
21 #include <unordered_map>
22 #include <boost/shared_ptr.hpp>
23 
24 namespace ipsdk {
25 namespace python {
26 
30 {
31  // declare serial class
32  IPSDK_DECLARE_SERIAL_WITHOUT_COPY(IPSDKImage, PythonImageAccessor);
33 
34  public:
40 
41  // methods
42  public:
50  void init(const std::string& imageName,
51  const ipsdk::image::eImageAccessMode& accessMode,
53  const ipsdk::GeometricCalibrationConstPtr pGeometricCalibration,
54  const ipsdk::ipUInt64 sizeXAlign,
55  void* pData);
56 
60  bool hasBinary8BitsStorage() const { return true; }
61 
64 
65  protected:
69 
78  const ipsdk::ipUInt64 cPlanIdx,
79  const ipsdk::ipUInt64 tPlanIdx,
80  const ipsdk::ipUInt64 pixelsStartOffset,
81  const ipsdk::ipUInt64 nbPixels,
82  void* pData) const;
83 
92  const ipsdk::ipUInt64 cPlanIdx,
93  const ipsdk::ipUInt64 tPlanIdx,
94  const ipsdk::ipUInt64 pixelsStartOffset,
95  const ipsdk::ipUInt64 nbPixels,
96  const void* pData);
97 
98 
100  void clearDerived();
101 
102  // attributes
103  protected:
105  void* _pData;
106 
109 
112 
115 
118 
121 
124 
127 
130 
133 };
134 
135 typedef boost::shared_ptr<PythonImageAccessor> PythonImageAccessorPtr;
136 
139 
140 } // end of namespace python
141 } // end of namespace ipsdk
142 
143 #endif // __TESTIMAGES_PYTHONIMAGEACCESSOR_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
void init(const std::string &imageName, const ipsdk::image::eImageAccessMode &accessMode, const ipsdk::image::BaseImageGeometry &geometry, const ipsdk::GeometricCalibrationConstPtr pGeometricCalibration, const ipsdk::ipUInt64 sizeXAlign, void *pData)
object initialization method
void clearDerived()
clear data in derived class
Base class for image files accessors.
Definition: BaseDiskImageAccessor.h:31
ipsdk::BoolResult writeRawData(const ipsdk::ipUInt64 zPlanIdx, const ipsdk::ipUInt64 cPlanIdx, const ipsdk::ipUInt64 tPlanIdx, const ipsdk::ipUInt64 pixelsStartOffset, const ipsdk::ipUInt64 nbPixels, const void *pData)
write row data segment to user image
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
ipsdk::ipUInt64 _sizeXAlign
number of columns (with the alignment data)
Definition: PythonImageAccessor.h:117
boost::shared_ptr< const ipsdk::GeometricCalibration > GeometricCalibrationConstPtr
shared pointer to const ipsdk::GeometricCalibration
Definition: GeometricCalibrationTypes.h:31
ipsdk::ipUInt8 _dataBaseSize
data base size
Definition: PythonImageAccessor.h:108
Base class for image geometry.
Definition: BaseImageGeometry.h:38
ipsdk::ipUInt64 _sizeY
number of lines
Definition: PythonImageAccessor.h:123
uint8_t ipUInt8
Base types definition.
Definition: BaseTypes.h:49
ipsdk::BoolResult readRawData(const ipsdk::ipUInt64 zPlanIdx, const ipsdk::ipUInt64 cPlanIdx, const ipsdk::ipUInt64 tPlanIdx, const ipsdk::ipUInt64 pixelsStartOffset, const ipsdk::ipUInt64 nbPixels, void *pData) const
read row data segment from user image
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
ipsdk::ipUInt64 getSizeXAlign()
returns the size along the x direction with alignment data
Definition: PythonImageAccessor.h:29
ipsdk::ipUInt64 _sizeZ
number of plans
Definition: PythonImageAccessor.h:126
bool hasBinary8BitsStorage() const
method allowing to check whether image underlying storage stores binary data with a 8 bit alignment ...
Definition: PythonImageAccessor.h:60
ipsdk::ipUInt64 _planSize
plan size (without the alignment data)
Definition: PythonImageAccessor.h:114
ipsdk::BoolResult resizeData(const ipsdk::image::BaseImageGeometry &geometry)
resize user image given a geometry
ipsdk::ipUInt64 _planSizeAlign
plan size (with the alignment data)
Definition: PythonImageAccessor.h:111
void * _pData
pointer to first voxel of IPSDK image data
Definition: PythonImageAccessor.h:105
ipsdk::ipUInt64 _sizeT
number of frames
Definition: PythonImageAccessor.h:132
ipsdk::ipUInt64 _sizeX
number of columns (without the alignment data)
Definition: PythonImageAccessor.h:120
eImageAccessMode
Image access mode.
Definition: ImageTypes.h:110
ipsdk::ipUInt64 _sizeC
number of color channels
Definition: PythonImageAccessor.h:129