OpendTect-6_4  6.4
viswell.h
Go to the documentation of this file.
1 #ifndef viswell_h
2 #define viswell_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: October 2003
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 #include "visbasemod.h"
17 #include "color.h"
18 #include "fontdata.h"
19 #include "ranges.h"
20 #include "scaler.h"
21 #include "visobject.h"
22 
23 class TaskRunner;
24 class VisColorTab;
25 class ZAxisTransform;
26 
27 namespace OD { class LineStyle; }
28 
29 namespace osgGeo { class WellLog; }
30 
31 namespace visBase
32 {
33 
34 class PolyLine3D;
35 class PolyLine;
36 class PolyLineBase;
37 class Text2;
38 class Text;
39 class Transformation;
40 class MarkerSet;
41 
42 
46 {
47 public:
48 
49  typedef std::pair<Coord3,float> Coord3Value;
50 
51  static Well* create()
53 
54  enum Side { Left=0, Right };
55 
56  enum LogStyle { Welllog, Seismic, Logtube };
57 
58  mStruct(visBase) BasicParams
59  {
60  BasicParams(){}
61  uiString name_;
62  Color col_;
63  int size_;
64  };
65 
66  //Well
67  mStruct(visBase) TrackParams : public BasicParams
68  {
69  TrackParams()
70  {}
71  Coord3* toppos_;
72  Coord3* botpos_;
73  bool isdispabove_;
74  bool isdispbelow_;
75  FontData font_;
76  bool nmsizedynamic_;
77  };
78 
79  void setTrack(const TypeSet<Coord3>&);
80  void setWellName(const TrackParams&);
81  void showWellTopName(bool);
82  void showWellBotName(bool);
83  bool wellTopNameShown() const;
84  bool wellBotNameShown() const;
85  const PolyLine* getTrack() const { return track_; }
86 
87  //Markers
88  mStruct(visBase) MarkerParams : public BasicParams
89  {
90  MarkerParams()
91  {}
92  int shapeint_;
93  int cylinderheight_;
94  FontData font_;
95  Color namecol_;
96  Coord3* pos_;
97  bool nmsizedynamic_;
98  };
99 
100  void setMarkerSetParams(const MarkerParams&);
101  void addMarker(const MarkerParams&);
102 
103  bool canShowMarkers() const;
104  void showMarkers(bool);
105  int markerScreenSize() const;
106  bool markersShown() const;
107  void showMarkerName(bool);
108  bool markerNameShown() const;
109  const visBase::Text2* getMarkerNames() const { return markernames_; }
110  void removeAllMarkers();
111  void setMarkerScreenSize(int);
112 
113  //logs
114  mStruct(visBase) LogParams : public BasicParams
115  {
116  LogParams()
117  {}
118  float cliprate_;
119  bool isdatarange_;
120  bool islinedisplayed_;
121  bool islogarithmic_;
122  bool issinglcol_;
123  bool isleftfilled_;
124  bool isrightfilled_;
125  bool isblock_;
126  int logwidth_;
127  int logidx_;
128  Well::Side side_;
129  Interval<float> range_;
130  Interval<float> valrange_;
131  bool sclog_;
132  bool iscoltabflipped_;
133 
134  int filllogidx_;
135  const char* fillname_;
136  Interval<float> fillrange_;
137  Interval<float> valfillrange_;
138  const char* seqname_;
139 
140  int repeat_;
141  float ovlap_;
142  Color seiscolor_;
143  LogStyle style_;
144  };
145 
146  const OD::LineStyle& lineStyle() const;
147  void setLineStyle(const OD::LineStyle&);
148 
149  void initializeData(const LogParams&,int);
150  float getValue(const TypeSet<Coord3Value>&,int,bool,
151  const LinScaler&) const;
152  Coord3 getPos(const TypeSet<Coord3Value>&,int) const;
153  void setLogColor(const Color&,Side);
154  const Color& logColor(Side) const;
155  const Color& logFillColor(int) const;
156  void clearLog(Side);
157 
158  void setLogLineDisplayed(bool,Side);
159  bool logLineDisplayed(Side) const;
160  void setLogWidth(float,Side);
161  float getLogWidth(Side) const;
162  void setLogLineWidth(int,Side);
163  int getLogLineWidth() const;
164  void showLogs(bool);
165  void showLog(bool,Side);
166  bool logsShown() const;
167  void showLogName(bool);
168  bool logNameShown() const;
169  void setLogStyle(int,Side);
170  void setLogFill(bool,Side);
171  void setLogBlock(bool,int);
172  void setOverlapp(float,Side);
173  void setRepeat( int,Side );
174  void removeLogs();
175  void setTrackProperties(Color&,int);
176  void setLogFillColorTab(const LogParams&,Side);
177 
178  void setDisplayTransformation(const mVisTrans*);
179  const mVisTrans* getDisplayTransformation() const;
180  void setPixelDensity(float);
181  float getPixelDensity() const { return pixeldensity_;}
182  void setZAxisTransform(ZAxisTransform*,TaskRunner*);
183 
184  void setLogData(const TypeSet<Coord3Value>& crdvals,
185  const TypeSet<Coord3Value>& crdvalsF,
186  const LogParams& lp, bool isFilled );
187  void setLogTubeDisplay(Side side,bool yn);
188 
189  void fillPar(IOPar&) const;
190  bool usePar(const IOPar& par);
192 
193  static const char* linestylestr();
194  static const char* showwelltopnmstr();
195  static const char* showwellbotnmstr();
196  static const char* showmarkerstr();
197  static const char* markerszstr();
198  static const char* showmarknmstr();
199  static const char* showlogsstr();
200  static const char* showlognmstr();
201  static const char* logwidthstr();
202 
204  const visBase::MarkerSet* getMarkerSet() const { return markerset_; }
205  bool hasLog(Side side) const;
206  uiString getLogName(Side side) const;
207  bool getLogOsgData(LogStyle style,Side side,
208  TypeSet<Coord3>&coords,
209  TypeSet<Color>& colors,
210  TypeSet<TypeSet<int> >& pss,
211  TypeSet<Coord3>& normals,
212  bool path) const;
213  void getLogStyle(Side,int&) const;
214  unsigned int getRepeat(Side side) const;
215  float getRepeatStep(Side side) const;
216  const Text2* getWellTopText() const { return welltoptxt_; }
217  const Text2* getWellBottomText() const{ return wellbottxt_; }
218 
219 
220 protected:
221 
222  void transformZIfNeeded(Coord3&) const;
223 
224  ~Well();
227  osgGeo::WellLog* leftlogdisplay_;
228  osgGeo::WellLog* rightlogdisplay_;
229 
234 
236  bool showlogs_;
237 
240  int voiidx_;
241  bool displaytube_[2];
242  bool displaylog_[2];
244 
245 private:
246 
247  void updateText(Text* tx, const uiString& chr,
248  const Coord3* pos,
249  const FontData& fnt);
251  void updateTextNew(Text* tx,const uiString& chr,
252  const Coord3* pos,
253  const FontData& fnt,
254  bool sizedynamic = true);
255 
256  void getLinScale(const LogParams&,
257  LinScaler&,
258  bool isFill = true);
259  void getLinScaleRange( const LinScaler&,
260  Interval<float>&, float&, float&, bool);
261  void updateMakerSize(float sizefactor);
262  void updateMakerNamePosition(Side side,
263  float sizefactor);
264 
265 
266 };
267 
268 } // namespace visBase
269 
270 #endif
#define mExpClass(module)
Definition: commondefs.h:160
const Text2 * getWellTopText() const
Definition: viswell.h:216
float pixeldensity_
Definition: viswell.h:238
Definition: file.h:99
MarkerSet * markerset_
Definition: viswell.h:226
#define mStruct(module)
Definition: commondefs.h:165
int markersize_
Definition: viswell.h:191
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Definition: draw.h:118
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
const Text2 * getWellBottomText() const
Definition: viswell.h:217
const PolyLine * getTrack() const
Definition: viswell.h:85
Definition: uistring.h:89
Definition: viswell.h:56
Definition: vistext.h:33
Data needed to make an actual font.
Definition: fontdata.h:20
FixedString LineStyle()
Definition: keystrs.h:80
const visBase::MarkerSet * getMarkerSet() const
for pdf3d
Definition: viswell.h:204
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
LogStyle
Definition: viswell.h:56
Class that can execute a task.
Definition: task.h:169
osgGeo::WellLog * leftlogdisplay_
Definition: viswell.h:227
#define mVisTrans
Definition: visdata.h:31
Definition: vispolyline.h:36
Definition: vistext.h:93
Definition: directionalsurvey.h:19
osgGeo::WellLog * rightlogdisplay_
Definition: viswell.h:228
Side
Definition: viswell.h:54
ZAxisTransform * zaxistransform_
Definition: viswell.h:239
PolyLine * track_
Definition: viswell.h:225
Text2 * welltoptxt_
Definition: viswell.h:230
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
A cartesian coordinate in 3D space.
Definition: coord.h:72
int voiidx_
Definition: viswell.h:240
bool showlogs_
Definition: viswell.h:236
Definition: visannot.h:43
const visBase::Text2 * getMarkerNames() const
Definition: viswell.h:109
float getPixelDensity() const
Definition: viswell.h:181
std::pair< Coord3, float > Coord3Value
Definition: viswell.h:49
OpendTect.
Definition: commontypes.h:29
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
static Well * create()
Definition: viswell.h:51
Definition: uistring.h:218
#define mCreateDataObj(clss)
Definition: visdata.h:209
Text2 * markernames_
Definition: viswell.h:232
bool showmarkers_
Definition: viswell.h:235
Definition: visobject.h:72
Base class for z-axis transforms.
Definition: zaxistransform.h:37
MarkerSet is a set of basic pickmarker with a constant size on screen. Size and shape are settable...
Definition: vismarkerset.h:36
uiStringSet lognames_
Definition: viswell.h:243
Linear scaling.
Definition: scaler.h:55
Text2 * wellbottxt_
Definition: viswell.h:231
const visBase::Transformation * transformation_
Definition: viswell.h:233

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