OpendTect-6_4  6.4
uiattribpartserv.h
Go to the documentation of this file.
1 #ifndef uiattribpartserv_h
2 #define uiattribpartserv_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: Feb 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiattributesmod.h"
16 #include "uiapplserv.h"
17 
18 #include "attribsel.h"
19 #include "datapack.h"
20 #include "menuhandler.h"
21 #include "survgeom.h"
22 #include "timer.h"
23 
24 namespace Attrib
25 {
26  class Data2DHolder;
27  class Desc;
28  class DescSet;
29  class EngineMan;
30  class SelSpec;
31 }
32 
33 class BinIDValueSet;
34 class TrcKeyZSampling;
36 class IOObj;
37 class NLAModel;
38 class DataPointSet;
40 class SeisTrcBuf;
41 class TaskRunner;
42 class uiAttribDescSetEd;
43 class uiAttribCrossPlot;
44 class uiAttrSetMan;
45 class uiAttrVolOut;
46 class uiImpAttrSet;
47 namespace ColTab { class MapperSetup; }
48 namespace Pick { class Set; }
49 namespace ZDomain { class Info; class Def; }
50 
57 public:
60 
61  const char* name() const { return "Attributes"; }
62 
63  static int evDirectShowAttr();
65  static int evNewAttrSet();
67  static int evAttrSetDlgClosed();
69  static int evEvalAttrInit();
71  static int evEvalCalcAttr();
73  static int evEvalShowSlice();
75  static int evEvalStoreSlices();
77  static int evEvalRestore();
80  static int objNLAModel2D();
82  static int objNLAModel3D();
84  static uiString getMenuText(bool is2d,bool issteering, bool endmenu);
85 
86  void manageAttribSets(bool is2d=false);
87  const Attrib::DescSet* curDescSet(bool is2d) const;
88  void getDirectShowAttrSpec(Attrib::SelSpec&) const;
89  bool setSaved(bool is2d) const;
90  void saveSet(bool is2d);
91  bool editSet(bool is2d);
93  bool attrSetEditorActive() const { return attrsetdlg_; }
94  void updateSelSpec(Attrib::SelSpec&) const;
95  void setAttrsNeedUpdt() { attrsneedupdt_ =true;}
96 
97  bool selectAttrib(Attrib::SelSpec&,const ZDomain::Info*,
98  Pos::GeomID geomid,
99  const uiString& seltxt=tr("View Data")) ;
100  bool selectRGBAttribs(TypeSet<Attrib::SelSpec>&,
101  const ZDomain::Info*,Pos::GeomID);
102  bool setPickSetDirs(Pick::Set&,const NLAModel*,float vel);
103  void outputVol(const MultiID&,bool is2d,bool multioutput);
104  bool replaceSet(const IOPar&,bool is2d);
105  bool addToDescSet(const char*,bool is2d);
106  int getSliceIdx() const { return sliceidx_; }
107  void getPossibleOutputs(bool is2d,BufferStringSet&) const;
108 
109  void setTargetSelSpec(const Attrib::SelSpec&);
111  const TypeSet<Attrib::SelSpec>& specs )
112  { targetspecs_ = specs; }
113 
115  { return targetspecs_; }
116 
117  DataPack::ID createOutput(const TrcKeyZSampling&,DataPack::ID);
118  const RegularSeisDataPack* createOutput(const TrcKeyZSampling&,
119  const RegularSeisDataPack* prevslcs=0);
120  bool createOutput(DataPointSet&,int firstcol =0);
121  bool createOutput(ObjectSet<DataPointSet>&,
122  int firstcol =0);
123  bool createOutput(const BinIDValueSet&,SeisTrcBuf&,
125  DataPack::ID createRdmTrcsOutput(const Interval<float>& zrg,
126  TypeSet<BinID>* path,
127  TypeSet<BinID>* trueknotspos);
128  static DataPack::ID createDataPackFor2D(const Attrib::Data2DHolder& input,
129  const TrcKeyZSampling& outputsamp,
130  const ZDomain::Def& zdef,
131  const BufferStringSet& compnames=0);
132 
133  Attrib::DescID getStoredID(const MultiID&,bool is2d,
134  int selout=-1) const;
135  IOObj* getIOObj(const Attrib::SelSpec&) const;
136 
137  bool extractData(ObjectSet<DataPointSet>&);
138  bool createAttributeSet(const BufferStringSet&,
139  Attrib::DescSet*);
140  void importAttrSetFromFile();
141  void importAttrSetFromOtherSurvey();
142 
143  const NLAModel* getNLAModel(bool) const;
144  void setNLAName( const char* nm ) { nlaname_ = nm; }
145 
146  void resetMenuItems();
147  MenuItem* storedAttribMenuItem(const Attrib::SelSpec&,bool is2d,
148  bool);
149  MenuItem* calcAttribMenuItem(const Attrib::SelSpec&,bool is2d,
150  bool);
151  MenuItem* nlaAttribMenuItem(const Attrib::SelSpec&,bool is2d,
152  bool);
153  MenuItem* zDomainAttribMenuItem(const Attrib::SelSpec&,
154  const ZDomain::Info&,
155  bool is2d,bool);
156  void fillInStoredAttribMenuItem(MenuItem*,bool,bool,
157  const Attrib::SelSpec&,bool,
158  bool needext=false);
159 
160  bool handleAttribSubMenu(int mnuid,Attrib::SelSpec&,bool&);
161  bool handleMultiComp(const MultiID&,bool,bool,
163  TypeSet<int>&);
164  void info2DAttribSubMenu(int mnuid,BufferString& attbnm,
165  bool& steering,bool& stored);
166  bool prepMultCompSpecs(TypeSet<int>,const MultiID&,
167  bool,bool);
168 
169  void setEvaluateInfo(bool ae,bool as)
170  { alloweval_=ae; allowevalstor_=as; }
171 
172  void fillPar(IOPar&,bool,bool) const;
173  void usePar(const IOPar&,bool,bool);
174 
176  { dpsdispmgr_ = dispmgr; }
177 
178  void set2DEvent( bool is2d ) { is2devsent_ = is2d; }
179  bool is2DEvent() { return is2devsent_; }
180  int use3DMode() const;
183  const Attrib::DescSet* getUserPrefDescSet() const;
185  void showXPlot(CallBacker*);
186 
187  void setEvalBackupColTabMapper(const ColTab::MapperSetup*);
188  const ColTab::MapperSetup* getEvalBackupColTabMapper() const;
189 
190  void setSelAttr(const char* attrnm);
191  void loadDefaultAttrSet(const char* attribsetnm);
192 
193 protected:
194 
195  static const char* sKeyUserSettingAttrErrMsg();
196 
209 
222 
223  Attrib::EngineMan* createEngMan(const TrcKeyZSampling* cs=0,
224  const Pos::GeomID& geomid=Survey::GM().cUndefGeomID());
225 
226  void directShowAttr(CallBacker*);
227 
228  void showEvalDlg(CallBacker*);
229  void showCrossEvalDlg(CallBacker*);
230  void calcEvalAttrs(CallBacker*);
231  void showSliceCB(CallBacker*);
232  void evalDlgClosed(CallBacker*);
233  void xplotClosedCB(CallBacker*);
234  void processEvalDlg(bool iscrossevaluate);
235  void attrsetDlgApply(CallBacker*);
236 
237  void attrsetDlgClosed(CallBacker*);
238  void attrsetDlgCloseTimTick(CallBacker*);
239  void survChangedCB(CallBacker*);
240 
241  Attrib::DescID targetID(bool is2d,int nr=0) const;
242 
243  void handleAutoSet();
244  void useAutoSet(bool);
245 
246  void insertNumerousItems(const BufferStringSet&,
247  const Attrib::SelSpec&,
248  bool,bool,bool);
249 
250  static const char* attridstr();
252 
258 
260 
262 
263 private:
264 
265  DataPack::ID create2DOutput(const TrcKeyZSampling&,
266  const Pos::GeomID&,TaskRunner&);
268 public:
269  DataPack::ID createRdmTrcsOutput(const Interval<float>& zrg,
270  int rdlidx);
271  void filter2DMenuItems(MenuItem&,const Attrib::SelSpec&,
272  int geomid, bool isstored,
273  int steerpol );
274 protected:
275  void snapToValidRandomTraces(TypeSet<BinID>& path,
276  const Attrib::Desc*);
277 };
278 
279 #endif
#define mExpClass(module)
Definition: commondefs.h:160
MenuItem calc2dmnuitem_
Definition: uiattribpartserv.h:199
MenuItem stored3dmnuitem_
Definition: uiattribpartserv.h:198
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
const GeometryManager & GM()
AttributeSet Manager.
Definition: uiattrsetman.h:24
Definition: ioobj.h:58
Set of data points with group selection.
Definition: datapointset.h:48
void setDPSDispMgr(DataPointSetDisplayMgr *dispmgr)
Definition: uiattribpartserv.h:175
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
void setEvaluateInfo(bool ae, bool as)
Definition: uiattribpartserv.h:169
bool is2DEvent()
Definition: uiattribpartserv.h:179
Minimum Interface for NLA models.
Definition: nlamodel.h:20
MenuItem multcomp2d_
Definition: uiattribpartserv.h:207
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
void setAttrsNeedUpdt()
Definition: uiattribpartserv.h:95
Set of attribute descriptions.
Definition: attribdescset.h:35
TypeSet< Attrib::SelSpec > targetspecs_
Definition: uiattribpartserv.h:257
AttribDesc ID: each Desc has a unique ID in a set; the boolean isstored allows us to know whether thi...
Definition: attribdescid.h:27
Class that holds 2d seismic data or attribute data.
Definition: attribdataholder.h:82
Timer attrsetclosetim_
Definition: uiattribpartserv.h:213
uiAttrSetMan * manattribsetdlg_
Definition: uiattribpartserv.h:217
SeisDataPack for 2D and 3D seismic data.
Definition: seisdatapack.h:28
Definition: uistring.h:89
void setTargetSelSpecs(const TypeSet< Attrib::SelSpec > &specs)
Definition: uiattribpartserv.h:110
Set of BufferString objects.
Definition: bufstringset.h:28
int ID
Definition: datapack.h:38
DataPointSet display manager.
Definition: dpsdispmgr.h:104
uiImpAttrSet * impattrsetdlg_
Definition: uiattribpartserv.h:218
The attribute engine manager.
Definition: attribengman.h:46
uiAttrVolOut * volattrdlg_
Definition: uiattribpartserv.h:219
uiAttrVolOut * dataattrdlg_
Definition: uiattribpartserv.h:221
void setNLAName(const char *nm)
Definition: uiattribpartserv.h:144
Set of picks with something in common.
Definition: pickset.h:31
FixedString Desc()
Definition: keystrs.h:62
int sliceidx_
Definition: uiattribpartserv.h:255
ColTab::MapperSetup * evalmapperbackup_
Definition: uiattribpartserv.h:261
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Definition: menuhandler.h:76
Class that can execute a task.
Definition: task.h:169
Description of an attribute in an Attrib::DescSet. Each attribute has a name (e.g. "Similarity"), a user reference (e.g. "My similarity"), and at least one output. In addition, it may have parameters and inputs. If it has multiple outputs, only one of the outputs are selected.
Definition: attribdesc.h:89
Definition: uiattrgetfile.h:55
uiAttrSetMan * manattribset2ddlg_
Definition: uiattribpartserv.h:216
Definition: uiattribcrossplot.h:33
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
bool alloweval_
Definition: uiattribpartserv.h:253
uiAttribDescSetEd * attrsetdlg_
Definition: uiattribpartserv.h:212
MenuItem stored2dmnuitem_
Definition: uiattribpartserv.h:197
uiAttrVolOut * multiattrdlg_
Definition: uiattribpartserv.h:220
bool attrSetEditorActive() const
Definition: uiattribpartserv.h:93
Attrib::DescSet * evalset
Definition: uiattribpartserv.h:256
const Attrib::Desc * dirshwattrdesc_
Definition: uiattribpartserv.h:211
Setup class for colortable Mapper.
Definition: coltabmapper.h:35
MenuItem calc3dmnuitem_
Definition: uiattribpartserv.h:200
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
MenuItem nla2dmnuitem_
Definition: uiattribpartserv.h:201
Index_Type GeomID
Definition: commontypes.h:52
bool is2devsent_
Definition: uiattribpartserv.h:214
ObjectSet< uiAttribCrossPlot > attrxplotset_
Definition: uiattribpartserv.h:210
void set2DEvent(bool is2d)
Definition: uiattribpartserv.h:178
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
MenuItem multcomp3d_
Definition: uiattribpartserv.h:208
Services from application level to &#39;Part servers&#39;.
Definition: uiapplserv.h:24
Service provider for application level - Attributes.
Definition: uiattribpartserv.h:55
Definition: picklocation.h:21
int getSliceIdx() const
Definition: uiattribpartserv.h:106
MenuItem steering2dmnuitem_
Definition: uiattribpartserv.h:205
set of seismic traces.
Definition: seisbuf.h:31
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
Color Table
Definition: coltab.h:22
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
bool attrsneedupdt_
Definition: uiattribpartserv.h:215
MenuItem nla3dmnuitem_
Definition: uiattribpartserv.h:202
Makes available certain services that are needed on a higher level.
Definition: uiapplserv.h:48
Editor for Attribute sets.
Definition: uiattrdescseted.h:49
Dialog for creating volume output.
Definition: uiattrvolout.h:36
Timer class.
Definition: timer.h:25
MenuItem steering3dmnuitem_
Definition: uiattribpartserv.h:206
DataPointSetDisplayMgr * dpsdispmgr_
Definition: uiattribpartserv.h:259
Definition of z-domain.
Definition: zdomain.h:41
BufferString nlaname_
Definition: uiattribpartserv.h:251
Information of z-domain.
Definition: zdomain.h:91
Compound key consisting of ints.
Definition: multiid.h:25
bool allowevalstor_
Definition: uiattribpartserv.h:254
Semblance Attribute.
Definition: attribdataholder.h:25
MenuItem zdomain3dmnuitem_
Definition: uiattribpartserv.h:204
const TypeSet< Attrib::SelSpec > & getTargetSelSpecs() const
Definition: uiattribpartserv.h:114
Definition: zdomain.h:20
MenuItem zdomain2dmnuitem_
Definition: uiattribpartserv.h:203
const char * name() const
Definition: uiattribpartserv.h:61

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