DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
geometry
curves
ArithmeticalDSS3d.h
1
17
#pragma once
18
36
#if defined(ArithmeticalDSS3d_RECURSES)
37
#error Recursive header files inclusion detected in ArithmeticalDSS3d.h
38
#else // defined(ArithmeticalDSS3d_RECURSES)
39
40
#define ArithmeticalDSS3d_RECURSES
41
42
#if !defined ArithmeticalDSS3d_h
43
44
#define ArithmeticalDSS3d_h
45
47
// Inclusions
48
#include <iostream>
49
#include <list>
50
#include "DGtal/base/Exceptions.h"
51
#include "DGtal/base/Common.h"
52
#include "DGtal/kernel/PointVector.h"
53
#include "DGtal/kernel/CInteger.h"
54
#include "DGtal/geometry/curves/ArithmeticalDSS.h"
55
#include "DGtal/base/ConstIteratorAdapter.h"
56
#include "DGtal/kernel/BasicPointFunctors.h"
57
59
60
61
namespace
DGtal
62
{
63
64
66
// class ArithmeticalDSS3d
73
template
<
typename
TIterator,
typename
TInteger,
int
connectivity>
74
class
ArithmeticalDSS3d
75
{
76
77
// ----------------------- Types ------------------------------
78
public
:
79
80
81
//entier
82
BOOST_CONCEPT_ASSERT
((
CInteger<TInteger>
) );
83
typedef
TInteger
Integer
;
84
85
86
//requiered types
87
typedef
TIterator
ConstIterator
;
88
typedef
ArithmeticalDSS3d<ConstIterator,TInteger,connectivity>
Self
;
89
typedef
ArithmeticalDSS3d<ReverseIterator<ConstIterator>
,TInteger,connectivity>
Reverse
;
90
91
92
//points and vectors
93
typedef
typename
IteratorCirculatorTraits<ConstIterator>::Value
Point3d
;
94
typedef
typename
IteratorCirculatorTraits<ConstIterator>::Value
Vector3d
;
95
typedef
typename
Point3d::Coordinate
Coordinate
;
96
97
typedef
DGtal::PointVector<2,Coordinate>
Point2d
;
98
typedef
DGtal::PointVector<2,Coordinate>
Vector2d
;
99
100
typedef
DGtal::PointVector<2,double>
PointD2d
;
101
typedef
DGtal::PointVector<3,double>
PointD3d
;
102
typedef
DGtal::PointVector<3,double>
VectorD3d
;
103
104
// adapters for iterator
105
typedef
Projector<SpaceND<2,Coordinate>
>
Projector2d
;
106
107
typedef
ConstIteratorAdapter<ConstIterator,Projector2d,Point2d>
IteratorAdapter
;
108
109
110
//2d-arithmeticalDSS recognition algorithm
111
typedef
DGtal::ArithmeticalDSS<IteratorAdapter,TInteger,connectivity>
ArithmeticalDSS2d
;
112
113
114
// ----------------------- Standard services ------------------------------
115
public
:
116
117
122
ArithmeticalDSS3d
();
123
129
ArithmeticalDSS3d
(
const
ConstIterator
& it);
130
135
void
init
(
const
ConstIterator
& it);
136
137
142
ArithmeticalDSS3d
(
const
ArithmeticalDSS3d
& other );
143
149
ArithmeticalDSS3d
&
operator=
(
const
ArithmeticalDSS3d
& other );
150
154
Self
getSelf
()
const
;
155
159
Reverse
getReverse
()
const
;
160
161
162
171
bool
operator==
(
const
ArithmeticalDSS3d
& other )
const
;
172
179
bool
operator!=
(
const
ArithmeticalDSS3d
& other )
const
;
180
184
~ArithmeticalDSS3d
(){};
185
186
// ----------------------- Interface --------------------------------------
187
public
:
188
189
196
bool
extendForward
();
197
198
204
bool
isExtendableForward
();
205
206
// ------------------------- Accessors ------------------------------
207
216
void
getParameters
(
Vector3d
& direction,
PointD3d
& intercept,
PointD3d
& thickness)
const
;
217
222
bool
isValid
()
const
;
223
224
229
ConstIterator
begin
()
const
;
233
ConstIterator
end
()
const
;
234
235
236
// ------------------ Display ------------------------------------------
237
238
public
:
239
243
std::string
className
()
const
;
244
249
void
selfDisplay
( std::ostream & out ) ;
250
251
// ------------------------- Protected Datas ------------------------------
252
protected
:
253
255
Projector2d
myProjXY
,
myProjXZ
,
myProjYZ
;
256
258
ArithmeticalDSS2d
myXYalgo
;
259
ArithmeticalDSS2d
myXZalgo
;
260
ArithmeticalDSS2d
myYZalgo
;
261
263
ConstIterator
myBegin
,
myEnd
;
264
265
266
// ------------------------- Private Datas --------------------------------
267
268
private
:
269
270
271
};
// end of class ArithmeticalDSS3d
272
273
274
281
template
<
typename
TIterator,
typename
TInteger,
int
connectivity>
282
std::ostream&
283
operator<< ( std::ostream & out, ArithmeticalDSS3d<TIterator,TInteger,connectivity> & object )
284
{
285
object
.selfDisplay( out);
286
return
out;
287
}
288
289
290
}
// namespace DGtal
291
292
293
295
// Includes inline functions/methods.
296
#include "DGtal/geometry/curves/ArithmeticalDSS3d.ih"
297
298
// //
300
301
#endif // !defined ArithmeticalDSS3d_h
302
303
#undef ArithmeticalDSS3d_RECURSES
304
#endif // else defined(ArithmeticalDSS3d_RECURSES)
Generated on Wed Dec 19 2012 19:10:19 for DGtal by
1.8.1.1