OpendTect  6.6
tableposprovider.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: Bert
8  Date: Feb 2008
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "geometrymod.h"
16 #include "posprovider.h"
17 #include "binidvalset.h"
18 #include "bufstring.h"
19 class IOObj;
20 
21 namespace Pos
22 {
23 
27 {
28 public:
29 
31  : bvs_(1,true) {}
32  TableProvider3D(const IOObj& psioobj);
33  TableProvider3D(const char* filenm);
35  : bvs_(1,true) { *this = tp; }
36  TableProvider3D& operator =(const TableProvider3D&);
37  const char* type() const;
38  const char* factoryKeyword() const { return type(); }
39  TableProvider3D* clone() const { return new TableProvider3D(*this); }
40 
41  virtual void reset() { pos_.reset(); }
42 
43  virtual bool toNextPos() { return bvs_.next(pos_,true); }
44  virtual bool toNextZ() { return bvs_.next(pos_,false); }
45 
46  virtual BinID curBinID() const { return bvs_.getBinID(pos_); }
47  virtual float curZ() const { return *bvs_.getVals(pos_); }
48  virtual bool includes(const BinID&,float) const;
49  virtual void usePar(const IOPar&);
50  virtual void fillPar(IOPar&) const;
51  virtual void getSummary(BufferString&) const;
52 
53  void getExtent(BinID&,BinID&) const;
54  void getZRange(Interval<float>&) const;
55  od_int64 estNrPos() const { return bvs_.totalSize(); }
56  int estNrZPerPos() const { return 1; }
57 
58  BinIDValueSet& binidValueSet() { return bvs_; }
59  const BinIDValueSet& binidValueSet() const { return bvs_; }
60 
61  static void getBVSFromPar(const IOPar&,BinIDValueSet&);
62 
63  virtual bool includes( const Coord& c, float z ) const
64  { return Provider3D::includes(c,z); }
65 
66 protected:
67 
69  BinIDValueSet::SPos pos_;
70 
71 public:
72 
73  static void initClass();
74  static Provider3D* create() { return new TableProvider3D; }
75 
76 };
77 
78 
79 } // namespace
80 
Pos::TableProvider3D::factoryKeyword
const char * factoryKeyword() const
Definition: tableposprovider.h:38
Pos::TableProvider3D::bvs_
BinIDValueSet bvs_
Definition: tableposprovider.h:68
binidvalset.h
Pos::TableProvider3D::binidValueSet
const BinIDValueSet & binidValueSet() const
Definition: tableposprovider.h:59
Pos
Position.
Definition: commontypes.h:78
Pos::TableProvider3D::binidValueSet
BinIDValueSet & binidValueSet()
Definition: tableposprovider.h:58
BinIDValueSet
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
Pos::Provider3D
Provides a subselection for 3D surveys.
Definition: posprovider.h:61
Pos::TableProvider3D::TableProvider3D
TableProvider3D(const char *filenm)
Geometry
Definition: arraytesselator.h:21
posprovider.h
od_int64
#define od_int64
Definition: plftypes.h:35
Pos::TableProvider3D::getBVSFromPar
static void getBVSFromPar(const IOPar &, BinIDValueSet &)
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Pos::TableProvider3D::getExtent
void getExtent(BinID &, BinID &) const
bufstring.h
BinID
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
Pos::TableProvider3D::initClass
static void initClass()
Pos::TableProvider3D::getSummary
virtual void getSummary(BufferString &) const
IOObj
Definition: ioobj.h:58
Pos::TableProvider3D::create
static Provider3D * create()
Definition: tableposprovider.h:74
Pos::TableProvider3D::curBinID
virtual BinID curBinID() const
Definition: tableposprovider.h:46
Pos::TableProvider3D::includes
virtual bool includes(const Coord &c, float z) const
Definition: tableposprovider.h:63
Pos::Provider3D::includes
virtual bool includes(const BinID &, float z=mUdf(float)) const =0
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Pos::TableProvider3D::TableProvider3D
TableProvider3D(const TableProvider3D &tp)
Definition: tableposprovider.h:34
Pos::TableProvider3D::clone
TableProvider3D * clone() const
Definition: tableposprovider.h:39
Pos::TableProvider3D::pos_
BinIDValueSet::SPos pos_
Definition: tableposprovider.h:69
Pos::TableProvider3D::getZRange
void getZRange(Interval< float > &) const
Pos::TableProvider3D
Provider based on BinIDValueSet table.
Definition: tableposprovider.h:27
Pos::TableProvider3D::type
const char * type() const
sKey::Table()
Pos::TableProvider3D::estNrZPerPos
int estNrZPerPos() const
Definition: tableposprovider.h:56
Pos::TableProvider3D::usePar
virtual void usePar(const IOPar &)
Pos::TableProvider3D::reset
virtual void reset()
Definition: tableposprovider.h:41
Interval< float >
Pos::TableProvider3D::TableProvider3D
TableProvider3D(const IOObj &psioobj)
Pos::TableProvider3D::includes
virtual bool includes(const BinID &, float) const
Pos::TableProvider3D::estNrPos
od_int64 estNrPos() const
Definition: tableposprovider.h:55
Pos::TableProvider3D::toNextPos
virtual bool toNextPos()
Definition: tableposprovider.h:43
Pos::TableProvider3D::TableProvider3D
TableProvider3D()
Definition: tableposprovider.h:30
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
Pos::TableProvider3D::curZ
virtual float curZ() const
Definition: tableposprovider.h:47
Pos::TableProvider3D::fillPar
virtual void fillPar(IOPar &) const
Pos::TableProvider3D::toNextZ
virtual bool toNextZ()
Definition: tableposprovider.h:44

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