OpendTect  7.0
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 TypeSet< FileIdxTypeFileIdxSet
 
typedef PosKeyList::FileIdxType FileIdxType
 
typedef TypeSet< FileOffsTypeFileOffsSet
 
typedef od_stream_Pos FileOffsType
 
typedef DataInterpreter< float > FloatInterpreter
 
typedef DataInterpreter< int > Int32Interpreter
 
typedef DataInterpreter< od_int64 > Int64Interpreter
 
typedef TypeSet< KeyIdxTypeKeyIdxSet
 
typedef Index_Type KeyIdxType
 

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

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

◆ FileIdxSet

◆ FileIdxType

◆ FileOffsSet

◆ FileOffsType

typedef od_stream_Pos Seis::PosIndexer::FileOffsType

◆ FloatInterpreter

◆ Int32Interpreter

◆ Int64Interpreter

◆ KeyIdxSet

◆ KeyIdxType

typedef Index_Type Seis::PosIndexer::KeyIdxType

Constructor & Destructor Documentation

◆ PosIndexer()

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

◆ ~PosIndexer()

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

Member Function Documentation

◆ add()

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

Adds the pk to index. Called from reIndex.

◆ crlRange()

const Interval<int>& Seis::PosIndexer::crlRange ( ) const
inline

◆ dumpLineCompressed()

void Seis::PosIndexer::dumpLineCompressed ( od_ostream ,
const KeyIdxSet ,
const FileIdxSet  
) const
protected

◆ dumpTo()

bool Seis::PosIndexer::dumpTo ( od_ostream strm) const

◆ empty()

void Seis::PosIndexer::empty ( )
inline

◆ findAll()

TypeSet<od_int64> Seis::PosIndexer::findAll ( const PosKey ) const

ignores offset

◆ findFirst() [1/3]

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

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

◆ findFirst() [2/3]

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

◆ findFirst() [3/3]

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

-1 = empty -2 trcnr not found

◆ findOcc()

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

ignores offset

◆ geomType()

Seis::GeomType Seis::PosIndexer::geomType ( ) const
inline

◆ getCrls()

void Seis::PosIndexer::getCrls ( int  inl,
TypeSet< int > &   
) const

◆ getFirstIdxs()

int Seis::PosIndexer::getFirstIdxs ( const BinID ,
int &  ,
int &   
)
protected

◆ getInls()

const TypeSet<int>& Seis::PosIndexer::getInls ( ) const
inline

◆ inlRange()

const Interval<int>& Seis::PosIndexer::inlRange ( ) const
inline

◆ ioCompressed()

bool Seis::PosIndexer::ioCompressed ( ) const
inline

◆ isReasonable()

bool Seis::PosIndexer::isReasonable ( const BinID ) const
protected

◆ maxIdx()

od_int64 Seis::PosIndexer::maxIdx ( ) const
inline

◆ nrRejected()

od_int64 Seis::PosIndexer::nrRejected ( ) const
inline

◆ offsetRange()

const Interval<float>& Seis::PosIndexer::offsetRange ( ) const
inline

◆ readFrom()

bool Seis::PosIndexer::readFrom ( const char *  nm,
od_int64  offset,
bool  all,
DataInterpreter< int > *  = 0,
DataInterpreter< od_int64 > *  = 0,
DataInterpreter< float > *  = 0 
)

◆ readHeader()

bool Seis::PosIndexer::readHeader ( DataInterpreter< int > *  ,
DataInterpreter< od_int64 > *  ,
DataInterpreter< float > *   
)
protected

◆ readLine()

bool Seis::PosIndexer::readLine ( TypeSet< int > &  crl,
TypeSet< od_int64 > &  ,
DataInterpreter< int > *  ,
DataInterpreter< od_int64 > *   
) const
protected

◆ readLineCompressed()

bool Seis::PosIndexer::readLineCompressed ( KeyIdxSet ,
FileIdxSet  
) const
protected

◆ reIndex()

void Seis::PosIndexer::reIndex ( )

◆ setEmpty()

void Seis::PosIndexer::setEmpty ( )

◆ setIOCompressed()

void Seis::PosIndexer::setIOCompressed ( bool  yn = true)
inline

◆ trcNrRange()

const Interval<int>& Seis::PosIndexer::trcNrRange ( ) const
inline

◆ validIdx()

bool Seis::PosIndexer::validIdx ( od_int64  idx) const
inline

Member Data Documentation

◆ crlrg_

Interval<int> Seis::PosIndexer::crlrg_
protected

◆ crlsets_

ObjectSet< TypeSet<int> > Seis::PosIndexer::crlsets_
protected

◆ curcrlset_

TypeSet<int> Seis::PosIndexer::curcrlset_
protected

◆ curidxset_

TypeSet<od_int64> Seis::PosIndexer::curidxset_
protected

◆ curinl_

int Seis::PosIndexer::curinl_
protected

◆ excludeunreasonable_

bool Seis::PosIndexer::excludeunreasonable_
protected

◆ goodcrlrg_

Interval<int> Seis::PosIndexer::goodcrlrg_
protected

◆ goodinlrg_

Interval<int> Seis::PosIndexer::goodinlrg_
protected

◆ idxsets_

ObjectSet< TypeSet<od_int64> > Seis::PosIndexer::idxsets_
protected

◆ inlfileoffsets_

TypeSet<od_int64> Seis::PosIndexer::inlfileoffsets_
protected

◆ inlrg_

Interval<int> Seis::PosIndexer::inlrg_
protected

◆ inls_

TypeSet<int> Seis::PosIndexer::inls_
protected

◆ int32interp_

DataInterpreter<int>* Seis::PosIndexer::int32interp_
protected

◆ int64interp_

DataInterpreter<od_int64>* Seis::PosIndexer::int64interp_
protected

◆ iocompressedmgr_

bool Seis::PosIndexer::iocompressedmgr_
protected

◆ is2d_

bool Seis::PosIndexer::is2d_
protected

◆ isps_

bool Seis::PosIndexer::isps_
protected

◆ lock_

Threads::Lock Seis::PosIndexer::lock_
mutableprotected

◆ maxidx_

od_int64 Seis::PosIndexer::maxidx_
protected

◆ nrrejected_

od_int64 Seis::PosIndexer::nrrejected_
protected

◆ offsrg_

Interval<float> Seis::PosIndexer::offsrg_
protected

◆ pkl_

const PosKeyList& Seis::PosIndexer::pkl_
protected

◆ strm_

od_istream* Seis::PosIndexer::strm_
protected

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