Public Member Functions | Protected Member Functions | Protected Attributes

Seis::PosIndexer Class Reference

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

List of all members.

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
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
const od_int64 nrRejected () const
bool dumpTo (std::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.
void empty ()

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

Protected Attributes

std::istream * strm_
DataInterpreter< int > * int32interp_
DataInterpreter< od_int64 > * int64interp_
TypeSet< od_int64 > inlfileoffsets_
Threads::Mutex lock_
TypeSet< od_int64 > curidxset_
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_

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.


Constructor & Destructor Documentation

Seis::PosIndexer::PosIndexer ( const PosKeyList ,
bool  doindex,
bool  excludeunreasonable 
)
Parameters:
excludeunreasonable enables 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]
bool Seis::PosIndexer::dumpTo ( std::ostream &  strm  )  const
void Seis::PosIndexer::empty (  ) 
od_int64 Seis::PosIndexer::findFirst ( int   )  const

-1 = empty -2 trcnr not found

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

-1 = inl not found -2 crl/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

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::isReasonable ( const BinID  )  const [protected]
od_int64 Seis::PosIndexer::maxIdx (  )  const [inline]
const 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]
void Seis::PosIndexer::reIndex (  ) 
const Interval<int>& Seis::PosIndexer::trcNrRange (  )  const [inline]
bool Seis::PosIndexer::validIdx ( od_int64  idx  )  const [inline]

Member Data Documentation

TypeSet<od_int64> Seis::PosIndexer::curidxset_ [protected]
int Seis::PosIndexer::curinl_ [protected]
ObjectSet< TypeSet<od_int64> > Seis::PosIndexer::idxsets_ [protected]
TypeSet<int> Seis::PosIndexer::inls_ [protected]
bool Seis::PosIndexer::is2d_ [protected]
bool Seis::PosIndexer::isps_ [protected]
od_int64 Seis::PosIndexer::maxidx_ [protected]
od_int64 Seis::PosIndexer::nrrejected_ [protected]
Interval<float> Seis::PosIndexer::offsrg_ [protected]
const PosKeyList& Seis::PosIndexer::pkl_ [protected]
std::istream* Seis::PosIndexer::strm_ [protected]