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

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