OpendTect  6.6
welldisp.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: Bruno
8  Date: Dec 2008
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "wellmod.h"
15 #include "fontdata.h"
16 #include "namedobj.h"
17 #include "color.h"
18 #include "ranges.h"
19 #include "survinfo.h"
20 
21 #include "bufstringset.h"
22 
23 
24 class uiWellDispPropDlg;
25 class uiWellPartServer;
26 
27 
28 namespace Well
29 {
30 class Data;
31 inline const char* sKey2DDispProp() { return "2D Display"; }
32 inline const char* sKey3DDispProp() { return "3D Display"; }
33 
39 {
40 public:
41 
42  DisplayProperties(const char* subj = sKey3DDispProp());
44  { *this = dp; setValid( dp.isValid() );
45  setModified(false); }
46 
47  virtual ~DisplayProperties();
48 
49  DisplayProperties& operator =(const DisplayProperties&);
50  bool operator ==(const DisplayProperties&) const;
51  bool operator !=(const DisplayProperties&) const;
52 
53  bool is2D() const;
54  bool isValid() const;
55  bool isModified() const;
56 
57  mStruct(Well) BasicProps
58  {
59  BasicProps( int sz=1 )
60  : size_(sz)
61  , color_(Color(0,0,255)) {}
62  virtual ~BasicProps() {}
63 
64  bool operator ==(const BasicProps&) const;
65 
66  Color color_;
67  int size_;
68 
69  void usePar(const IOPar&);
70  void fillPar(IOPar&) const;
71  void useLeftPar(const IOPar&);
72  void useRightPar(const IOPar&);
73  void useCenterPar(const IOPar&);
74  void fillLeftPar(IOPar&) const;
75  void fillRightPar(IOPar&) const;
76  void fillCenterPar(IOPar&) const;
77 
78  virtual const char* subjectName() const = 0;
79 
80  protected:
81 
82  virtual void doUsePar(const IOPar&) {}
83  virtual void doFillPar(IOPar&) const {}
84  virtual void doUseLeftPar(const IOPar&) {}
85  virtual void doFillRightPar(IOPar&) const {}
86  virtual void doUseRightPar(const IOPar&) {}
87  virtual void doFillLeftPar(IOPar&) const {}
88 
89  };
90 
91  mStruct(Well) Track : public BasicProps
92  {
93  Track()
94  : BasicProps(1)
95  , dispabove_(true)
96  , dispbelow_(true)
97  , font_(10)
98  , nmsizedynamic_(false)
99  {}
100  ~Track() {}
101 
102  virtual const char* subjectName() const { return "Track"; }
103 
104  bool operator ==(const Track&) const;
105  bool operator !=(const Track&) const;
106 
107  bool dispabove_;
108  bool dispbelow_;
109  bool nmsizedynamic_;
110  FontData font_;
111 
112  protected:
113 
114  virtual void doUsePar(const IOPar&);
115  virtual void doFillPar(IOPar&) const;
116 
117  };
118 
119  mStruct(Well) Markers : public BasicProps
120  {
121 
122  Markers();
123  Markers(const Markers&);
124  ~Markers();
125 
126  Markers& operator=(const Markers&);
127  bool operator ==(const Markers&) const;
128  bool operator !=(const Markers&) const;
129 
130  virtual const char* subjectName() const { return "Markers"; }
131  bool isEmpty() const;
132  bool isSelected(const char* nm) const;
133 
134  const BufferStringSet& markerNms(bool issel) const;
135  void setMarkerNms(const BufferStringSet&,bool issel);
136 
137  int shapeint_;
138  int cylinderheight_;
139  bool issinglecol_;
140  FontData font_;
141  Color nmcol_;
142  bool samenmcol_;
143  BufferStringSet selmarkernms_;
144  bool nmsizedynamic_;
145 
146 
147  protected:
148 
149  virtual void doUsePar(const IOPar&);
150  virtual void doFillPar(IOPar&) const;
151 
152  void adjustSelection(const BufferStringSet& markernms);
153 
154  const BufferStringSet& unselmarkernms() const;
155  BufferStringSet& unselmarkernms();
156 
157  friend class DisplayProperties;
158  };
159 
160  mStruct(Well) Log : public BasicProps
161  {
162  Log()
163  : cliprate_(0)
164  , fillname_("None")
165  , fillrange_(mUdf(float),mUdf(float))
166  , isleftfill_(false)
167  , isrightfill_(false)
168  , isdatarange_(true)
169  , islogarithmic_(false)
170  , islogreverted_(false)
171  , issinglecol_(false)
172  , name_("None")
173  , logwidth_(250 *
174  ((int)(SI().xyInFeet() ? mToFeetFactorF:1)))
175  , range_(mUdf(float),mUdf(float))
176  , repeat_(5)
177  , repeatovlap_(50)
178  , seiscolor_(Color::White())
179  , seqname_("Rainbow")
180  , iscoltabflipped_(false)
181  , style_( 0 )
182  {}
183  ~Log() {}
184 
185  bool operator==(const Log&) const;
186  bool operator!=(const Log&) const;
187 
188  virtual const char* subjectName() const { return "Log"; }
189  void setTo(const Well::Data*, const Log&,
190  bool forceifmissing=false);
191 
192  BufferString name_;
193  BufferString fillname_;
194  float cliprate_;
195  Interval<float> range_;
196  Interval<float> fillrange_;
197  bool isleftfill_;
198  bool isrightfill_;
199  bool islogarithmic_;
200  bool islogreverted_;
201  bool issinglecol_;
202  bool isdatarange_;
203  bool iscoltabflipped_;
204  int repeat_;
205  float repeatovlap_;
206  Color linecolor_;
207  Color seiscolor_;
208  BufferString seqname_;
209  int logwidth_;
210  int style_;
211 
212  protected:
213 
214  virtual void doUseLeftPar(const IOPar&);
215  virtual void doFillRightPar(IOPar&) const;
216  virtual void doUseRightPar(const IOPar&);
217  virtual void doFillLeftPar(IOPar&) const;
218 
219  public:
220  void doLogUseCenterPar(const IOPar&);
221  void doLogFillCenterPar(IOPar&) const;
222  };
223 
224  void setTrack(const Track&);
225  void setMarkers(const Well::Data*,const Markers&);
226  void setMarkersNms(const BufferStringSet&,bool issel);
227  void setLeftLog(const Well::Data*,const Log&,
228  int panelidx=0,bool forceifmissing=false);
229  void setCenterLog(const Well::Data*,const Log&,
230  int panelidx=0,bool forceifmissing=false);
231  void setRightLog(const Well::Data*,const Log&,
232  int panelidx=0,bool forceifmissing=false);
233  void setDisplayStrat(bool yn);
234 
235  Track track_; //Will become private
236  Markers markers_; //Will become private
237  bool displaystrat_; //2d only, will become private
238 
239  virtual void usePar(const IOPar&);
240  virtual void fillPar(IOPar&) const;
242 
244  static void commitDefaults();
245 
246  mStruct(Well) LogCouple
247  {
248  LogCouple();
249  LogCouple(const LogCouple&);
250  ~LogCouple();
251 
252  LogCouple& operator =(const LogCouple&);
253  bool operator ==(const LogCouple&) const;
254  bool operator !=(const LogCouple&) const;
255 
256  Log left_, right_;
257  Log& center();
258  const Log& center() const;
259  };
260  ObjectSet<LogCouple> logs_; //Will become private
261 
262  virtual const char* subjectName() const { return subjectname_.buf(); }
263 
264 protected:
265 
267 
268 private:
269 
270  void setValid(bool yn);
271  void setModified(bool yn);
272  friend class ::uiWellDispPropDlg;
273  friend class ::uiWellPartServer;
274 };
275 
276 } // namespace
277 
Well::DisplayProperties::displaystrat_
bool displaystrat_
Definition: welldisp.h:237
uiWellDispPropDlg
Well display properties dialog box.
Definition: uiwelldisppropdlg.h:32
Well::DisplayProperties::ensureColorContrastWith
void ensureColorContrastWith(Color)
Well::DisplayProperties::logs_
ObjectSet< LogCouple > logs_
Definition: welldisp.h:259
Well::DisplayProperties::setMarkersNms
void setMarkersNms(const BufferStringSet &, bool issel)
sKey::Color
FixedString Color()
Definition: keystrs.h:45
Well::Data
The holder of all data concerning a certain well.
Definition: welldata.h:121
ObjectSet< LogCouple >
Well::DisplayProperties::fillPar
virtual void fillPar(IOPar &) const
Well::DisplayProperties::is2D
bool is2D() const
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
Well::DisplayProperties::subjectName
virtual const char * subjectName() const
Definition: welldisp.h:262
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Well::DisplayProperties::DisplayProperties
DisplayProperties(const Well::DisplayProperties &dp)
Definition: welldisp.h:43
namedobj.h
usePar
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
Well::DisplayProperties::markers_
Markers markers_
Definition: welldisp.h:236
Well::DisplayProperties::isModified
bool isModified() const
Repos::Data
@ Data
Definition: repos.h:24
operator==
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
Well::DisplayProperties::defaults
static DisplayProperties & defaults()
Well::sKey2DDispProp
const char * sKey2DDispProp()
Definition: welldisp.h:31
isEmpty
bool isEmpty(const NLAModel *mdl)
Well::DisplayProperties::setMarkers
void setMarkers(const Well::Data *, const Markers &)
Well::DisplayProperties::setLeftLog
void setLeftLog(const Well::Data *, const Log &, int panelidx=0, bool forceifmissing=false)
Well::DisplayProperties::~DisplayProperties
virtual ~DisplayProperties()
Well::Track
Well track.
Definition: welltrack.h:29
Well
Definition: directionalsurvey.h:20
Well::DisplayProperties::setValid
void setValid(bool yn)
Well::DisplayProperties::DisplayProperties
DisplayProperties(const char *subj=sKey3DDispProp())
Well::DisplayProperties::setTrack
struct(Well) Track struct(Well) Markers struct(Well) Log void setTrack(const Track &)
operator!=
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
mStruct
#define mStruct(module)
Definition: commondefs.h:182
Well::DisplayProperties::track_
Track track_
Definition: welldisp.h:235
SI
const SurveyInfo & SI()
Well::DisplayProperties::setRightLog
void setRightLog(const Well::Data *, const Log &, int panelidx=0, bool forceifmissing=false)
File::Log
@ Log
Definition: file.h:122
Well::DisplayProperties::isValid
bool isValid() const
fillPar
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:174
Well::DisplayProperties::subjectname_
BufferString subjectname_
Definition: welldisp.h:266
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Well::Log
Well log.
Definition: welllog.h:44
Well::DisplayProperties
Display properties of a well.
Definition: welldisp.h:39
survinfo.h
bufstringset.h
Well::DisplayProperties::usePar
virtual void usePar(const IOPar &)
Well::DisplayProperties::setModified
void setModified(bool yn)
mUdf
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
color.h
fontdata.h
uiWellPartServer
Part Server for Wells.
Definition: uiwellpartserv.h:38
Well::DisplayProperties::commitDefaults
static void commitDefaults()
Well::sKey3DDispProp
const char * sKey3DDispProp()
Definition: welldisp.h:32
FontData
Data needed to make an actual font.
Definition: fontdata.h:20
Well::DisplayProperties::setDisplayStrat
void setDisplayStrat(bool yn)
ranges.h
Interval< float >
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
mToFeetFactorF
#define mToFeetFactorF
Definition: commondefs.h:125
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
Well::DisplayProperties::setCenterLog
void setCenterLog(const Well::Data *, const Log &, int panelidx=0, bool forceifmissing=false)

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