OpendTect-6_4  6.4
uiodviewer2dmgr.h
Go to the documentation of this file.
1 #ifndef uiodviewer2dmgr_h
2 #define uiodviewer2dmgr_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  CopyRight: (C) dGB Beheer B.V.
8  Author: Umesh Sinha
9  Date: Apr 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiodmainmod.h"
16 #include "callback.h"
17 #include "datapack.h"
18 #include "emposid.h"
19 #include "flatview.h"
20 #include "geom2dintersections.h"
21 #include "uigeom.h"
22 #include "uigraphicsviewbase.h"
23 #include "uiodapplmgr.h"
24 #include "uiodviewer2dposgrp.h"
25 
26 class uiFlatViewer;
27 class uiODViewer2D;
28 class uiTreeFactorySet;
29 class MouseEventHandler;
30 class TrcKeyZSampling;
31 class Vw2DDataObject;
32 namespace Attrib { class SelSpec; }
33 
36 public:
37 
39  {
40  SelectedAuxAnnot(int auxposidx=-1,
41  bool isx1=true,bool selected=false)
42  : auxposidx_(auxposidx)
43  , isx1_(isx1)
44  , oldauxpos_(mUdf(float))
45  , isselected_(selected) {}
47  bool isx1_;
49  float oldauxpos_;
50  bool isValid() const { return auxposidx_>=0;}
51  };
52 
53  uiODViewer2D* getParent2DViewer(int vw2dobjid);
54  uiODViewer2D* find2DViewer(int id,bool byvisid);
55  uiODViewer2D* find2DViewer(const MouseEventHandler&);
56  uiODViewer2D* find2DViewer(const Pos::GeomID&);
57  uiODViewer2D* find2DViewer(const TrcKeyZSampling&);
58  int nr2DViewers() const;
59 
60  int displayIn2DViewer(DataPack::ID,
61  const Attrib::SelSpec&,
63  bool wva);
64  int displayIn2DViewer(
65  Viewer2DPosDataSel&,bool wva,
66  float initialx1pospercm=mUdf(float),
67  float initialx2pospercm=mUdf(float));
68  void displayIn2DViewer(int visid,int attribid,
69  bool wva);
70  void remove2DViewer(int id,bool byvisid);
71 
72  uiTreeFactorySet* treeItemFactorySet2D() { return tifs2d_; }
73  uiTreeFactorySet* treeItemFactorySet3D() { return tifs3d_; }
74 
75  //3D Horizons
76  void getHor3DVwr2DIDs( EM::ObjectID emid,
77  TypeSet<int>& vw2dids) const;
78  void removeHorizon3D(EM::ObjectID emid);
79  void addHorizon3Ds(const TypeSet<EM::ObjectID>&);
80  void addNewTrackingHorizon3D(EM::ObjectID mid);
81  void getLoadedHorizon3Ds(
82  TypeSet<EM::ObjectID>&) const;
83  // 2D Horizons
84  void getHor2DVwr2DIDs( EM::ObjectID emid,
85  TypeSet<int>& vw2dids) const;
86  void removeHorizon2D(EM::ObjectID emid);
87  void getLoadedHorizon2Ds(
88  TypeSet<EM::ObjectID>&) const;
89  void addHorizon2Ds(const TypeSet<EM::ObjectID>&);
90  void addNewTrackingHorizon2D(EM::ObjectID mid);
91 
92  //Faults
93  void removeFault(EM::ObjectID emid);
94  void addFaults(const TypeSet<EM::ObjectID>&);
95  void addNewTempFault(EM::ObjectID mid);
96  void getLoadedFaults( TypeSet<EM::ObjectID>&) const;
97  void getFaultVwr2DIDs(EM::ObjectID emid,
98  TypeSet<int>&) const;
99 
100  //FaultStickSet
101  void getFaultSSVwr2DIDs( EM::ObjectID emid,
102  TypeSet<int>& vw2ids) const;
103  void removeFaultSS(EM::ObjectID emid);
104  void addFaultSSs(const TypeSet<EM::ObjectID>&);
105  void addNewTempFaultSS(EM::ObjectID mid);
106  void getLoadedFaultSSs(TypeSet<EM::ObjectID>&) const;
107 
108 
109  //PickSets
110  void getPickSetVwr2DIDs(const MultiID& mid,
111  TypeSet<int>& vw2ids) const;
112  void removePickSet(const MultiID&);
113  void getLoadedPickSets(TypeSet<MultiID>&) const;
114  void addPickSets(const TypeSet<MultiID>&);
115 
116 
117  static int cNameColumn() { return 0; }
118  static int cColorColumn() { return 1; }
119 
120  static const char* sKeyVisID() { return "VisID"; }
121  static const char* sKeyAttrID() { return "Attrib ID"; }
122  static const char* sKeyWVA() { return "WVA"; }
123 
125  { return l2dintersections_; }
126 
129 
130 protected:
131 
133  ~uiODViewer2DMgr();
134 
135  uiODViewer2D& addViewer2D(int visid);
140 
143 
145 
146  inline uiODApplMgr& applMgr() { return appl_.applMgr(); }
147  inline uiVisPartServer& visServ() { return *applMgr().visServer(); }
148 
149  void viewObjAdded(CallBacker*);
150  void viewObjToBeRemoved(CallBacker*);
151  void viewWinClosedCB(CallBacker*);
152  void vw2DPosChangedCB(CallBacker*);
153  void homeZoomChangedCB(CallBacker*);
154  void mouseClickCB(CallBacker*);
155  void mouseClickedCB(CallBacker*);
156  void mouseMoveCB(CallBacker*);
157 
158  void create2DViewer(const uiODViewer2D& curvwr2d,
159  const TrcKeyZSampling& newtkzs,
160  const uiWorldPoint& initcentr);
166  void attachNotifiersAndSetAuxData(uiODViewer2D*);
167  Line2DInterSection::Point intersectingLineID(const uiODViewer2D*,
168  float pos) const;
169  int intersection2DIdx(Pos::GeomID) const;
170  void reCalc2DIntersetionIfNeeded(Pos::GeomID);
171  void setAllIntersectionPositions();
172  void setVWR2DIntersectionPositions(uiODViewer2D*);
173  void handleLeftClick(uiODViewer2D*);
174  void setAuxAnnotLineStyles(uiFlatViewer&,bool forx1);
175  void setupHorizon3Ds(uiODViewer2D*);
176  void setupHorizon2Ds(uiODViewer2D*);
177  void setupFaults(uiODViewer2D*);
178  void setupFaultSSs(uiODViewer2D*);
179  void setupPickSets(uiODViewer2D*);
180  void reSetPrevDragMode(uiODViewer2D*);
181 
182  void fillPar(IOPar&) const;
183  void usePar(const IOPar&);
184 
185  friend class uiODMain;
186 
187 public:
188  bool isItemPresent(const uiTreeItem*) const;
189 
190  //FaultStickSet2D
191  void removeFaultSS2D(EM::ObjectID emid);
192  void addFaultSS2Ds(const TypeSet<EM::ObjectID>&);
193  void addNewTempFaultSS2D(EM::ObjectID mid);
194  void getLoadedFaultSS2Ds(
195  TypeSet<EM::ObjectID>&) const;
196  void getFaultSS2DVwr2DIDs( EM::ObjectID emid,
197  TypeSet<int>& vw2ids) const;
198 
199  void addNewTrackingHorizon3D(EM::ObjectID mid,
200  int sceneid);
201  void addNewTrackingHorizon2D(EM::ObjectID mid,
202  int sceneid);
203  void addNewTempFault(EM::ObjectID mid,int sceneid);
204  void addNewTempFaultSS(EM::ObjectID mid,int sceneid);
205  void addNewTempFaultSS2D(EM::ObjectID mid,int scnid);
206 
207  void getVwr2DObjIDs(TypeSet<int>& vw2ids) const;
208 
209  void getVWR2DDataGeomIDs(const uiODViewer2D*,
210  TypeSet<Pos::GeomID>&) const;
211  void surveyChangedCB(CallBacker*);
212  void applClosing(CallBacker*);
213  void cleanup();
214  void setupCurInterpItem(uiODViewer2D*);
215 };
216 
217 #endif
TypeSet< Pos::GeomID > geom2dids_
Definition: uiodviewer2dmgr.h:139
#define mExpClass(module)
Definition: commondefs.h:160
od_int32 ObjectID
Definition: emposid.h:24
uiTreeFactorySet * treeItemFactorySet3D()
Definition: uiodviewer2dmgr.h:73
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
SelectedAuxAnnot selauxannot_
Definition: uiodviewer2dmgr.h:138
Line2DInterSectionSet * l2dintersections_
Definition: uiodviewer2dmgr.h:137
uiODMain & appl_
Definition: uiodviewer2dmgr.h:144
bool isselected_
Definition: uiodviewer2dmgr.h:48
Application level manager - ties part servers together.
Definition: uiodapplmgr.h:55
uiVisPartServer & visServ()
Definition: uiodviewer2dmgr.h:147
OpendTect application top level object.
Definition: uiodmain.h:41
static const char * sKeyVisID()
Definition: uiodviewer2dmgr.h:120
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
static const char * sKeyAttrID()
Definition: uiodviewer2dmgr.h:121
The Visualization Part Server.
Definition: uivispartserv.h:60
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
const Line2DInterSectionSet * getLine2DInterSectionSet()
Definition: uiodviewer2dmgr.h:124
SelectedAuxAnnot(int auxposidx=-1, bool isx1=true, bool selected=false)
Definition: uiodviewer2dmgr.h:40
static int cNameColumn()
Definition: uiodviewer2dmgr.h:117
int ID
Definition: datapack.h:38
uiTreeFactorySet * tifs2d_
Definition: uiodviewer2dmgr.h:141
Definition: vishorizonsectiondef.h:31
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
uiTreeFactorySet * tifs3d_
Definition: uiodviewer2dmgr.h:142
Variable Density (=color-bar driven) parameters.
Definition: flatview.h:205
Definition: uiodviewer2dmgr.h:34
uiTreeFactorySet * treeItemFactorySet2D()
Definition: uiodviewer2dmgr.h:72
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
uiODApplMgr & applMgr()
Definition: uiodviewer2dmgr.h:146
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
Definition: view2ddata.h:24
ObjectSet< uiODViewer2D > viewers2d_
Definition: uiodviewer2dmgr.h:136
Definition: mouseevent.h:162
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
void removeFault(EM::Fault &)
Index_Type GeomID
Definition: commontypes.h:52
A 2D Viewer.
Definition: uiodviewer2d.h:45
CNotifier< uiODViewer2DMgr, int > vw2dObjAdded
Definition: uiodviewer2dmgr.h:127
bool isx1_
Definition: uiodviewer2dmgr.h:47
static const char * sKeyWVA()
Definition: uiodviewer2dmgr.h:122
static int cColorColumn()
Definition: uiodviewer2dmgr.h:118
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
CNotifier< uiODViewer2DMgr, int > vw2dObjToBeRemoved
Definition: uiodviewer2dmgr.h:128
float oldauxpos_
Definition: uiodviewer2dmgr.h:49
Definition: uiodviewer2dmgr.h:38
uiODApplMgr & applMgr()
Definition: uiodmain.h:51
bool isValid() const
Definition: uiodviewer2dmgr.h:50
Definition: geom2dintersections.h:108
Definition: uitreeitemmanager.h:287
int auxposidx_
Definition: uiodviewer2dmgr.h:46
Fulfills the FlatView::Viewer specifications using &#39;ui&#39; classes.
Definition: uiflatviewer.h:33
Definition: uitreeitemmanager.h:34
Compound key consisting of ints.
Definition: multiid.h:25
Semblance Attribute.
Definition: attribdataholder.h:25

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