OpendTect-6_4  6.4
bendpointfinder.h
Go to the documentation of this file.
1 #ifndef bendpointfinder_h
2 #define bendpointfinder_h
3 
4 /*
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: Aug 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 */
14 
15 #include "algomod.h"
16 #include "paralleltask.h"
17 
18 #include "coord.h"
19 #include "ranges.h"
20 #include "thread.h"
21 #include "posinfo2d.h"
22 
23 
31 public:
32 
33  const TypeSet<int>& bendPoints() const { return bendpts_; }
34  uiString uiNrDoneText() const { return tr("Positions done"); }
35 
36 protected:
37  BendPointFinderBase( int sz, float eps );
38  od_int64 nrIterations() const { return sz_; }
39  bool doWork( od_int64, od_int64, int );
40  virtual float getMaxSqDistToLine(int& idx, int start,
41  int stop ) const = 0;
45  void findInSegment( int, int );
46  bool doPrepare(int);
47  bool doFinish(bool);
48 
52  bool finished_; /* Obsolete, will be removed. */
53  int nrwaiting_; /* Obsolete, will be removed. */
54  int nrthreads_; /* Obsolete, will be removed,
55  but now used as nrworking_
56  variable to preserve ABI. */
57  int sz_;
58  const float epssq_;
59 };
60 
61 
67 {
68 public:
69 protected:
70  BendPointFinder2DBase(int size,float eps);
71 
72  virtual const Coord& coord(int idx) const = 0;
73 
74  float getMaxSqDistToLine(int& idx,int start,int stop) const;
75 };
76 
77 
83 {
84 public:
85  BendPointFinder2D(const TypeSet<Coord>&,float eps);
86  BendPointFinder2D(const Coord*,int size,float eps);
87 
88 protected:
89 
90  const Coord& coord(int idx) const;
91  const Coord* coords_;
92 };
93 
94 
100 {
101 public:
102  BendPointFinderTrcKey(const TypeSet<TrcKey>&,float eps);
103 
104 protected:
105 
106  const Coord& coord(int idx) const;
109 };
110 
111 
117 {
118 public:
120  float eps);
121 protected:
122 
123  const Coord& coord(int idx) const;
125 };
126 
127 
133 {
134 public:
136  const Coord3& scale,float eps);
137 protected:
138  float getMaxSqDistToLine(int& idx,int start,int stop) const;
139 
140  const Coord3* coords_;
141  const Coord3 scale_;
142 };
143 
144 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Is an object that faciliates many threads to wait for something to happen.
Definition: thread.h:108
const TypeSet< int > & bendPoints() const
Definition: bendpointfinder.h:33
bool finished_
Definition: bendpointfinder.h:52
Used to find bendpoints in two dimensional datasets.
Definition: bendpointfinder.h:66
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
const Coord3 * coords_
Definition: bendpointfinder.h:140
#define od_int64
Definition: plftypes.h:36
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: bendpointfinder.h:34
Used to find bendpoints in set of XY Coordinates.
Definition: bendpointfinder.h:82
TypeSet< Coord > coords_
Definition: bendpointfinder.h:108
Definition: uistring.h:89
int sz_
Definition: bendpointfinder.h:57
A cartesian coordinate in 2D space.
Definition: coord.h:25
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
Used to find bendpoints in Line 2D Geometry.
Definition: bendpointfinder.h:116
int nrthreads_
Definition: bendpointfinder.h:54
int nrwaiting_
Definition: bendpointfinder.h:53
Base class that does the majority of the work finding bendpoints. Adaptions to different data-types a...
Definition: bendpointfinder.h:29
od_int64 nrIterations() const
Definition: bendpointfinder.h:38
A cartesian coordinate in 3D space.
Definition: coord.h:72
Used to find bendpoints in set of TrcKeys.
Definition: bendpointfinder.h:99
const Coord3 scale_
Definition: bendpointfinder.h:141
Used to find bendpoints in three dimensional datasets.
Definition: bendpointfinder.h:132
const float epssq_
Definition: bendpointfinder.h:58
TypeSet< int > bendpts_
Definition: bendpointfinder.h:49
const TypeSet< PosInfo::Line2DPos > & positions_
Definition: bendpointfinder.h:124
const TypeSet< TrcKey > & tks_
Definition: bendpointfinder.h:107
TypeSet< Interval< int > > queue_
Definition: bendpointfinder.h:50
const Coord * coords_
Definition: bendpointfinder.h:91
Threads::ConditionVar lock_
Definition: bendpointfinder.h:51

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019