OpendTect-6_4  6.4
visrandomtrackdisplay.h
Go to the documentation of this file.
1 #ifndef visrandomtrackdisplay_h
2 #define visrandomtrackdisplay_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 #include "mousecursor.h"
17 #include "vissurveymod.h"
18 #include "vismultiattribsurvobj.h"
19 #include "ranges.h"
20 
21 class TrcKeyZSampling;
22 
23 namespace visBase
24 {
25  class EventCatcher;
26  class PolyLine;
27  class RandomTrackDragger;
28  class MarkerSet;
29  class TexturePanelStrip;
30 }
31 
32 namespace Geometry
33 {
34  class RandomLine;
35 }
36 
37 
38 namespace visSurvey
39 {
40 
41 class Scene;
42 
53 
55 public:
59  "RandomTrackDisplay",
60  toUiString(sFactoryKeyword()));
61 
62  void setRandomLineID(int id);
63  int getRandomLineID() const;
64  Geometry::RandomLine* getRandomLine();
65 
66  int nameNr() const { return namenr_; }
70  bool isInlCrl() const { return true; }
71 
72  int nrResolutions() const { return 3; }
73  void setResolution(int,TaskRunner*);
74 
75  bool hasPosModeManipulator() const { return true; }
76  void showManipulator(bool yn);
77  bool isManipulatorShown() const;
78  bool isManipulated() const;
79  bool canResetManipulation() const { return true; }
80  void resetManipulation();
81  void acceptManipulation();
82  BufferString getManipulationString() const;
83 
84  bool canDuplicate() const { return true; }
85  SurveyObject* duplicate(TaskRunner*) const;
86  MultiID getMultiID() const;
87 
88  bool allowMaterialEdit() const { return true; }
89 
90  SurveyObject::AttribFormat getAttributeFormat(int attrib) const;
91 
92  TypeSet<BinID>* getPath() { return &trcspath_; }
94  void getDataTraceBids(TypeSet<BinID>&) const;
96 
97  void getTraceKeyPath(TrcKeyPath&,
98  TypeSet<Coord>*) const;
99  Interval<float> getDataTraceRange() const;
100  TypeSet<Coord> getTrueCoords() const;
101 
102  bool setDataPackID(int attrib,DataPack::ID,
103  TaskRunner*);
104  DataPack::ID getDataPackID(int attrib) const;
105  DataPack::ID getDisplayedDataPackID(int attrib) const;
107  { return DataPackMgr::SeisID(); }
108 
109  bool canAddNode(int nodenr) const;
114  void addNode(int nodenr);
119  int nrNodes() const;
120  void addNode(const BinID&);
121  void insertNode(int,const BinID&);
122  void setNodePos(int,const BinID&);
123  BinID getNodePos(int) const;
124  BinID getManipNodePos(int) const;
125  void getAllNodePos(TypeSet<BinID>&) const;
126  TypeSet<BinID>* getNodes() { return &nodes_; }
127  void removeNode(int);
128  void removeAllNodes();
129  bool setNodePositions(const TypeSet<BinID>&);
130  void lockGeometry(bool);
131  bool isGeometryLocked() const;
132 
133  TrcKeyZSampling getTrcKeyZSampling(int attrib) const;
134  void setDepthInterval(const Interval<float>&);
135  Interval<float> getDepthInterval() const;
136 
137  const MouseCursor* getMouseCursor() const { return &mousecursor_; }
138 
139  void getMousePosInfo(const visBase::EventInfo&,
140  IOPar&) const;
141  void getMousePosInfo(const visBase::EventInfo&,
142  Coord3&, BufferString&,
143  BufferString&) const;
144 
145  int getSelNodeIdx() const { return selnodeidx_; }
147 
148  virtual NotifierAccess* getMovementNotifier() { return &moving_; }
149  NotifierAccess* getManipulationNotifier() {return &nodemoving_;}
150 
151  int getClosestPanelIdx(const Coord&) const;
152  Coord3 getNormal(const Coord3&) const;
153  virtual float calcDist(const Coord3&) const;
154  virtual bool allowsPicks() const { return true; }
155 
156  virtual void fillPar(IOPar&) const;
157  virtual bool usePar(const IOPar&);
158 
159  bool canBDispOn2DViewer() const { return true; }
160  void setSceneEventCatcher(visBase::EventCatcher*);
162  { return panelstrip_; }
163  const char* getRandomLineName() const;
164 
165 
168 
169  const char* errMsg() const { return errmsg_.str(); }
170  void setPolyLineMode(bool yn);
171  bool createFromPolyLine();
172  void setColor(Color);
173 
174  bool setZAxisTransform(ZAxisTransform*,TaskRunner*);
175  const ZAxisTransform* getZAxisTransform() const;
176 
177  void setDisplayTransformation(const mVisTrans*);
178  const mVisTrans* getDisplayTransformation() const;
179 
180  virtual void annotateNextUpdateStage(bool yn);
181  virtual void setPixelDensity(float);
183  { return &trckeypath_; }
184 
185  static const char* sKeyPanelDepthKey() { return "PanelDepthKey"; }
186  static const char* sKeyPanelPlaneKey() { return "PanelPlaneKey"; }
187  static const char* sKeyPanelRotateKey() { return "PanelRotateKey";}
188 
189 protected:
191 
192  bool getCacheValue(int attrib,int version,
193  const Coord3&,float&) const;
194 
195  void addCache();
196  void removeCache(int);
197  void swapCache(int,int);
198  void emptyCache(int);
199  bool hasCache(int) const;
200 
201  void getDataTraceBids(TypeSet<BinID>&,
202  TypeSet<int>* segments) const;
203  BinID proposeNewPos(int node) const;
204  void updateChannels(int attrib,TaskRunner*);
205  void createTransformedDataPack(int attrib,
206  TaskRunner* =0);
207  void setNodePos(int,const BinID&,bool check);
208 
209  BinID snapPosition(const BinID&) const;
210  bool checkPosition(const BinID&) const;
211 
212  void geomChangeCB(CallBacker*);
213  void nodeMoved(CallBacker*);
214  void draggerRightClick(CallBacker*);
215 
216  void pickCB(CallBacker*);
217  bool checkValidPick(const visBase::EventInfo&,
218  const Coord3& pos) const;
219  void setPickPos(const Coord3& pos);
220  void removePickPos(const Coord3&);
221  void dataTransformCB(CallBacker*);
222  void updateRanges(bool,bool);
223 
224  void updatePanelStripPath();
225  void setPanelStripZRange(const Interval<float>&);
226  float appliedZRangeStep() const;
227  void draggerMoveFinished(CallBacker*);
228  void updateMouseCursorCB(CallBacker*);
229 
231 
234 
236 
239 
242 
248 
251  int voiidx_;
252 
257 
259  {
261  float mapfactor_; // obsolete
262  };
264 
266  bool ismanip_;
267  int namenr_;
271 
272  static const char* sKeyTrack();
273  static const char* sKeyNrKnots();
274  static const char* sKeyKnotPrefix();
275  static const char* sKeyDepthInterval();
276  static const char* sKeyLockGeometry();
277 
278  void updateTexOriginAndScale(
279  int attrib,const TrcKeyPath&,
280  const StepInterval<float>& zrg);
281 public:
282 
283  bool getSelMousePosInfo(const visBase::EventInfo&,
284  Coord3&, BufferString&,
285  BufferString&) const;
286 protected:
287  int getClosestPanelIdx(const Coord&,
288  double* fracptr) const;
289  void mouseCB(CallBacker*);
290  bool isPicking() const;
291  void removePickPos(int polyidx);
292 
293  void addNodeInternal(const BinID&);
294  void insertNodeInternal(int,const BinID&);
295  void removeNodeInternal(int);
296  void movingNodeInternal(int selnodeidx);
297  void finishNodeMoveInternal();
298  void geomNodeMoveCB( CallBacker*);
299  void setNodePositions(const TypeSet<BinID>&,
300  bool onlyinternal);
301 
302  bool isMappingTraceOfBid(BinID bid,int trcidx,
303  bool forward=true) const;
304 
305  void snapZRange(Interval<float>&);
306 };
307 
308 } // namespace visSurvey
309 
310 #endif
static const char * sKeyPanelRotateKey()
Definition: visrandomtrackdisplay.h:187
#define mExpClass(module)
Definition: commondefs.h:160
virtual DataPackMgr::ID getDataPackMgrID() const
Definition: visrandomtrackdisplay.h:106
bool ispicking_
Definition: visrandomtrackdisplay.h:255
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
float mapfactor_
Definition: visrandomtrackdisplay.h:261
static const char * sKeyPanelPlaneKey()
Definition: visrandomtrackdisplay.h:186
const char * str() const
Definition: odstring.h:48
Definition of a mouse cursor, can be either a predefined shape (from the enum, or a file...
Definition: mousecursor.h:26
TypeSet< BinID > * getNodes()
Definition: visrandomtrackdisplay.h:126
Used for displaying a random or arbitrary line.
Definition: visrandomtrackdisplay.h:52
bool lockgeometry_
Definition: visrandomtrackdisplay.h:265
visBase::TexturePanelStrip * getTexturePanelStrip() const
Definition: visrandomtrackdisplay.h:161
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Export_Basic uiString toUiString(ViewStyle)
Notifier< RandomTrackDisplay > moving_
Definition: visrandomtrackdisplay.h:166
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: randomlinegeom.h:31
virtual bool allowsPicks() const
Definition: visrandomtrackdisplay.h:154
int ID
Each Mgr has its own ID.
Definition: datapack.h:147
static const char * sKeyPanelDepthKey()
Definition: visrandomtrackdisplay.h:185
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:289
TypeSet< BinID > nodes_
Definition: visrandomtrackdisplay.h:247
int nrResolutions() const
Definition: visrandomtrackdisplay.h:72
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
int nrgeomchangecbs_
Definition: visrandomtrackdisplay.h:230
A cartesian coordinate in 2D space.
Definition: coord.h:25
int ID
Definition: datapack.h:38
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
int originalresolution_
Definition: visrandomtrackdisplay.h:270
bool polylinemode_
Definition: visrandomtrackdisplay.h:268
bool isInlCrl() const
Definition: visrandomtrackdisplay.h:70
TypeSet< DataPack::ID > datapackids_
Definition: visrandomtrackdisplay.h:244
const TrcKeyPath * getTrcKeyPath()
Definition: visrandomtrackdisplay.h:182
const char * errMsg() const
Definition: visrandomtrackdisplay.h:169
float oldzrgstart_
Definition: visrandomtrackdisplay.h:260
Definition: callback.h:254
TrcKeyPath trckeypath_
Definition: visrandomtrackdisplay.h:253
visBase::EventCatcher * eventcatcher_
Definition: visrandomtrackdisplay.h:240
bool interactivetexturedisplay_
Definition: visrandomtrackdisplay.h:269
UpdateStageInfo updatestageinfo_
Definition: visrandomtrackdisplay.h:263
ZAxisTransform * datatransform_
Definition: visrandomtrackdisplay.h:249
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
visBase::RandomTrackDragger * dragger_
Definition: visrandomtrackdisplay.h:235
Class that can execute a task.
Definition: task.h:169
int oldstyledoubleclicked_
Definition: visrandomtrackdisplay.h:256
NotifierAccess * getManipulationNotifier()
Definition: visrandomtrackdisplay.h:149
int pickstartnodeidx_
Definition: visrandomtrackdisplay.h:254
#define mVisTrans
Definition: visdata.h:31
Definition: vispolyline.h:36
Definition: visrandomtrackdisplay.h:258
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
bool allowMaterialEdit() const
Definition: visrandomtrackdisplay.h:88
int selnodeidx_
Definition: visrandomtrackdisplay.h:243
visBase::TexturePanelStrip * panelstrip_
Definition: visrandomtrackdisplay.h:233
bool ismanip_
Definition: visrandomtrackdisplay.h:266
int getSelNodeIdx() const
knotidx>=0, panelidx<0
Definition: visrandomtrackdisplay.h:145
Definition: visrandomtrackdragger.h:37
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
MouseCursor mousecursor_
Definition: visrandomtrackdisplay.h:241
bool hasPosModeManipulator() const
Definition: visrandomtrackdisplay.h:75
A cartesian coordinate in 3D space.
Definition: coord.h:72
visBase::MarkerSet * markerset_
Definition: visrandomtrackdisplay.h:238
Definition: vismultiattribsurvobj.h:36
Geometry::RandomLine * rl_
Definition: visrandomtrackdisplay.h:232
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
BufferString errmsg_
Definition: horizontracker.h:119
virtual NotifierAccess * getMovementNotifier()
Definition: visrandomtrackdisplay.h:148
Interval< float > depthrg_
Definition: visrandomtrackdisplay.h:250
const MouseCursor * getMouseCursor() const
Definition: visrandomtrackdisplay.h:137
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
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
int namenr_
Definition: visrandomtrackdisplay.h:267
TypeSet< DataPack::ID > transfdatapackids_
Definition: visrandomtrackdisplay.h:245
int voiidx_
Definition: visrandomtrackdisplay.h:251
TypeSet< BinID > trcspath_
Definition: visrandomtrackdisplay.h:246
bool canDuplicate() const
Definition: visrandomtrackdisplay.h:84
Notifier< RandomTrackDisplay > nodemoving_
Definition: visrandomtrackdisplay.h:167
visBase::PolyLine * polyline_
Definition: visrandomtrackdisplay.h:237
bool canResetManipulation() const
Definition: visrandomtrackdisplay.h:79
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
Definition: arraytesselator.h:21
bool canBDispOn2DViewer() const
Definition: visrandomtrackdisplay.h:159
int nameNr() const
Definition: visrandomtrackdisplay.h:66
TypeSet< BinID > * getPath()
BinID-based coding: inner nodes single.
Definition: visrandomtrackdisplay.h:92
Definition: visevent.h:87
Compound key consisting of ints.
Definition: multiid.h:25

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