OpendTect-6_4  6.4
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Seis::PosIndexer Class Reference

builds an index of a list of positions, making it easy to find a specific position. More...

Public Types

typedef Index_Type KeyIdxType
 
typedef TypeSet< KeyIdxTypeKeyIdxSet
 
typedef PosKeyList::FileIdxType FileIdxType
 
typedef TypeSet< FileIdxTypeFileIdxSet
 
typedef od_stream_Pos FileOffsType
 
typedef TypeSet< FileOffsTypeFileOffsSet
 
typedef DataInterpreter< int > Int32Interpreter
 
typedef DataInterpreter< od_int64Int64Interpreter
 
typedef DataInterpreter< float > FloatInterpreter
 

Public Member Functions

 PosIndexer (const PosKeyList &, bool doindex, bool excludeunreasonable)
 
virtual ~PosIndexer ()
 
od_int64 findFirst (const BinID &) const
 
od_int64 findFirst (int) const
 
od_int64 findFirst (const PosKey &, bool chckoffs=true) const
 
od_int64 findOcc (const PosKey &, int occ) const
 ignores offset More...
 
TypeSet< od_int64findAll (const PosKey &) const
 ignores offset More...
 
bool validIdx (od_int64 idx) const
 
od_int64 maxIdx () const
 
void reIndex ()
 
Seis::GeomType geomType () const
 
const Interval< int > & inlRange () const
 
const Interval< int > & crlRange () const
 
const Interval< int > & trcNrRange () const
 
const Interval< float > & offsetRange () const
 
od_int64 nrRejected () const
 
bool ioCompressed () const
 
void setIOCompressed (bool yn=true)
 
bool dumpTo (od_ostream &strm) const
 
bool readFrom (const char *nm, od_int64 offset, bool all, DataInterpreter< int > *=0, DataInterpreter< od_int64 > *=0, DataInterpreter< float > *=0)
 
const TypeSet< int > & getInls () const
 
void getCrls (int inl, TypeSet< int > &) const
 
void add (const Seis::PosKey &, od_int64 offset)
 Adds the pk to index. Called from reIndex. More...
 
void empty ()
 
void setEmpty ()
 

Protected Member Functions

bool readHeader (DataInterpreter< int > *, DataInterpreter< od_int64 > *, DataInterpreter< float > *)
 
bool readLine (TypeSet< int > &crl, TypeSet< od_int64 > &, DataInterpreter< int > *, DataInterpreter< od_int64 > *) const
 
bool isReasonable (const BinID &) const
 
int getFirstIdxs (const BinID &, int &, int &)
 
void dumpLineCompressed (od_ostream &, const KeyIdxSet &, const FileIdxSet &) const
 
bool readLineCompressed (KeyIdxSet &, FileIdxSet &) const
 

Protected Attributes

od_istreamstrm_
 
DataInterpreter< int > * int32interp_
 
DataInterpreter< od_int64 > * int64interp_
 
TypeSet< od_int64inlfileoffsets_
 
Threads::Lock lock_
 
TypeSet< od_int64curidxset_
 
TypeSet< int > curcrlset_
 
int curinl_
 
const PosKeyListpkl_
 
bool is2d_
 
bool isps_
 
bool excludeunreasonable_
 
TypeSet< int > inls_
 
ObjectSet< TypeSet< int > > crlsets_
 
ObjectSet< TypeSet< od_int64 > > idxsets_
 
od_int64 maxidx_
 
Interval< int > inlrg_
 
Interval< int > crlrg_
 
Interval< float > offsrg_
 
Interval< int > goodinlrg_
 
Interval< int > goodcrlrg_
 
od_int64 nrrejected_
 
bool iocompressedmgr_
 

Detailed Description

builds an index of a list of positions, making it easy to find a specific position.

In principle, no sorting is required. While at it, in/xline and offset ranges are determined.

Member Typedef Documentation

Constructor & Destructor Documentation

Seis::PosIndexer::PosIndexer ( const PosKeyList ,
bool  doindex,
bool  excludeunreasonable 
)
Parameters
excludeunreasonableenables rejection of traces far outside survey.
virtual Seis::PosIndexer::~PosIndexer ( )
virtual

Member Function Documentation

void Seis::PosIndexer::add ( const Seis::PosKey ,
od_int64  offset 
)

Adds the pk to index. Called from reIndex.

