OpendTect  6.3
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 KeyIdxSet::size_type SetIdxType
 
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 exclude_unreasonable_traces)
 unreasonable == far outside survey More...
 
virtual ~PosIndexer ()
 
void setEmpty ()
 
bool ioCompressed () const
 
void setIOCompressed (bool yn=true)
 
void add (const PosKey &, FileIdxType)
 
void reIndex ()
 Calls add() multiple times. More...
 
GeomType geomType () const
 
const Interval< KeyIdxType > & inlRange () const
 
const KeyIdxSetgetInls () const
 
const Interval< KeyIdxType > & crlRange () const
 
const Interval< KeyIdxType > & trcNrRange () const
 
void getCrls (KeyIdxType, KeyIdxSet &) const
 
const Interval< float > & offsetRange () const
 
FileIdxType nrRejected () const
 
bool validFileIdx (FileIdxType idx) const
 
FileIdxType maxFileIdx () const
 
FileIdxType findFirst (const BinID &) const
 
FileIdxType findFirst (KeyIdxType trcnr) const
 
FileIdxType findFirst (const PosKey &, bool chckoffs=true) const
 -3 offs not found More...
 
FileIdxType findOcc (const PosKey &, int occ) const
 ignores offset More...
 
FileIdxSet findAll (const PosKey &) const
 ignores offset More...
 
bool dumpTo (od_ostream &) const
 
bool readFrom (const char *fnm, FileIdxType, bool all, Int32Interpreter *=0, Int64Interpreter *=0, FloatInterpreter *=0)
 

Protected Member Functions

bool readHeader (Int32Interpreter *, Int64Interpreter *, FloatInterpreter *)
 
bool readLine (KeyIdxSet &crls, FileIdxSet &, Int32Interpreter *, Int64Interpreter *) const
 
bool isReasonable (const BinID &) const
 
int getFirstIdxs (const BinID &, int &, int &) const
 
void dumpLineCompressed (od_ostream &, const KeyIdxSet &, const FileIdxSet &) const
 
bool readLineCompressed (KeyIdxSet &, FileIdxSet &) const
 

Protected Attributes

od_istreamstrm_
 
Int32Interpreterint32interp_
 
Int64Interpreterint64interp_
 
FileOffsSet inlfileoffsets_
 
Threads::Lock lock_
 
FileIdxSet curfileidxs_
 
KeyIdxSet curcrlset_
 
KeyIdxType curinl_
 
const PosKeyListpkl_
 
const bool is2d_
 
const bool isps_
 
bool iocompressed_
 
bool excludeunreasonable_
 
KeyIdxSet inls_
 
ObjectSet< KeyIdxSetcrlsets_
 
ObjectSet< FileIdxSetfileidxsets_
 
FileIdxType maxfileidx_
 
Interval< KeyIdxTypeinlrg_
 
Interval< KeyIdxTypecrlrg_
 
Interval< float > offsrg_
 
Interval< KeyIdxTypegoodinlrg_
 
Interval< KeyIdxTypegoodcrlrg_
 
FileIdxType nrrejected_
 

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  exclude_unreasonable_traces 
)

unreasonable == far outside survey

virtual Seis::PosIndexer::~PosIndexer ( )
virtual

Member Function Documentation

void Seis::PosIndexer::add ( const PosKey ,
FileIdxType   
)
const Interval<KeyIdxType>& Seis::PosIndexer::crlRange ( ) const
inline
void Seis::PosIndexer::dumpLineCompressed ( od_ostream ,
const KeyIdxSet ,
const FileIdxSet  
) const
protected
bool Seis::PosIndexer::dumpTo ( od_ostream ) const
FileIdxSet Seis::PosIndexer::findAll ( const PosKey ) const

ignores offset

FileIdxType Seis::PosIndexer::findFirst ( const BinID ) const
FileIdxType Seis::PosIndexer::findFirst ( KeyIdxType  trcnr) const
FileIdxType Seis::PosIndexer::findFirst ( const PosKey ,
bool  chckoffs = true 
) const

-3 offs not found

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

ignores offset

GeomType Seis::PosIndexer::geomType ( ) const
inline
void Seis::PosIndexer::getCrls ( KeyIdxType  ,
KeyIdxSet  
) const
int Seis::PosIndexer::getFirstIdxs ( const BinID ,
int &  ,
int &   
) const
protected
const KeyIdxSet& Seis::PosIndexer::getInls ( ) const
inline
const Interval<KeyIdxType>& Seis::PosIndexer::inlRange ( ) const
inline
bool Seis::PosIndexer::ioCompressed ( ) const
inline
bool Seis::PosIndexer::isReasonable ( const BinID ) const
protected
FileIdxType Seis::PosIndexer::maxFileIdx ( ) const
inline
FileIdxType Seis::PosIndexer::nrRejected ( ) const
inline
const Interval<float>& Seis::PosIndexer::offsetRange ( ) const
inline
bool Seis::PosIndexer::readFrom ( const char *  fnm,
FileIdxType  ,
bool  all,
Int32Interpreter = 0,
Int64Interpreter = 0,
FloatInterpreter = 0 
)
bool Seis::PosIndexer::readHeader ( Int32Interpreter ,
Int64Interpreter ,
FloatInterpreter  
)
protected
bool Seis::PosIndexer::readLine ( KeyIdxSet crls,
FileIdxSet ,
Int32Interpreter ,
Int64Interpreter  
) const
protected
bool Seis::PosIndexer::readLineCompressed ( KeyIdxSet ,
FileIdxSet  
) const
protected
void Seis::PosIndexer::reIndex ( )

Calls add() multiple times.

void Seis::PosIndexer::setEmpty ( )
void Seis::PosIndexer::setIOCompressed ( bool  yn = true)
inline
const Interval<KeyIdxType>& Seis::PosIndexer::trcNrRange ( ) const
inline
bool Seis::PosIndexer::validFileIdx ( FileIdxType  idx) const
inline

Member Data Documentation

Interval<KeyIdxType> Seis::PosIndexer::crlrg_
protected
ObjectSet<KeyIdxSet> Seis::PosIndexer::crlsets_
protected
KeyIdxSet Seis::PosIndexer::curcrlset_
mutableprotected
FileIdxSet Seis::PosIndexer::curfileidxs_
mutableprotected
KeyIdxType Seis::PosIndexer::curinl_
mutableprotected
bool Seis::PosIndexer::excludeunreasonable_
protected
ObjectSet<FileIdxSet> Seis::PosIndexer::fileidxsets_
protected
Interval<KeyIdxType> Seis::PosIndexer::goodcrlrg_
protected
Interval<KeyIdxType> Seis::PosIndexer::goodinlrg_
protected
FileOffsSet Seis::PosIndexer::inlfileoffsets_
protected
Interval<KeyIdxType> Seis::PosIndexer::inlrg_
protected
KeyIdxSet Seis::PosIndexer::inls_
protected
Int32Interpreter* Seis::PosIndexer::int32interp_
protected
Int64Interpreter* Seis::PosIndexer::int64interp_
protected
bool Seis::PosIndexer::iocompressed_
protected
const bool Seis::PosIndexer::is2d_
protected
const bool Seis::PosIndexer::isps_
protected
Threads::Lock Seis::PosIndexer::lock_
mutableprotected
FileIdxType Seis::PosIndexer::maxfileidx_
protected
FileIdxType 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. 2017