OpendTect-6_4  6.4
emrandomposbody.h
Go to the documentation of this file.
1 #ifndef emrandomposbody_h
2 #define emrandomposbody_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Yuancheng Liu
9  Date: January 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "earthmodelmod.h"
17 #include "embody.h"
18 #include "emobject.h"
19 
20 class DataPointSet;
21 namespace Pick { class Set; }
22 
23 namespace EM
24 {
25 
30 mExpClass(EarthModel) RandomPosBody : public Body, public EMObject
32 public:
33 
34  const char* type() const { return typeStr(); }
35  virtual int nrSections() const { return 1; }
36  virtual SectionID sectionID(int) const { return 0; }
37  virtual bool canSetSectionName() const { return 0; }
38 
41  { return 0; }
42 
43  void copyFrom(const Pick::Set&);//get my own picks.
44  void copyFrom(const DataPointSet&,int selgrp);
45  //copy all for selgrp < 0.
46  void copyFrom(const DataPointSet&,int dpscolid,
47  const Interval<float>& valrg);
48  void setPositions(const TypeSet<Coord3>&);
49  const TypeSet<Coord3>& getPositions() const { return locations_; }
50  bool addPos(const Coord3&);
51 
52  const TypeSet<EM::SubID>& posIDs() const { return ids_; }
53 
54  Coord3 getPos(const EM::PosID&) const;
55  Coord3 getPos(const EM::SectionID&,
56  const EM::SubID&) const;
57  bool setPos(const EM::PosID&,const Coord3&,
58  bool addtohistory);
59  bool setPos(const EM::SectionID&,const EM::SubID&,
60  const Coord3&,bool addtohistory);
61  const IOObjContext& getIOObjContext() const;
62  virtual Executor* saver();
63  virtual Executor* saver(IOObj*);
64  virtual Executor* loader();
65  virtual bool isEmpty() const;
66 
67  ImplicitBody* createImplicitBody(TaskRunner*,bool) const;
68  bool getBodyRange(TrcKeyZSampling&);
69 
70  MultiID storageID() const;
71  BufferString storageName() const;
72 
73  void refBody();
74  void unRefBody();
75 
76  bool useBodyPar(const IOPar&);
77  void fillBodyPar(IOPar&) const;
78 
80  { return tr("Random Position Body"); }
81 
82  static const char* sKeySubIDs() { return "Position IDs"; }
83 protected:
84 
87 };
88 
89 } // namespace EM
90 
91 #endif
od_int16 SectionID
Definition: emposid.h:25
#define mExpClass(module)
Definition: commondefs.h:160
const TypeSet< EM::SubID > & posIDs() const
Definition: emrandomposbody.h:52
uiString getUserTypeStr() const
Definition: emrandomposbody.h:79
Definition: ioobj.h:58
Random position Body.
Definition: emrandomposbody.h:30
Set of data points with group selection.
Definition: datapointset.h:48
Is an identifier for each position in the earthmodel.
Definition: emposid.h:37
TypeSet< Coord3 > locations_
Definition: emrandomposbody.h:85
virtual int nrSections() const
Definition: emrandomposbody.h:35
Definition: uistring.h:89
od_int64 SubID
Definition: emposid.h:26
const char * type() const
Definition: emrandomposbody.h:34
Set of picks with something in common.
Definition: pickset.h:31
#define mDefineEMObjFuncs(clss)
Definition: emobject.h:373
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
Geometry::Element * sectionGeometry(const SectionID &)
Definition: emrandomposbody.h:39
A cartesian coordinate in 3D space.
Definition: coord.h:72
static const char * sKeySubIDs()
Definition: emrandomposbody.h:82
Definition: geomelement.h:37
A body that can deliver an implicit body.
Definition: embody.h:50
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Base class for all EarthModel objects.
Definition: emobject.h:158
Definition: picklocation.h:21
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
Implicit representation of a body.
Definition: embody.h:32
bool isEmpty(const NLAModel *mdl)
TypeSet< EM::SubID > ids_
Definition: emrandomposbody.h:86
const TypeSet< Coord3 > & getPositions() const
Definition: emrandomposbody.h:49
virtual SectionID sectionID(int) const
Definition: emrandomposbody.h:36
IOObjContext * getIOObjContext(Seis::GeomType, bool forread)
const Geometry::Element * sectionGeometry(const SectionID &) const
Definition: emrandomposbody.h:40
Compound key consisting of ints.
Definition: multiid.h:25
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62
virtual bool canSetSectionName() const
Definition: emrandomposbody.h:37

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