OpendTect-6_4  6.4
visseis2ddisplay.h
Go to the documentation of this file.
1 #ifndef visseis2ddisplay_h
2 #define visseis2ddisplay_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: N. Hemstra
9  Date: January 2003
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 
17 #include "vissurveymod.h"
18 #include "vismultiattribsurvobj.h"
19 #include "multiid.h"
20 #include "posinfo2dsurv.h"
21 
22 class ZAxisTransform;
23 class Color;
24 
25 namespace visBase
26 {
27  class DrawStyle;
28  class PolyLine;
29  class Text2;
30  class TexturePanelStrip;
31 }
32 
33 namespace visSurvey
34 {
35 
42 public:
43  Seis2DDisplay();
46  "Seis2DDisplay",
47  toUiString(sFactoryKeyword()))
48 
49  void setGeomID(Pos::GeomID geomid);
50  const char* getLineName() const;
51  Pos::GeomID getGeomID() const { return geomid_; }
52 
53  void setGeometry(const PosInfo::Line2DData&);
54  const PosInfo::Line2DData& getGeometry() const { return geometry_; }
55 
56  StepInterval<float> getMaxZRange(bool displayspace) const;
57  void setZRange(const StepInterval<float>&);
58  StepInterval<float> getZRange(bool displayspace,int att=-1) const;
59 
60  void getTraceKeyPath(TrcKeyPath&,
61  TypeSet<Coord>*) const;
62  Interval<float> getDataTraceRange() const;
63 
64  void setTraceNrRange(const Interval<int>&);
65  Interval<int> getTraceNrRange() const;
66  const StepInterval<int>& getMaxTraceNrRange() const;
67 
68  bool setDataPackID(int attrib,DataPack::ID,
69  TaskRunner*);
70  DataPack::ID getDataPackID(int attrib) const;
71  DataPack::ID getDisplayedDataPackID(int attrib) const;
73  { return DataPackMgr::SeisID(); }
74 
75  bool allowsPicks() const { return true; }
76  bool allowMaterialEdit() const { return true; }
77  bool hasColor() const { return true; }
78  Color getColor() const;
79  void setColor(Color);
80  const OD::LineStyle* lineStyle() const;
81  void setLineStyle(const OD::LineStyle&);
82 
83  void enableAttrib(int attrib,bool yn);
84  bool hasSingleColorFallback() const { return true; }
85 
86  void showPanel(bool yn);
87  bool isPanelShown() const;
88  void showPolyLine(bool yn);
89  bool isPolyLineShown() const;
90  void showLineName(bool yn);
91  bool isLineNameShown() const;
92 
93  bool canDuplicate() const { return true; }
94  SurveyObject* duplicate(TaskRunner*) const;
95 
96  void setDisplayTransformation(const mVisTrans*);
97  const mVisTrans* getDisplayTransformation() const;
98 
99  void setPixelDensity(float);
100  float getPixelDensity() const {return pixeldensity_;}
101 
102  float calcDist(const Coord3&) const;
103 
104  int nrResolutions() const;
105  void setResolution(int,TaskRunner*);
106 
107  TrcKeyZSampling getTrcKeyZSampling( int attrib=-1 ) const
108  { return getTrcKeyZSampling( false, attrib ); }
109  TrcKeyZSampling getTrcKeyZSampling(bool displayspace,
110  int attrib=-1) const;
112  SurveyObject::AttribFormat getAttributeFormat(int attrib) const;
113  void getMousePosInfo(const visBase::EventInfo&,
115  BufferString&) const;
116  void getMousePosInfo(const visBase::EventInfo&,
117  IOPar&) const;
118  void getObjectInfo(BufferString&) const;
119  void snapToTracePos(Coord3&) const;
120  int getNearestTraceNr(const Coord3&) const;
121 
122  Coord3 getNearestSubPos(const Coord3& pos,
123  bool usemaxrange) const;
124  float getNearestSegment(const Coord3& pos,
125  bool usemaxrange,int& trcnr1st,
126  int& trcnr2nd,float& frac ) const;
127 
128  Coord3 projectOnNearestPanel(const Coord3& pos,
129  int* nearestpanelidx=0);
130  void getLineSegmentProjection(
131  const Coord3 pos1,const Coord3 pos2,
132  TypeSet<Coord3>& projectedcoords);
133 
134  Coord getCoord(int trcnr) const;
135  virtual Coord3 getNormal( const Coord3& c ) const
136  { return SurveyObject::getNormal( c ); }
137  Coord getNormal(int trcnr) const;
138 
139  bool setZAxisTransform(ZAxisTransform*,TaskRunner*);
140  const ZAxisTransform* getZAxisTransform() const;
141 
142  void clearTexture(int);
143 
144  virtual void setAnnotColor(Color);
145  virtual Color getAnnotColor() const;
146 
148  { return &geomchanged_; }
150  { return &geomidchanged_; }
151 
152  static Seis2DDisplay* getSeis2DDisplay(const MultiID&,const char*);
153  static Seis2DDisplay* getSeis2DDisplay(Pos::GeomID);
154 
155  virtual void annotateNextUpdateStage(bool yn);
156 
157  void fillPar(IOPar&) const;
158  bool usePar(const IOPar&);
160  { return panelstrip_; }
161 
162 protected:
163  ~Seis2DDisplay();
164 
165  virtual void addCache();
166  void removeCache(int);
167  void swapCache(int,int);
168  void emptyCache(int);
169  bool hasCache(int) const;
170  bool getCacheValue(int attrib,int version,
171  const Coord3&,float&) const;
172 
173  const Interval<int> getSampleRange() const;
174 
175  void updatePanelStripPath();
179  void updatePanelStripZRange();
180 
181  void updateLineNamePos();
182  void updateTexOriginAndScale(int attrib,
183  const TrcKeyZSampling&);
184  void updateChannels(int attrib,TaskRunner*);
185  void createTransformedDataPack(int attrib,
186  TaskRunner* =0);
187  bool getNearestTrace(const Coord3&,int& idx,
188  float& sqdist) const;
189  void dataTransformCB(CallBacker*);
190  void updateRanges(bool trc,bool z);
191 
192  mutable int prevtrcidx_;
193 
197 
201 
203 
205  {
210  int size_;
212  };
213 
216 
221 
224  int voiidx_;
226 
228  {
231  };
233 
234  static const char* sKeyLineSetID();
235  static const char* sKeyTrcNrRange();
236  static const char* sKeyZRange();
237  static const char* sKeyShowLineName();
238  static const char* sKeyShowPanel();
239  static const char* sKeyShowPolyLine();
240 
241  //Old format
242  static const char* sKeyTextureID();
243 
244 public:
245 // old stuff, only here to keep other code compiling
246  MultiID getMultiID() const { return datasetid_; }
247 };
248 
249 } // namespace visSurvey
250 
251 
252 #endif
MultiID getMultiID() const
Definition: visseis2ddisplay.h:246
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
TypeSet< Coord > alltrcpos_
Definition: visseis2ddisplay.h:207
Notifier< Seis2DDisplay > geomidchanged_
Definition: visseis2ddisplay.h:220
Pol2D3D getAllowedDataType() const
Definition: visseis2ddisplay.h:111
bool canDuplicate() const
Definition: visseis2ddisplay.h:93
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Export_Basic uiString toUiString(ViewStyle)
Interface class for Notifier. See comments there.
Definition: callback.h:161
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Definition: draw.h:118
Definition: visdrawstyle.h:33
int ID
Each Mgr has its own ID.
Definition: datapack.h:147
StepInterval< float > zrg_
Definition: visseis2ddisplay.h:211
float pixeldensity_
Definition: visseis2ddisplay.h:225
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:289
const mVisTrans * transformation_
Definition: visseis2ddisplay.h:217
StepInterval< int > maxtrcnrrg_
Definition: visseis2ddisplay.h:215
Position info for a 2D line.
Definition: posinfo2d.h:65
static ID SeisID()
Cube/Block (N1xN2xN3) data: 3.
A TexturePanelStrip is geometrically invariant in the z-direction. Its serially connected panels are ...
Definition: vistexturepanelstrip.h:34
TypeSet< DataPack::ID > datapackids_
Definition: visseis2ddisplay.h:198
A cartesian coordinate in 2D space.
Definition: coord.h:25
int voiidx_
Definition: visseis2ddisplay.h:224
int ID
Definition: datapack.h:38
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
float oldtrcrgstart_
Definition: visseis2ddisplay.h:229
bool hasSingleColorFallback() const
Definition: visseis2ddisplay.h:84
Interval< int > rg_
Definition: visseis2ddisplay.h:209
visBase::PolyLine * polyline_
Definition: visseis2ddisplay.h:194
visBase::Text2 * linename_
Definition: visseis2ddisplay.h:218
int size_
Definition: visseis2ddisplay.h:210
virtual DataPackMgr::ID getDataPackMgrID() const
Definition: visseis2ddisplay.h:72
Definition: callback.h:254
Used for displaying a 2D line.
Definition: visseis2ddisplay.h:40
Pos::GeomID getGeomID() const
Definition: visseis2ddisplay.h:51
UpdateStageInfo updatestageinfo_
Definition: visseis2ddisplay.h:232
int prevtrcidx_
Definition: visseis2ddisplay.h:192
virtual Coord3 getNormal(const Coord3 &c) const
Definition: visseis2ddisplay.h:135
Definition: visseis2ddisplay.h:204
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
ZAxisTransform * datatransform_
Definition: visseis2ddisplay.h:223
float oldzrgstart_
Definition: visseis2ddisplay.h:230
TypeSet< DataPack::ID > transfdatapackids_
Definition: visseis2ddisplay.h:199
#define mVisTrans
Definition: visdata.h:31
Definition: vispolyline.h:36
Definition: vistext.h:93
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
TypeSet< int > alltrcnrs_
Definition: visseis2ddisplay.h:206
Pol2D3D
Definition: commontypes.h:39
const PosInfo::Line2DData & getGeometry() const
Definition: visseis2ddisplay.h:54
Pos::GeomID geomid_
Definition: visseis2ddisplay.h:222
NotifierAccess * getManipulationNotifier()
Definition: visseis2ddisplay.h:149
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Notifier< Seis2DDisplay > geomchanged_
Definition: visseis2ddisplay.h:219
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: vismultiattribsurvobj.h:36
Index_Type GeomID
Definition: commontypes.h:52
bool hasColor() const
Definition: visseis2ddisplay.h:77
Definition: visannot.h:43
visBase::TexturePanelStrip * getTexturePanelStrip() const
Definition: visseis2ddisplay.h:159
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool allowMaterialEdit() const
Definition: visseis2ddisplay.h:76
TraceDisplayInfo trcdisplayinfo_
Definition: visseis2ddisplay.h:214
Definition: commontypes.h:39
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
visBase::TexturePanelStrip * panelstrip_
Definition: visseis2ddisplay.h:196
Definition: visevent.h:44
AttribFormat
Definition: vissurvobj.h:175
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Base class for z-axis transforms.
Definition: zaxistransform.h:37
TypeSet< int > alljoints_
Definition: visseis2ddisplay.h:208
NotifierAccess * getMovementNotifier()
Definition: visseis2ddisplay.h:147
Definition: visseis2ddisplay.h:227
visBase::DrawStyle * polylineds_
Definition: visseis2ddisplay.h:195
float getPixelDensity() const
Definition: visseis2ddisplay.h:100
TrcKeyZSampling getTrcKeyZSampling(int attrib=-1) const
Definition: visseis2ddisplay.h:107
Compound key consisting of ints.
Definition: multiid.h:25
PosInfo::Line2DData & geometry_
Definition: visseis2ddisplay.h:202
bool allowsPicks() const
Definition: visseis2ddisplay.h:75
MultiID datasetid_
Definition: visseis2ddisplay.h:200

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