IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
InOutImageTile2d.h
1 // InOutImageTile2d.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_INOUTIMAGETILE2D_H__
16 #define __IPSDKIMAGE_INOUTIMAGETILE2D_H__
17 
18 #include <IPSDKImage/Fragment/Tile/Tile2d/BaseImageTile2d.h>
19 
20 namespace ipsdk {
21 namespace image {
22 
23 class InOutImageTile3d;
24 
27 
29 {
30  // declare serial class
32 
33  // declare in/out data
35 
36  // friend class for protected members access
37  friend struct ImageTileExtractor;
38  friend class InOutImageTile3d;
39 
40 // predefined public types
41 public:
42  // Image support type
43  typedef BaseImage ImageType;
44 
45  // Input storage type associated to tile
46  typedef PlanStoragePtr InputStorageType;
47 
48 public:
54 
55 // methods
56 public:
60  FragHybridBuffer& getBuffer();
61 
67  template <typename T>
68  T* getBuffer(const ipUInt64 rowIdx)
69  {
70  return static_cast<T*>(accessBuffer(rowIdx));
71  }
72 
73  //-----------------------------------
76  //-----------------------------------
77 
84  BoolResult readFromImage() const;
85 
94  BoolResult writeToImage();
96 
97 protected:
103  void init(const ipUInt64 zPlanIdx,
104  const ipUInt64 cPlanIdx,
105  const ipUInt64 tPlanIdx,
106  const ipUInt64 tileStartOffsetX,
107  const ipUInt64 tileStartOffsetY,
108  const ipUInt64 tileSizeX,
109  const ipUInt64 tileSizeY,
110  const PlanStoragePtr& pPlanStorage,
111  const DataIdentifierConstPtr& pImageIdentifier,
112  const DataItemMapConstPtr& pImageHeader);
113 
119  void init(const ipUInt64 zPlanIdx,
120  const ipUInt64 cPlanIdx,
121  const ipUInt64 tPlanIdx,
122  const ipUInt64 tileStartOffsetX,
123  const ipUInt64 tileStartOffsetY,
124  const ipUInt64 tileSizeX,
125  const ipUInt64 tileSizeY,
126  const ipUInt64 imageSizeX,
127  const ipUInt64 imageSizeY,
129  const DataIdentifierConstPtr& pImageIdentifier,
130  const DataItemMapConstPtr& pImageHeader);
131 
132 // attributes
133 protected:
134 
135 };
136 
139 
140 inline FragHybridBuffer&
142 {
143  return accessBuffer();
144 }
145 
148 
149 } // end of namespace image
150 } // end of namespace ipsdk
151 
152 #endif // __IPSDKIMAGE_INOUTIMAGETILE2D_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
Structure used to extract image tiles from an image.
Definition: ImageTileExtractor.h:33
#define IPSDK_DECLARE_INOUT_DATA()
macro allowing to declare an in/out data
Definition: DataStatusHdrMacros.h:120
Class allowing to encapsulate an hybrid form of fragment buffer.
Definition: FragHybridBuffer.h:53
Base class for 2 image tiles.
Definition: BaseImageTile2d.h:35
FragHybridBuffer & getBuffer()
retrieve tile full buffer
Definition: InOutImageTile2d.h:141
T * getBuffer(const ipUInt64 rowIdx)
retrieve tile row buffer for a given row index
Definition: InOutImageTile2d.h:68
Input and output class for 3d image tiles.
Definition: InOutImageTile3d.h:26
#define IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:79
IPSDKIMAGEPROCESSING_API processor::RulePtr bufferType(const ImageAttributeConstWeakPtr &pImageAttribute, const IBTAttributeConstWeakPtr &pIBTAttribute)
function allowing to check that an image correspond to a given image buffer types attribute ...
boost::shared_ptr< const DataItemMap > DataItemMapConstPtr
shared pointer to const DataItemMap
Definition: DataItemTypes.h:170
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
Input and output class for 2d image tiles.
Definition: InOutImageTile2d.h:28
FragHybridBuffer & accessBuffer() const
access to tile full buffer
boost::shared_ptr< BasePlanStorage > PlanStoragePtr
shared pointer to image plan storage
Definition: PlanStorageTypes.h:55
boost::shared_ptr< const DataIdentifier > DataIdentifierConstPtr
shared pointer to const data identifier
Definition: DataIdentifierTypes.h:31
Base class for images data type.
Definition: BaseImage.h:43
eImageBufferType
types associated to image buffers
Definition: ImageTypes.h:78