IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
SkeletonVertex2d.h
1 // SkeletonVertex2d.h:
3 // -------------------
4 //
22 
23 #ifndef __IPSDKGEOMETRY_SKELETONVERTEX2D_H__
24 #define __IPSDKGEOMETRY_SKELETONVERTEX2D_H__
25 
26 // suppression warnings
27 // warning C4251: 'ipsdk::geom::SkeletonVertex2d::_leafIdxColl' : class 'std::vector<ipsdk::ipUInt64,std::allocator<char32_t>>' needs to have dll-interface to be used by clients of class 'ipsdk::geom::SkeletonVertex2d'
28 #pragma warning (push)
29 #pragma warning (disable : 4251)
30 
32 #include <IPSDKSerialization/Engine/BaseSerializationObject.h>
34 
35 namespace ipsdk {
36 namespace geom {
37 
40 
42 {
43  // declare serial class
45 
46 public:
52 
53 // methods
54 public:
58  inline ipUInt64 getMainPointIdx() const;
59  inline void setMainPointIdx(ipUInt64 mainPointIdx);
61 
65  inline const UInt64Vector& getLeafIdxColl() const;
66  inline UInt64Vector& getLeafIdxColl();
67  inline void setLeafIdxColl(const UInt64Vector& leafIdxColl);
68  inline void addLeafIdx(const ipUInt64 leafIdx);
70 
72  inline ipUInt64 getNbLeafs() const;
73 
77  inline const UInt64Vector& getBranchIdxColl() const;
78  inline UInt64Vector& getBranchIdxColl();
79  inline void setBranchIdxColl(const UInt64Vector& branchIdxColl);
80  inline void addBranchIdx(const ipUInt64 branchIdx);
82 
84  inline ipUInt64 getNbBranches() const;
85 
88  inline void addPointSourceIndex(const ipUInt64 pointIdx);
89  inline const UInt64Vector& getPointSourceIndexColl() const;
90  inline UInt64Vector& getPointSourceIndexColl();
92 
95  inline void addSegmentSourceIndex(const ipUInt64 firstPointIdx,
96  const ipUInt64 secondPointIdx);
97  inline const PairIdxColl& getSegmentSourceIndexColl() const;
98  inline PairIdxColl& getSegmentSourceIndexColl();
100 
102  void clear();
103 
104 // attributes
105 protected:
108 
111 
114 
117 
120 };
121 
124 
125 inline ipUInt64
127 {
128  return _mainPointIdx;
129 }
130 
131 inline void
133 {
134  _mainPointIdx = mainPointIdx;
135 }
136 
137 inline const UInt64Vector&
139 {
140  return _leafIdxColl;
141 }
142 
143 inline UInt64Vector&
145 {
146  return _leafIdxColl;
147 }
148 
149 inline void
151 {
152  _leafIdxColl = leafIdxColl;
153 }
154 
155 void
157 {
158  _leafIdxColl.push_back(leafIdx);
159 }
160 
161 inline ipUInt64
163 {
164  return static_cast<ipUInt64>(_leafIdxColl.size());
165 }
166 
167 
168 inline const UInt64Vector&
170 {
171  return _branchIdxColl;
172 }
173 
174 inline UInt64Vector&
176 {
177  return _branchIdxColl;
178 }
179 
180 inline void
182 {
183  _branchIdxColl = branchIdxColl;
184 }
185 
186 void
188 {
189  _branchIdxColl.push_back(branchIdx);
190 }
191 
192 inline ipUInt64
194 {
195  return static_cast<ipUInt64>(_branchIdxColl.size());
196 }
197 
198 inline void
200 {
201  _pointSourceIndexColl.push_back(pointIdx);
202 }
203 
204 inline const UInt64Vector&
206 {
207  return _pointSourceIndexColl;
208 }
209 
210 inline UInt64Vector&
212 {
213  return _pointSourceIndexColl;
214 }
215 
216 inline void
218  const ipUInt64 secondPointIdx)
219 {
220  _segmentSourceIndexColl.push_back(PairIdx(firstPointIdx, secondPointIdx));
221 }
222 
223 inline const PairIdxColl&
225 {
227 }
228 
229 inline PairIdxColl&
231 {
233 }
234 
237 
238 } // end of namespace geom
239 } // end of namespace ipsdk
240 
241 #pragma warning (pop)
242 
243 #endif // __IPSDKGEOMETRY_SKELETONVERTEX2D_H__
#define IPSDK_DECLARE_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:73
std::pair< ipUInt64, ipUInt64 > PairIdx
pair of point indexes
Definition: Skeleton2dTypes.h:83
UInt64Vector _leafIdxColl
collection of leaf edge points index
Definition: SkeletonVertex2d.h:110
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
ipUInt64 getNbLeafs() const
retrieve number of leafs associated to vertex
Definition: SkeletonVertex2d.h:162
void addSegmentSourceIndex(const ipUInt64 firstPointIdx, const ipUInt64 secondPointIdx)
access to polygon segment source index associated to vertex
Definition: SkeletonVertex2d.h:217
UInt64Vector _branchIdxColl
collection of branch edge vertices index
Definition: SkeletonVertex2d.h:113
void setLeafIdxColl(const UInt64Vector &leafIdxColl)
access to the collection of leaf edge points index associated to vertex
Definition: SkeletonVertex2d.h:150
const PairIdxColl & getSegmentSourceIndexColl() const
access to polygon segment source index associated to vertex
Definition: SkeletonVertex2d.h:224
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
const UInt64Vector & getPointSourceIndexColl() const
access to polygon point source index associated to vertex
Definition: SkeletonVertex2d.h:205
std::vector< ipUInt64 > UInt64Vector
stl vector collections
Definition: BaseCollections.h:35
std::vector< PairIdx > PairIdxColl
collection of pair of point indexes
Definition: Skeleton2dTypes.h:86
ipUInt64 getMainPointIdx() const
access to the index of main point associated to vertex
Definition: SkeletonVertex2d.h:126
const UInt64Vector & getBranchIdxColl() const
access to the collection of branch edge vertices index associated to vertex
Definition: SkeletonVertex2d.h:169
Class allowing to represent a vertex into a skeleton associated to a polygon.
Definition: SkeletonVertex2d.h:41
Definition of import/export macro for library.
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
const UInt64Vector & getLeafIdxColl() const
access to the collection of leaf edge points index associated to vertex
Definition: SkeletonVertex2d.h:138
ipUInt64 getNbBranches() const
retrieve number of branches associated to vertex
Definition: SkeletonVertex2d.h:193
PairIdxColl _segmentSourceIndexColl
collection of polygon segment source index
Definition: SkeletonVertex2d.h:119
void addBranchIdx(const ipUInt64 branchIdx)
access to the collection of branch edge vertices index associated to vertex
Definition: SkeletonVertex2d.h:187
ipUInt64 _mainPointIdx
index of point associated to skeleton vertex
Definition: SkeletonVertex2d.h:107
Predefined types for voronoi skeleton management.
void setMainPointIdx(ipUInt64 mainPointIdx)
access to the index of main point associated to vertex
Definition: SkeletonVertex2d.h:132
UInt64Vector _pointSourceIndexColl
collection of polygon point source index
Definition: SkeletonVertex2d.h:116
Base class for serializable class.
Definition: BaseSerializationObject.h:33
void setBranchIdxColl(const UInt64Vector &branchIdxColl)
access to the collection of branch edge vertices index associated to vertex
Definition: SkeletonVertex2d.h:181
void addPointSourceIndex(const ipUInt64 pointIdx)
access to polygon point source index associated to vertex
Definition: SkeletonVertex2d.h:199
void addLeafIdx(const ipUInt64 leafIdx)
access to the collection of leaf edge points index associated to vertex
Definition: SkeletonVertex2d.h:156