OpendTect  6.3
bendpointfinder.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Kristofer Tingdahl
8  Date: Aug 2009
9 ________________________________________________________________________
10 
11 */
12 
13 #include "algomod.h"
14 #include "paralleltask.h"
15 
16 #include "coord.h"
17 #include "ranges.h"
18 #include "thread.h"
19 #include "posinfo2d.h"
20 
21 
29 public:
30 
31  const TypeSet<int>& bendPoints() const { return bendpts_; }
32  uiString nrDoneText() const { return tr("Positions done"); }
33 
34 protected:
35  BendPointFinderBase( int sz, float eps );
36  od_int64 nrIterations() const { return sz_; }
37  bool doWork( od_int64, od_int64, int );
38  virtual float getMaxSqDistToLine(int& idx, int start,
39  int stop ) const = 0;
43  bool doPrepare(int);
44  bool doFinish(bool);
45 
46 private:
47  void findInSegment( int, int );
48 
53 
54  int sz_;
55  const float epssq_;
56 };
57 
58 
64 {
65 public:
66 protected:
67  BendPointFinder2DBase(int size,float eps);
68 
69  virtual const Coord& coord(int idx) const = 0;
70 
71  float getMaxSqDistToLine(int& idx,int start,int stop) const;
72 };
73 
74 
80 {
81 public:
82  BendPointFinder2D(const TypeSet<Coord>&,float eps);
83  BendPointFinder2D(const Coord*,int size,float eps);
84 
85 protected:
86 
87  const Coord& coord(int idx) const;
88  const Coord* coords_;
89 };
90 
91 
97 {
98 public:
99  BendPointFinderTrcKey(const TypeSet<TrcKey>&,float eps);
100 
101 protected:
102 
103  const Coord& coord(int idx) const;
106 };
107 
108 
114 {
115 public:
117  float eps);
118 protected:
119 
120  const Coord& coord(int idx) const;
122 };
123 
124 
130 {
131 public:
133  const Coord3& scale,float eps);
134 protected:
135  float getMaxSqDistToLine(int& idx,int start,int stop) const;
136 
137  const Coord3* coords_;
138  const Coord3 scale_;
139 };
#define mExpClass(module)
Definition: commondefs.h:157
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:31
Used to find bendpoints in two dimensional datasets.
Definition: bendpointfinder.h:63
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
const Coord3 * coords_
Definition: bendpointfinder.h:137
#define od_int64
Definition: plftypes.h:34
int nrworking_
Definition: bendpointfinder.h:52
Used to find bendpoints in set of XY Coordinates.
Definition: bendpointfinder.h:79
TypeSet< Coord > coords_
Definition: bendpointfinder.h:105
Definition: uistring.h:88
int sz_
Definition: bendpointfinder.h:54
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:64
3D point or vector
Definition: commontypes.h:57
Used to find bendpoints in Line 2D Geometry.
Definition: bendpointfinder.h:113
Base class that does the majority of the work finding bendpoints. Adaptions to different data-types a...
Definition: bendpointfinder.h:27
od_int64 nrIterations() const
Definition: bendpointfinder.h:36
Used to find bendpoints in set of TrcKeys.
Definition: bendpointfinder.h:96
const Coord3 scale_
Definition: bendpointfinder.h:138
Used to find bendpoints in three dimensional datasets.
Definition: bendpointfinder.h:129
const float epssq_
Definition: bendpointfinder.h:55
TypeSet< int > bendpts_
Definition: bendpointfinder.h:49
const TypeSet< PosInfo::Line2DPos > & positions_
Definition: bendpointfinder.h:121
const TypeSet< TrcKey > & tks_
Definition: bendpointfinder.h:104
TypeSet< Interval< int > > queue_
Definition: bendpointfinder.h:50
2D point or vector class.
Definition: commontypes.h:58
const Coord * coords_
Definition: bendpointfinder.h:88
Threads::ConditionVar lock_
Definition: bendpointfinder.h:51
uiString nrDoneText() const
Definition: bendpointfinder.h:32

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