OpendTect-6_4  6.4
uidatapointsetmerger.h
Go to the documentation of this file.
1 #ifndef uidatapointsetmerger_h
2 #define uidatapointsetmerger_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Satyaki Maitra
9  Date: August 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiiomod.h"
16 #include "bufstringset.h"
17 #include "ctxtioobj.h"
18 #include "datapointset.h"
19 #include "executor.h"
20 
21 #include "uidialog.h"
22 
23 class uiComboBox;
24 class uiGenInput;
25 class uiIOObjSel;
26 class uiTable;
27 
29 { mODTextTranslationClass(DPSMergerProp);
30 public:
31  DPSMergerProp( const MultiID& id, int mid,
32  int sid )
33  : masterdpsid_(mid), slavedpsid_(sid)
34  , newdpsid_(id), maxz_(mUdf(float))
35  , maxhordist_(mUdf(float))
36  , dooverwriteundef_(false) {}
37 
38  void setColid(int masterid,int slaveid);
39 
40  enum MatchPolicy { Exact, Nearest, NoMatch };
42  { matchpol_ = pol; }
43  MatchPolicy matchPolicy() const { return matchpol_; }
44 
47  { replacepol_ = pol; }
48 
49  ReplacePolicy replacePolicy() const { return replacepol_; }
50 
51  int masterDPID() const { return masterdpsid_;}
52  int slaveDPID() const { return slavedpsid_; }
53  const MultiID& newDPSID() const { return newdpsid_; }
54  const TypeSet<int>& masterColIDs() const {return mastercolids_;}
55  const TypeSet<int>& slaveColIDs() const { return slavecolids_;}
56 
57  float maxAllowedHorDist() const
58  { return maxhordist_; }
59  void setMaxAllowedHorDist( float maxdist )
60  { maxhordist_ = maxdist; }
61 
62  float maxAllowedZDist() const { return maxz_; }
63  void setMaxAllowedZDist( float maxz )
64  { maxz_ = maxz; }
65 
66  bool overWriteUndef() const
67  { return dooverwriteundef_; }
68  void setOverWriteUndef( bool yn )
69  { dooverwriteundef_ = yn; }
70 protected:
71 
74 
81  float maxhordist_;
82  float maxz_;
83 };
84 
85 
88 public:
89  DPSMerger(const DPSMergerProp&);
90 
91  void addNewCols(const BufferStringSet&);
92  od_int64 nrDone() const { return rowdone_; }
93  od_int64 totalNr() const {return sdps_->size();}
96  uiStrings::sPosition(mPlural),tr("processed"));}
97  DataPointSet* getNewDPS() { return newdps_; }
98 protected:
103  int rowdone_;
104 
105  int nextStep();
106 
107  int getSlaveColID(int mcolid);
108  DataPointSet::DataRow getDataRow(int,int);
109  DataPointSet::DataRow getNewDataRow(int);
110  int findMatchingMrowID(int);
111 };
112 
113 
116 public:
118  DataPointSet*);
120 protected:
121 
125 
134 
135  void setTable();
136  BufferStringSet checkForNewColumns() const;
137  void checkForSameColNms(BufferStringSet&) const;
138  bool acceptOK(CallBacker*);
139  void attribChangedCB(CallBacker*);
140  void matchPolChangedCB(CallBacker*);
141 };
142 
143 #endif
uiIOObjSel * outfld_
Definition: uidatapointsetmerger.h:133
#define mExpClass(module)
Definition: commondefs.h:160
void setMatchPolicy(MatchPolicy pol)
Definition: uidatapointsetmerger.h:41
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
MultiID newdpsid_
Definition: uidatapointsetmerger.h:80
void setMaxAllowedHorDist(float maxdist)
Definition: uidatapointsetmerger.h:59
Set of data points with group selection.
Definition: datapointset.h:48
uiGenInput * addcoloptfld_
Definition: uidatapointsetmerger.h:130
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
float maxAllowedHorDist() const
Definition: uidatapointsetmerger.h:57
uiComboBox * replacepolfld_
Definition: uidatapointsetmerger.h:128
#define od_int64
Definition: plftypes.h:36
od_int64 nrDone() const
Definition: uidatapointsetmerger.h:92
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: uidatapointsetmerger.h:94
DataPointSet * mdps_
Definition: uidatapointsetmerger.h:122
Definition: uitable.h:30
Definition: uidatapointsetmerger.h:114
Definition: uidatapointsetmerger.h:45
bool dooverwriteundef_
Definition: uidatapointsetmerger.h:75
int slaveDPID() const
Definition: uidatapointsetmerger.h:52
Combo box.
Definition: uicombobox.h:32
Definition: uistring.h:89
Definition: uiparent.h:26
const TypeSet< int > & masterColIDs() const
Definition: uidatapointsetmerger.h:54
Set of BufferString objects.
Definition: bufstringset.h:28
void setReplacePolicy(ReplacePolicy pol)
Definition: uidatapointsetmerger.h:46
Holds an IOObjCtxt plus a pointer to an IOObj and/or an IOPar.
Definition: ctxtioobj.h:142
TypeSet< int > mastercolids_
Definition: uidatapointsetmerger.h:78
ReplacePolicy
Definition: uidatapointsetmerger.h:45
float maxz_
Definition: uidatapointsetmerger.h:82
int masterDPID() const
Definition: uidatapointsetmerger.h:51
Definition: uidialog.h:42
ReplacePolicy replacepol_
Definition: uidatapointsetmerger.h:73
uiGenInput * zgatefld_
Definition: uidatapointsetmerger.h:132
Definition: uidatapointsetmerger.h:28
FixedString No()
Definition: keystrs.h:89
DataPointSet * mdps_
Definition: uidatapointsetmerger.h:100
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
DPSMergerProp prop_
Definition: uidatapointsetmerger.h:99
General Input Element.
Definition: uigeninput.h:58
DataPointSet * getNewDPS()
Definition: uidatapointsetmerger.h:97
MatchPolicy matchPolicy() const
Definition: uidatapointsetmerger.h:43
CtxtIOObj ctio_
Definition: uidatapointsetmerger.h:124
ReplacePolicy replacePolicy() const
Definition: uidatapointsetmerger.h:49
User Interface (UI) element for selection of IOObjs.
Definition: uiioobjsel.h:38
Definition: stattype.h:24
float maxAllowedZDist() const
Definition: uidatapointsetmerger.h:62
Data point with group. Group 0 means &#39;inactive&#39;, it can never be selected.
Definition: datapointset.h:102
od_int64 totalNr() const
Definition: uidatapointsetmerger.h:93
MatchPolicy matchpol_
Definition: uidatapointsetmerger.h:72
#define mPlural
Definition: uistrings.h:19
TypeSet< int > slavecolids_
Definition: uidatapointsetmerger.h:79
DataPointSet * sdps_
Definition: uidatapointsetmerger.h:101
Definition: uidatapointsetmerger.h:86
int masterdpsid_
Definition: uidatapointsetmerger.h:76
DataPointSet * sdps_
Definition: uidatapointsetmerger.h:123
DPSMergerProp(const MultiID &id, int mid, int sid)
Definition: uidatapointsetmerger.h:31
static uiString sPosition(int num=1)
Definition: uistrings.h:402
bool overWriteUndef() const
Definition: uidatapointsetmerger.h:66
uiGenInput * distfld_
Definition: uidatapointsetmerger.h:131
DataPointSet * newdps_
Definition: uidatapointsetmerger.h:102
int rowdone_
Definition: uidatapointsetmerger.h:103
uiGenInput * overwritefld_
Definition: uidatapointsetmerger.h:129
float maxhordist_
Definition: uidatapointsetmerger.h:81
void setOverWriteUndef(bool yn)
Definition: uidatapointsetmerger.h:68
int slavedpsid_
Definition: uidatapointsetmerger.h:77
const TypeSet< int > & slaveColIDs() const
Definition: uidatapointsetmerger.h:55
static uiString phrJoinStrings(const uiString &a, const uiString &b)
"
void setMaxAllowedZDist(float maxz)
Definition: uidatapointsetmerger.h:63
const MultiID & newDPSID() const
Definition: uidatapointsetmerger.h:53
MatchPolicy
Definition: uidatapointsetmerger.h:40
Compound key consisting of ints.
Definition: multiid.h:25
uiTable * tbl_
Definition: uidatapointsetmerger.h:126
uiComboBox * matchpolfld_
Definition: uidatapointsetmerger.h:127
Specification to enable chunkwise execution of a process.
Definition: executor.h:39

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