OpendTect-6_4  6.4
isocontourtracer.h
Go to the documentation of this file.
1 #ifndef isocontourtracer_h
2 #define isocontourtracer_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: J.C. Glas
9  Date: November 2007
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "algomod.h"
16 #include "arraynd.h"
17 #include "arrayndimpl.h"
18 #include "ranges.h"
19 #include "polygon.h"
20 
26 {
27 public:
28 
29  IsoContourTracer(const Array2D<float>&);
30  ~IsoContourTracer();
31 
32  void setSampling(const StepInterval<int>& xsamp,
33  const StepInterval<int>& ysamp);
34  void selectRectROI(const Interval<int>& xintv,
35  const Interval<int>& yintv);
36  void selectPolyROI(const ODPolygon<float>*);
37 
38  void setBendPointsOnly(float eps);
39  void setMinNrVertices(int);
40  void setNrLargestOnly(int);
41  void setEdgeValue(float);
42 
43  bool getContours(ObjectSet<ODPolygon<float> >&,
44  float z,bool closedonly=false) const;
45 
46 protected:
47 
48  void findCrossings(Array3DImpl<float>& crossings,
49  float z) const;
50 
51  void traceContours(Array3DImpl<float>& crossings,
53  bool closedonly) const;
54 
55  void addVertex(ODPolygon<float>& contour,
56  bool headinsert,int idx,int idy,
57  int hor,float frac) const;
58 
60 
65 
68  float edgevalue_;
70  unsigned int edgepar_;
71 
73 };
74 
75 
76 #endif
#define mExpClass(module)
Definition: commondefs.h:160
int nrlargestonly_
Definition: isocontourtracer.h:67
StepInterval< int > ysampling_
Definition: isocontourtracer.h:62
Interval< int > yrange_
Definition: isocontourtracer.h:64
const ODPolygon< float > * polyroi_
Definition: isocontourtracer.h:72
float bendpointeps_
Definition: isocontourtracer.h:69
Interval< int > xrange_
Definition: isocontourtracer.h:63
StepInterval< int > xsampling_
Definition: isocontourtracer.h:61
Set of pointers to objects.
Definition: commontypes.h:32
Tracing the z-level contour of a 2D scalar field.
Definition: isocontourtracer.h:25
const Array2D< float > & field_
Definition: isocontourtracer.h:59
float edgevalue_
Definition: isocontourtracer.h:68
int minnrvertices_
Definition: isocontourtracer.h:66
unsigned int edgepar_
Definition: isocontourtracer.h:70

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