OpendTect-6_4  6.4
vismpe.h
Go to the documentation of this file.
1 #ifndef vismpe_h
2 #define vismpe_h
3 
4 /*+
5 ________________________________________________________________________
6 
7 (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8 Author: N. Hemstra
9 Date: August 2002
10 RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "mousecursor.h"
17 #include "vissurveymod.h"
18 #include "vissurvobj.h"
19 #include "visobject.h"
20 
21 namespace Attrib { class SelSpec; }
22 template <class T> class Selector;
24 class ZAxisTransform;
25 
26 namespace visBase
27 {
28  class BoxDragger;
29  class TextureChannels;
30  class OrthogonalSlice;
31  class Transformation;
32 };
33 
34 namespace ColTab { class MapperSetup; class Sequence; }
35 namespace MPE { class Engine; };
36 class TaskRunner;
37 
38 
39 namespace visSurvey
40 {
41 
47  public visSurvey::SurveyObject
48 {
49 public:
50  MPEDisplay();
53  "MPEDisplay", ::toUiString(sFactoryKeyword()));
54 
55  bool isInlCrl() const { return true; }
56  bool isOn() const;
57 
58  void showBoxDragger(bool);
59  bool isBoxDraggerShown() const;
60 
61  void showDragger(bool yn);
62  bool isDraggerShown() const;
63 
64  void enablePicking(bool);
65  bool isPickingEnabled() const;
66 
67  void setDraggerTransparency(float);
68  float getDraggerTransparency() const;
69 
70  void setPlaneOrientation(int orient);
71  int getPlaneOrientation() const;
72 
73  bool getPlanePosition(TrcKeyZSampling&) const;
74  void moveMPEPlane(int nrsteps);
75 
76  void updateBoxSpace();
77  void freezeBoxPosition(bool yn);
78 
79  TrcKeyZSampling getTrcKeyZSampling(int attrib=-1) const;
80 
81  void setSelSpec(int,const Attrib::SelSpec&);
82  const char* getSelSpecUserRef() const;
86  const Attrib::SelSpec* getSelSpec(int attrib,int version=0) const;
87 
88  const ColTab::MapperSetup* getColTabMapperSetup(int, int version=0) const;
89  void setColTabMapperSetup(int,
91 
92  const ColTab::Sequence* getColTabSequence(int) const;
93  bool canSetColTabSequence() const;
94  void setColTabSequence(int,const ColTab::Sequence&,
95  TaskRunner*);
96 
97  const MouseCursor* getMouseCursor() const { return &mousecursor_; }
98 
100  IOPar& iop ) const
101  { return SurveyObject::getMousePosInfo(ei,iop);}
102  void getMousePosInfo(const visBase::EventInfo&, Coord3&,
103  BufferString& val, BufferString& info) const;
104  void getObjectInfo(BufferString&) const;
105 
106  void updateSeedOnlyPropagation(bool);
107  void updateMPEActiveVolume();
108  void removeSelectionInPolygon(const Selector<Coord3>&,
109  TaskRunner*);
110 
111  virtual float calcDist(const Coord3&) const;
112  virtual float maxDist() const;
113 
114  virtual void fillPar(IOPar&) const;
115  virtual bool usePar( const IOPar&);
116 
117  NotifierAccess* getMovementNotifier();
118 
121 
122  // methods for volume-based display
123  int addSlice(int dim, bool show);
124  visBase::OrthogonalSlice* getSlice(int index);
125  void updateSlice();
126  float slicePosition(visBase::OrthogonalSlice*) const;
127  float getValue(const Coord3&) const;
128 
129  void removeChild(int displayid);
130  void getChildren(TypeSet<int>&) const;
131 
132  bool setZAxisTransform(ZAxisTransform*,TaskRunner*);
133  const ZAxisTransform* getZAxisTransform() const;
134 
135  void setRightHandSystem(bool yn);
136 
137  bool setDataVolume(int attrib,const RegularSeisDataPack*,
138  TaskRunner*);
139  void setTrcKeyZSampling(const TrcKeyZSampling&);
140 
141  const RegularSeisDataPack* getCacheVolume(int attrib) const;
142  bool setDataPackID(int attrib,DataPack::ID,TaskRunner*);
143  DataPack::ID getDataPackID(int attrib) const;
145  { return DataPackMgr::SeisID(); }
146 
147  virtual bool allowsPicks() const;
148  void allowShading(bool yn );
149  bool hasPosModeManipulator() const { return true; }
150  void showManipulator(bool yn);
151  bool isManipulated() const;
152  bool canResetManipulation() const;
153  void resetManipulation();
154  void acceptManipulation();
155  BufferString getManipulationString() const;
156  NotifierAccess* getManipulationNotifier();
157 
158  static int cInLine() { return 0; }
159  static int cCrossLine() { return 1; }
160  static int cTimeSlice() { return 2; }
161 
162  // texture channel-related methods
163 
164  SurveyObject::AttribFormat getAttributeFormat(int attrib=-1) const;
165 
166  bool canAddAttrib(int nrattribstoadd=1) const;
167  bool canRemoveAttrib() const;
168  int nrAttribs() const;
169  bool addAttrib();
170  bool removeAttrib(int attrib);
171  void enableAttrib(int attrib,bool yn);
172  bool isAttribEnabled(int attrib) const;
173 
174  const char* errMsg() const { return errmsg_.str(); }
175 
176  void setDisplayTransformation(const mVisTrans*);
177 
178 
179 protected:
180  ~MPEDisplay();
181  TrcKeyZSampling getBoxPosition() const;
182  void setPlanePosition(const TrcKeyZSampling&);
183 
184  void setSliceDimension(int slice,int dim);
185  void alignSliceToSurvey(visBase::OrthogonalSlice&);
186 
187  void setSceneEventCatcher(visBase::EventCatcher*);
188 
189  // callback from boxdragger
190  void boxDraggerFinishCB(CallBacker*);
191 
192  // callbacks from MPE
193  void updateBoxPosition(CallBacker*);
194 
195  // methods for volume-based display
196  TrcKeyZSampling getTrcKeyZSampling(bool manippos,bool display,
197  int attrib) const;
198 
199  void triggerSel();
200  void triggerDeSel();
201 
202  bool pickable() const { return true; }
203  bool rightClickable() const { return false; }
204  bool selectable() const { return false; } // check!
205  bool isSelected() const;
206 
207  void turnOnSlice(bool);
208  void updateRanges(bool updateic,bool updatez);
209 
210  // callback from user
211  void mouseClickCB(CallBacker*);
212  void updateMouseCursorCB(CallBacker*);
213 
214  // other callbacks
215  void dataTransformCB(CallBacker*);
216  void sliceMoving(CallBacker*);
217 
218  // texture channel-related methods
219  bool updateFromCacheID(int attrib, TaskRunner* tr);
220 
229 
232 
233  // data for volume-based display
243  int dim_;
245 
246  // texture channel-related data
248 
252 
253  // common keys
254  static const char* sKeyTransparency() { return "Transparency"; }
255  static const char* sKeyBoxShown() { return "Box Shown"; }
256 
257  static const char* sKeyBoxDepthKey() { return "BoxDepthKey"; }
258  static const char* sKeyBoxPlaneKey() { return "BoxPlaneKey"; }
259  static const char* sKeyInDepthBoxResize()
260  { return "InDepthBoxResize"; }
261 
262  static const Color reTrackColor;
263  static const Color eraseColor;
264  static const Color movingColor;
265  static const Color extendColor;
266 
267  // volume-related keys
268  static const char* sKeyNrSlices() { return "Nr of slices"; }
269  static const char* sKeySlice() { return "SliceID"; }
270  static const char* sKeyInline() { return "Inline"; }
271  static const char* sKeyCrossLine() { return "Crossline"; }
272  static const char* sKeyTime() { return "Time"; }
273 
274 };
275 
276 }; // namespace visSurvey
277 
278 #endif
Attrib::SelSpec & curtextureas_
Definition: vismpe.h:230
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
bool allowshading_
Definition: vismpe.h:242
DataPack::ID cacheid_
Definition: vismpe.h:236
visBase::TextureChannels * channels_
Definition: vismpe.h:247
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
static const Color extendColor
Definition: vismpe.h:265
Definition: vistexturechannels.h:50
const MouseCursor * getMouseCursor() const
Definition: vismpe.h:97
Slice that cuts orthogonal through a VolumeData.
Definition: visvolorthoslice.h:30
Export_Basic uiString toUiString(ViewStyle)
static const char * sKeySlice()
Definition: vismpe.h:269
ObjectSet< visBase::OrthogonalSlice > slices_
Definition: vismpe.h:235
visBase::Transformation * voltrans_
Definition: vismpe.h:234
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
Definition: visboxdragger.h:31
TrcKeyZSampling csfromsession_
Definition: vismpe.h:240
Interface class for Notifier. See comments there.
Definition: callback.h:161
static const Color reTrackColor
Definition: vismpe.h:262
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
MPE stands for Model, Predict, Edit. Contains tracking and editing functions.
Definition: autotracker.h:32
static int cTimeSlice()
Definition: vismpe.h:160
int ID
Each Mgr has its own ID.
Definition: datapack.h:147
MouseCursor mousecursor_
Definition: vismpe.h:224
static int cCrossLine()
Definition: vismpe.h:159
static const char * sKeyNrSlices()
Definition: vismpe.h:268
static const Color movingColor
Definition: vismpe.h:264
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:289
SeisDataPack for 2D and 3D seismic data.
Definition: seisdatapack.h:28
bool selectable() const
Definition: vismpe.h:204
static ID SeisID()
Cube/Block (N1xN2xN3) data: 3.
int ID
Definition: datapack.h:38
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
bool hasPosModeManipulator() const
Definition: vismpe.h:149
BufferString slicename_
Definition: vismpe.h:239
Coord3 curboxcenter_
Definition: vismpe.h:250
static const char * sKeyCrossLine()
Definition: vismpe.h:271
Coord3 curboxwidth_
Definition: vismpe.h:251
Definition: callback.h:254
static const char * sKeyInDepthBoxResize()
Definition: vismpe.h:259
VisualObjectImpl
Definition: visobject.h:128
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
bool isOn(int flag=0xffff)
Class that can execute a task.
Definition: task.h:169
int dim_
Definition: vismpe.h:243
Notifier< MPEDisplay > planeOrientationChange
Definition: vismpe.h:120
#define mVisTrans
Definition: visdata.h:31
static const char * sKeyBoxDepthKey()
Definition: vismpe.h:257
bool issliceshown_
Definition: vismpe.h:241
MPE::Engine & engine_
Definition: vismpe.h:221
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
RefMan< const mVisTrans > displaytrans_
Definition: vismpe.h:249
bool manipulated_
Definition: vismpe.h:227
static const char * sKeyTime()
Definition: vismpe.h:272
const RegularSeisDataPack * volumecache_
Definition: vismpe.h:237
Interface for classes that select on basis of a key.
Definition: selector.h:25
Setup class for colortable Mapper.
Definition: coltabmapper.h:35
static const char * sKeyTransparency()
Definition: vismpe.h:254
static const char * sKeyInline()
Definition: vismpe.h:270
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
int lasteventnr_
Definition: vismpe.h:228
A cartesian coordinate in 3D space.
Definition: coord.h:72
const char * errMsg() const
Definition: vismpe.h:174
static int cInLine()
Definition: vismpe.h:158
static const Color eraseColor
Definition: vismpe.h:263
static const char * sKeyBoxShown()
Definition: vismpe.h:255
Definition: visannot.h:43
bool pickable() const
Definition: vismpe.h:202
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool rightClickable() const
Definition: vismpe.h:203
static const char * sKeyBoxPlaneKey()
Definition: vismpe.h:258
BufferString errmsg_
Definition: horizontracker.h:119
TrcKeyZSampling curtexturecs_
Definition: vismpe.h:231
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
bool isInlCrl() const
Definition: vismpe.h:55
Definition: visevent.h:44
visBase::BoxDragger * boxdragger_
Definition: vismpe.h:222
AttribFormat
Definition: vissurvobj.h:175
Color Table
Definition: coltab.h:22
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Definition: vismpe.h:46
virtual DataPackMgr::ID getDataPackMgrID() const
Definition: vismpe.h:144
BufferString sliceposition_
Definition: vismpe.h:238
Notifier< MPEDisplay > boxDraggerStatusChange
Definition: vismpe.h:119
Base class for z-axis transforms.
Definition: zaxistransform.h:37
void getMousePosInfo(const visBase::EventInfo &ei, IOPar &iop) const
Definition: vismpe.h:99
Main engine for tracking EM objects like horizons, faults etc.,.
Definition: mpeengine.h:52
The Transformation is an object that transforms everything following the node.
Definition: vistransform.h:74
Notifier< MPEDisplay > movement
Definition: vismpe.h:225
visBase::EventCatcher * sceneeventcatcher_
Definition: vismpe.h:223
Definition: visevent.h:87
ZAxisTransform * datatransform_
Definition: vismpe.h:244
Semblance Attribute.
Definition: attribdataholder.h:25
Attrib::SelSpec & as_
Definition: vismpe.h:226

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