OpendTect-6_4  6.4
visemobjdisplay.h
Go to the documentation of this file.
1 #ifndef visemobjdisplay_h
2 #define visemobjdisplay_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: May 2004
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 #include "vissurveymod.h"
17 #include "bufstringset.h"
18 #include "draw.h"
19 #include "emposid.h"
20 #include "visobject.h"
21 #include "vissurvobj.h"
22 #include "emobject.h"
23 
24 class ZAxisTransform;
25 
26 namespace EM { class EMManager; class EMObject; }
27 namespace Geometry { class Element; }
28 namespace visBase
29 {
30  class DataObjectGroup;
31  class DrawStyle;
32  class TextureChannel2RGBA;
33  class MarkerSet;
34 }
35 
36 namespace visSurvey
37 {
39 {
42 
44  {
45  Threads::Locker locker( lock_ );
46  emcallbackdata_ += data;
47  }
48 
49  const EM::EMObjectCallbackData* getCallBackData( int idx ) const
50  {
51  if ( idx<emcallbackdata_.size() )
52  return emcallbackdata_[idx];
53  return 0;
54  }
55 
56  void clearData()
57  {
58  Threads::Locker locker( lock_ );
59  deepErase( emcallbackdata_ );
60  }
61 
62  int size() const { return emcallbackdata_.size(); }
63 };
64 
65 class MPEEditor;
66 class EdgeLineSetDisplay;
67 
68 
70  , public visSurvey::SurveyObject
71 {
72 public:
73  const mVisTrans* getDisplayTransformation() const;
74  void setDisplayTransformation(const mVisTrans*);
75  void setSceneEventCatcher( visBase::EventCatcher* );
77  { return false; }
79  { return zaxistransform_; }
80 
81  virtual bool setEMObject(const EM::ObjectID&,TaskRunner*);
82  EM::ObjectID getObjectID() const;
83  virtual bool updateFromEM(TaskRunner*);
84  virtual void updateFromMPE();
85 
86  void showPosAttrib( int attr, bool yn);
89  bool showsPosAttrib( int attr ) const;
93  const char* errMsg() const { return errmsg_.str(); }
94 
95  MultiID getMultiID() const;
96  BufferStringSet displayedSections() const;
97 
98  virtual void setOnlyAtSectionsDisplay(bool yn);
99  virtual bool displayedOnlyAtSections() const;
100 
101  virtual void turnOnSelectionMode(bool);
102  bool allowMaterialEdit() const { return true; }
103  const OD::LineStyle* lineStyle() const;
104  void setLineStyle(const OD::LineStyle&);
105 
106  bool hasColor() const;
107  void setColor(Color);
108  Color getColor() const;
109 
110  bool allowsPicks() const { return true; }
111 
112  void getObjectInfo(BufferString&) const;
114  IOPar& iop ) const
115  { return SurveyObject::getMousePosInfo(ei,iop);}
116  virtual void getMousePosInfo(const visBase::EventInfo&,
117  Coord3&,
118  BufferString& val,
119  BufferString& info) const;
120  MPEEditor* getEditor();
121  void enableEditing(bool yn);
122  bool isEditingEnabled() const;
123 
124  virtual EM::SectionID getSectionID(int visid) const = 0;
125  EM::SectionID getSectionID(const TypeSet<int>* path) const;
126 
127  EM::PosID getPosAttribPosID(int attrib,
128  const TypeSet<int>& path,
129  const Coord3& clickeddisplaypos) const;
130 
131  virtual bool canRemoveSelection() const { return true; }
132  virtual bool removeSelections(TaskRunner*);
133  virtual void clearSelections();
134  virtual void updateAuxData() {}
135 
136  virtual bool setChannels2RGBA(visBase::TextureChannel2RGBA*);
137  virtual visBase::TextureChannel2RGBA* getChannels2RGBA();
138 
139  virtual void fillPar(IOPar&) const;
140  virtual bool usePar(const IOPar&);
141 
142  NotifierAccess* getMovementNotifier() { return &hasmoved; }
144 
145  void lock(bool yn);
146  NotifierAccess* getLockNotifier() { return &locknotifier;}
147  virtual void doOtherObjectsMoved(
149  int whichobj ) =0;
150  virtual void setPixelDensity(float dpi);
151  const visBase::MarkerSet* getSeedMarkerSet() const;
152 
153 
154 protected:
155  EMObjectDisplay();
156  ~EMObjectDisplay();
157  virtual void removeEMStuff();
158 
159  virtual void removeSectionDisplay(const EM::SectionID&) = 0;
160  virtual bool addSection(const EM::SectionID&,TaskRunner*)=0;
161 
162  virtual EM::PosID findClosestNode(const Coord3&) const;
163  virtual void emChangeCB(CallBacker*);
164  virtual void clickCB(CallBacker*);
165  virtual void updatePosAttrib(int attrib);
166  void polygonFinishedCB(CallBacker*);
167 
168  virtual void updateSelections();
169  void handleEmChange(const EM::EMObjectCallbackData&);
170 
173 
177 
179 
182 
187 
190  //set in usePar,
191  //should be nil when given
192  //to channels_.
193 
195 
197  mutable bool nontexturecolisset_;
202 
204  bool ctrldown_;
209 
210  static const char* sKeyEarthModelID();
211  static const char* sKeyResolution();
212  static const char* sKeyEdit();
213  static const char* sKeyOnlyAtSections();
214  static const char* sKeyLineStyle();
215  static const char* sKeySections();
216  static const char* sKeyPosAttrShown();
217 
218 
219 private:
220  void unSelectAll();
221  void updateLockedSeedsColor();
222  const TypeSet<int> findOverlapSelectors(
225 public:
226  virtual bool getOnlyAtSectionsDisplay() const
227  { return displayedOnlyAtSections(); }
228 };
229 
230 } // namespace visSurvey
231 
232 #endif
bool burstalertison_
Definition: visemobjdisplay.h:203
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
od_int32 ObjectID
Definition: emposid.h:24
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Locks the lock, shutting out access from other threads if needed.
Definition: threadlock.h:85
const char * str() const
Definition: odstring.h:48
EM::EMObject * emobject_
Definition: visemobjdisplay.h:184
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Definition: visemobjdisplay.h:69
TypeSet< EM::SubID > selectionids_
Definition: visemobjdisplay.h:207
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
MPEEditor * editor_
Definition: visemobjdisplay.h:188
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
TypeSet< int > parposattrshown_
Definition: visemobjdisplay.h:181
visBase::EventCatcher * eventcatcher_
Definition: visemobjdisplay.h:176
virtual void updateAuxData()
Definition: visemobjdisplay.h:134
Definition: visdrawstyle.h:33
Color nontexturecol_
Definition: visemobjdisplay.h:196
virtual bool getOnlyAtSectionsDisplay() const
Definition: visemobjdisplay.h:226
const EM::EMObjectCallbackData * getCallBackData(int idx) const
Definition: visemobjdisplay.h:49
NotifierAccess * getMovementNotifier()
Definition: visemobjdisplay.h:142
visBase::DrawStyle * drawstyle_
Definition: visemobjdisplay.h:198
Set of BufferString objects.
Definition: bufstringset.h:28
const char * errMsg() const
Definition: visemobjdisplay.h:93
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
Definition: vismpeeditor.h:44
ZAxisTransform * zaxistransform_
Definition: visemobjdisplay.h:175
Definition: vistexturechannel2rgba.h:36
Definition: callback.h:254
size_type size() const
Definition: objectset.h:50
ObjectSet< visBase::MarkerSet > posattribmarkers_
Definition: visemobjdisplay.h:178
bool allowsPicks() const
Definition: visemobjdisplay.h:110
bool enableedit_
Definition: visemobjdisplay.h:200
VisualObjectImpl
Definition: visobject.h:128
Definition: vispolygonselection.h:40
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
#define mVisTrans
Definition: visdata.h:31
Manages the loaded/half loaded EM objects in OpendTect.
Definition: emmanager.h:46
const mVisTrans * transformation_
Definition: visemobjdisplay.h:174
EM::EMManager & em_
Definition: visemobjdisplay.h:183
virtual bool canRemoveSelection() const
Definition: visemobjdisplay.h:131
ObjectSet< Selector< Coord3 > > selectors_
Definition: visemobjdisplay.h:205
ObjectSet< const EM::EMObjectCallbackData > emcallbackdata_
Definition: visemobjdisplay.h:40
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Notifier< EMObjectDisplay > locknotifier
Definition: visemobjdisplay.h:172
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString errmsg_
Definition: horizontracker.h:119
Base class for all EarthModel objects.
Definition: emobject.h:158
BufferStringSet parsections_
Definition: visemobjdisplay.h:186
void getMousePosInfo(const visBase::EventInfo &ei, IOPar &iop) const
Definition: visemobjdisplay.h:113
EM object callback data.
Definition: emobject.h:46
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
TypeSet< int > posattribs_
Definition: visemobjdisplay.h:180
const ZAxisTransform * getZAxisTransform() const
Definition: visemobjdisplay.h:78
Definition: visevent.h:44
bool allowMaterialEdit() const
Definition: visemobjdisplay.h:102
visBase::TextureChannel2RGBA * channel2rgba_
Definition: visemobjdisplay.h:189
bool ctrldown_
Definition: visemobjdisplay.h:204
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Notifier< EMObjectDisplay > hasmoved
Definition: visemobjdisplay.h:171
EMChangeData emchangedata_
Definition: visemobjdisplay.h:208
Threads::Lock lock_
Definition: visemobjdisplay.h:41
MultiID parmid_
Definition: visemobjdisplay.h:185
virtual bool setZAxisTransform(ZAxisTransform *, TaskRunner *)
Definition: visemobjdisplay.h:76
Definition: visemobjdisplay.h:38
Base class for z-axis transforms.
Definition: zaxistransform.h:37
void clearData()
Definition: visemobjdisplay.h:56
Notifier< EMObjectDisplay > changedisplay
Definition: visemobjdisplay.h:143
bool restoresessupdate_
Definition: visemobjdisplay.h:201
bool nontexturecolisset_
Definition: visemobjdisplay.h:197
int size() const
Definition: visemobjdisplay.h:62
TypeSet< EM::SectionID > addsectionids_
Definition: visemobjdisplay.h:194
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
Definition: visevent.h:87
Compound key consisting of ints.
Definition: multiid.h:25
void addCallBackData(const EM::EMObjectCallbackData *data)
Definition: visemobjdisplay.h:43
bool displayonlyatsections_
Definition: visemobjdisplay.h:199
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:118
NotifierAccess * getLockNotifier()
Definition: visemobjdisplay.h:146

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