const Interval<int>& Seis::PosIndexer::crlRange ( ) const
inline
void Seis::PosIndexer::dumpLineCompressed ( od_ostream ,
const KeyIdxSet ,
const FileIdxSet  
) const
protected
bool Seis::PosIndexer::dumpTo ( od_ostream strm) const
void Seis::PosIndexer::empty ( )
TypeSet<od_int64> Seis::PosIndexer::findAll ( const PosKey ) const

ignores offset

od_int64 Seis::PosIndexer::findFirst ( const BinID ) const

-1 = inl not found -2 crl/trcnr not found

od_int64 Seis::PosIndexer::findFirst ( int  ) const

-1 = empty -2 trcnr not found

od_int64 Seis::PosIndexer::findFirst ( const PosKey ,
bool  chckoffs = true 
) const

-1 = inl not found or empty -2 crl/trcnr not found -3 offs not found

od_int64 Seis::PosIndexer::findOcc ( const PosKey ,
int  occ 
) const

ignores offset

Seis::GeomType Seis::PosIndexer::geomType ( ) const
inline
void Seis::PosIndexer::getCrls ( int  inl,
TypeSet< int > &   
) const
int Seis::PosIndexer::getFirstIdxs ( const BinID ,
int &  ,
int &   
)
protected
const TypeSet<int>& Seis::PosIndexer::getInls ( ) const
inline
const Interval<int>& Seis::PosIndexer::inlRange ( ) const
inline
bool Seis::PosIndexer::ioCompressed ( ) const
inline
bool Seis::PosIndexer::isReasonable ( const BinID ) const
protected
od_int64 Seis::PosIndexer::maxIdx ( ) const
inline
od_int64 Seis::PosIndexer::nrRejected ( ) const
inline
const Interval<float>& Seis::PosIndexer::offsetRange ( ) const
inline
bool Seis::PosIndexer::readFrom ( const char *  nm,
od_int64  offset,
bool  all,
DataInterpreter< int > *  = 0,
DataInterpreter< od_int64 > *  = 0,
DataInterpreter< float > *  = 0 
)
bool Seis::PosIndexer::readHeader ( DataInterpreter< int > *  ,
DataInterpreter< od_int64 > *  ,
DataInterpreter< float > *   
)
protected
bool Seis::PosIndexer::readLine ( TypeSet< int > &  crl,
TypeSet< od_int64 > &  ,
DataInterpreter< int > *  ,
DataInterpreter< od_int64 > *   
) const
protected
bool Seis::PosIndexer::readLineCompressed ( KeyIdxSet ,
FileIdxSet  
) const
protected
void Seis::PosIndexer::reIndex ( )
void Seis::PosIndexer::setEmpty ( )
inline
void Seis::PosIndexer::setIOCompressed ( bool  yn = true)
inline
const Interval<int>& Seis::PosIndexer::trcNrRange ( ) const
inline
bool Seis::PosIndexer::validIdx ( od_int64  idx) const
inline

Member Data Documentation

Interval<int> Seis::PosIndexer::crlrg_
protected
ObjectSet< TypeSet<int> > Seis::PosIndexer::crlsets_
protected
TypeSet<int> Seis::PosIndexer::curcrlset_
protected
TypeSet<od_int64> Seis::PosIndexer::curidxset_
protected
int Seis::PosIndexer::curinl_
protected
bool Seis::PosIndexer::excludeunreasonable_
protected
Interval<int> Seis::PosIndexer::goodcrlrg_
protected
Interval<int> Seis::PosIndexer::goodinlrg_
protected
ObjectSet< TypeSet<od_int64> > Seis::PosIndexer::idxsets_
protected
TypeSet<od_int64> Seis::PosIndexer::inlfileoffsets_
protected
Interval<int> Seis::PosIndexer::inlrg_
protected
TypeSet<int> Seis::PosIndexer::inls_
protected
DataInterpreter<int>* Seis::PosIndexer::int32interp_
protected
DataInterpreter<od_int64>* Seis::PosIndexer::int64interp_
protected
bool Seis::PosIndexer::iocompressedmgr_
protected
bool Seis::PosIndexer::is2d_
protected
bool Seis::PosIndexer::isps_
protected
Threads::Lock Seis::PosIndexer::lock_
mutableprotected
od_int64 Seis::PosIndexer::maxidx_
protected
od_int64 Seis::PosIndexer::nrrejected_
protected
Interval<float> Seis::PosIndexer::offsrg_
protected
const PosKeyList& Seis::PosIndexer::pkl_
protected
od_istream* Seis::PosIndexer::strm_
protected

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