OpendTect-6_4  6.4
welldisp.h
Go to the documentation of this file.
1 #ifndef welldisp_h
2 #define welldisp_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bruno
9  Date: Dec 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "wellmod.h"
16 #include "fontdata.h"
17 #include "namedobj.h"
18 #include "color.h"
19 #include "ranges.h"
20 #include "survinfo.h"
21 
22 #include "bufstringset.h"
23 
24 
25 namespace Well
26 {
27 
28 inline const char* sKey2DDispProp() { return "2D Display"; }
29 inline const char* sKey3DDispProp() { return "3D Display"; }
30 
36 {
37 public:
38 
39  DisplayProperties(const char* subj = sKey3DDispProp());
41  { *this = dp;}
42 
43  virtual ~DisplayProperties();
44 
45  DisplayProperties& operator = (const DisplayProperties& dp);
46 
47  mStruct(Well) BasicProps
48  {
49  BasicProps( int sz=1 )
50  : size_(sz)
51  , color_(Color(0,0,255)) {}
52 
53  Color color_;
54  int size_;
55 
56  void usePar(const IOPar&);
57  void fillPar(IOPar&) const;
58  void useLeftPar(const IOPar&);
59  void useRightPar(const IOPar&);
60  void fillLeftPar(IOPar&) const;
61  void fillRightPar(IOPar&) const;
62 
63  virtual const char* subjectName() const = 0;
64 
65  protected:
66 
67  virtual void doUsePar(const IOPar&) {}
68  virtual void doFillPar(IOPar&) const {}
69  virtual void doUseLeftPar(const IOPar&) {}
70  virtual void doFillRightPar(IOPar&) const {}
71  virtual void doUseRightPar(const IOPar&) {}
72  virtual void doFillLeftPar(IOPar&) const {}
73 
74  };
75 
76  mStruct(Well) Track : public BasicProps
77  {
78  Track()
79  : BasicProps(1)
80  , dispabove_(true)
81  , dispbelow_(true)
82  , font_(10)
83  , nmsizedynamic_(true)
84  {}
85 
86  virtual const char* subjectName() const { return "Track"; }
87 
88  bool dispabove_;
89  bool dispbelow_;
90  bool nmsizedynamic_;
91  FontData font_;
92 
93  protected:
94 
95  virtual void doUsePar(const IOPar&);
96  virtual void doFillPar(IOPar&) const;
97 
98  };
99 
100  mStruct(Well) Markers : public BasicProps
101  {
102 
103  Markers()
104  : BasicProps(2)
105  , shapeint_(0)
106  , cylinderheight_(1)
107  , issinglecol_(false)
108  , font_(10)
109  , samenmcol_(true)
110  , nmsizedynamic_(true)
111  {}
112 
113  virtual const char* subjectName() const { return "Markers"; }
114 
115  int shapeint_;
116  int cylinderheight_;
117  bool issinglecol_;
118  FontData font_;
119  Color nmcol_;
120  bool samenmcol_;
121  BufferStringSet selmarkernms_;
122  bool nmsizedynamic_;
123 
124  protected:
125 
126  virtual void doUsePar(const IOPar&);
127  virtual void doFillPar(IOPar&) const;
128  };
129 
130  mStruct(Well) Log : public BasicProps
131  {
132  Log()
133  : cliprate_(0)
134  , fillname_("none")
135  , fillrange_(mUdf(float),mUdf(float))
136  , isleftfill_(false)
137  , isrightfill_(false)
138  , isdatarange_(true)
139  , islogarithmic_(false)
140  , islogreverted_(false)
141  , issinglecol_(false)
142  , name_("none")
143  , logwidth_(250 *
144  ((int)(SI().xyInFeet() ? mToFeetFactorF:1)))
145  , range_(mUdf(float),mUdf(float))
146  , repeat_(5)
147  , repeatovlap_(50)
148  , seiscolor_(Color::White())
149  , seqname_("Rainbow")
150  , iscoltabflipped_(false)
151  , style_( 0 )
152  {}
153 
154  virtual const char* subjectName() const { return "Log"; }
155 
156  BufferString name_;
157  BufferString fillname_;
158  float cliprate_;
159  Interval<float> range_;
160  Interval<float> fillrange_;
161  bool isleftfill_;
162  bool isrightfill_;
163  bool islogarithmic_;
164  bool islogreverted_;
165  bool issinglecol_;
166  bool isdatarange_;
167  bool iscoltabflipped_;
168  int repeat_;
169  float repeatovlap_;
170  Color linecolor_;
171  Color seiscolor_;
172  BufferString seqname_;
173  int logwidth_;
174  int style_;
175 
176  protected:
177 
178  virtual void doUseLeftPar(const IOPar&);
179  virtual void doFillRightPar(IOPar&) const;
180  virtual void doUseRightPar(const IOPar&);
181  virtual void doFillLeftPar(IOPar&) const;
182  };
183 
184  Track track_;
185  Markers markers_;
186  bool displaystrat_; //2d only
187 
188  virtual void usePar(const IOPar&);
189  virtual void fillPar(IOPar&) const;
190 
191  static DisplayProperties& defaults();
192  static void commitDefaults();
193 
194  mStruct(Well) LogCouple { Log left_, right_; };
195  ObjectSet<LogCouple> logs_;
196 
197  virtual const char* subjectName() const { return subjectname_.buf(); }
198 
199 protected:
200 
202 
203 };
204 
205 } // namespace
206 
207 #endif
Display properties of a well.
Definition: welldisp.h:35
#define mExpClass(module)
Definition: commondefs.h:160
#define mStruct(module)
Definition: commondefs.h:165
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Well log.
Definition: welllog.h:44
bool displaystrat_
Definition: welldisp.h:186
DisplayProperties(const Well::DisplayProperties &dp)
Definition: welldisp.h:40
const char * sKey2DDispProp()
Definition: welldisp.h:28
Markers markers_
Definition: welldisp.h:185
Definition: file.h:99
Set of BufferString objects.
Definition: bufstringset.h:28
BufferString subjectname_
Definition: welldisp.h:201
Data needed to make an actual font.
Definition: fontdata.h:20
virtual const char * subjectName() const
Definition: welldisp.h:197
const char * sKey3DDispProp()
Definition: welldisp.h:29
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
FixedString Color()
Definition: keystrs.h:46
Definition: directionalsurvey.h:19
Well track.
Definition: welltrack.h:29
#define mToFeetFactorF
Definition: commondefs.h:112
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
const SurveyInfo & SI()
static Color White()
Definition: color.h:85
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
struct(Well) Track struct(Well) Markers struct(Well) Log Track track_
Definition: welldisp.h:130
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26

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