UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
hds::ZdLdbSeismic Class Reference

#include <zd_ldb_seismic.hpp>

Inheritance diagram for hds::ZdLdbSeismic:
ZdSeismicSet ZdSeismicFile ZdSeismicFile ZdCoordObjStream ZdCoordObjStream ZdCoordObjStream ZdCoordObjStream ZdDocument ZdDocument ZdDocument ZdDocument ZdDocument ZdDocument ZdDocument ZdDocument

Classes

struct  SortOrder
 

Public Member Functions

 ZdLdbSeismic (const char *szDocName=NULL)
 
 ZdLdbSeismic (const char *szProject, const char *szSeisFile, int nExtraHW=0, const char *szDocName=NULL)
 
 ZdLdbSeismic (TrSet *pTS, int nExtraHW=0, const char *szDocName=NULL)
 
virtual ~ZdLdbSeismic ()
 
virtual bool getCoordRange (double c[2])
 
virtual double averageCoordStep ()
 
virtual const ZqbAbstrTracetracePar () const
 
virtual int traceCount () const
 
virtual void getAllTraceIds (TraceIdsV &viTraceIds) const
 
virtual int coordCount () const
 
virtual int coordToTraceId (double fCoord, int iEnsIndex=0)
 
virtual void coordToTraceIds (double fCoord, TraceIdsV &viTraceIds)
 
virtual void getCoords (CoordsV &vfCoords)
 
virtual double traceIdToCoord (int iTraceId, int *piEnsIndex=NULL)
 
virtual bool modify ()
 
virtual bool isModifiable () const
 
virtual bool setHeader (int id, const ZqbHeader &hdr)
 
virtual bool setTrace (int id, const ZqbRealTrace &rtr)
 
virtual bool setSamples (int id, const float *pSamples)
 
virtual const ZqbHeaderheaderById (int id)
 
virtual const float * samplesById (int id)
 
virtual const ZqbRealTracetraceById (int id)
 
virtual void setCustomCoord (int iCoordId)
 
virtual int getCustomCoord () const
 
virtual void setFirstOrder (int iCoordHW, ZqbOrder eOrder=Z_O_ASCENT)
 
virtual bool getFirstOrder (int &iCoordHW, ZqbOrder &eOrder) const
 
virtual void setSecondaryOrder (int iSecondaryHW, ZqbOrder eOrder=Z_O_ASCENT)
 
virtual bool getSecondaryOrder (int &iSecondaryHW, ZqbOrder &eOrder) const
 
virtual void setTertiaryOrder (int iTertiaryHW, ZqbOrder eOrder=Z_O_ASCENT)
 
virtual bool getTertiaryOrder (int &iTertiaryHW, ZqbOrder &eOrder) const
 
virtual void setCoordsSelection (const CoordSelectionVec &selCoords)
 
virtual const CoordSelectionVecgetCoordsSelection () const
 
virtual void setInvisibleCoordinates (const CoordSelectionVec &unvisibleCoords)
 
virtual const CoordSelectionVecgetInvisibleCoordinates () const
 
virtual void resetOrder ()
 
virtual bool goFirstCoord ()
 
virtual bool goNextCoord ()
 
virtual double coord ()
 
virtual bool visibleCoord ()
 
virtual void * custom (int ens_index=0, ZqbType *pRetType=NULL)
 
virtual int ensembleLength ()
 
virtual int maxEnsembleLength ()
 
virtual const ZqbRealTracetrace (int ens_index=0)
 
virtual const ZqbHeaderheader (int ens_index=0)
 
virtual int traceId (int ens_index=0)
 
int getFieldsCount () const
 
virtual void globalAmplInfo (double pfAmm[2])
 
virtual const char * coordMeaning () const
 
virtual const char * coordUnit () const
 
virtual const char * timeMeaning () const
 
virtual const char * timeUnit () const
 
virtual const ZqbHdrFieldheaderWordInfo (int hwId) const
 
bool properOrder () const
 
void applyOrder ()
 
virtual ZqbType coordTypeFromId (int coordId) const
 
const TrSetgetTrSetPtr () const
 
- Public Member Functions inherited from ZdSeismicSet
 ZdSeismicSet (const char *szDocName=NULL)
 
virtual void setCoordPrecision (double fPrec)
 
virtual double getCoordPrecision () const
 
virtual bool headerById (int id, ZqbHeader &hdr)
 
virtual bool samplesById (int id, float *pSamples)
 
virtual bool traceById (int id, ZqbRealTrace &rtr)
 
virtual bool compatibleType (const char *szType) const
 
 ZdSeismicSet (const char *szDocName=NULL)
 
virtual void setCoordPrecision (double fPrec)
 
virtual double getCoordPrecision () const
 
virtual bool removeTrace (int)
 
virtual bool appendTrace (int, const ZqbRealTrace &)
 
virtual bool headerById (int id, ZqbHeader &hdr)
 
virtual bool samplesById (int id, float *pSamples)
 
virtual bool traceById (int id, ZqbRealTrace &rtr)
 
virtual bool compatibleType (const char *szType) const
 
- Public Member Functions inherited from ZdSeismicFile
 ZdSeismicFile (const char *szDocName=NULL)
 
virtual bool setSamples (const float *pSamples, int ens_index=0)
 
virtual bool setHeader (const ZqbHeader &hdr, int ens_index=0)
 
virtual bool setTrace (const ZqbRealTrace &rtr, int ens_index=0)
 
 ZdSeismicFile (const char *szDocName=NULL)
 
virtual const ZqbHeaderdefHeaderPar () const
 
virtual bool setSamples (const float *pSamples, int ens_index=0)
 
virtual bool setHeader (const ZqbHeader &hdr, int ens_index=0)
 
virtual bool setTrace (const ZqbRealTrace &rtr, int ens_index=0)
 
virtual double customCoord ()
 
- Public Member Functions inherited from ZdCoordObjStream
 ZdCoordObjStream (const char *szDocName=NULL)
 
virtual void setCustomCoord (int iCoordId, ZqbOrder eOrder=Z_O_ASCENT)
 
 ZdCoordObjStream (const char *szDocName=NULL)
 
- Public Member Functions inherited from ZdDocument
 ZdDocument (const char *szName=NULL)
 
virtual ~ZdDocument ()
 
virtual void updateViews ()
 
virtual bool isChanged ()
 
virtual void setChanges ()
 
virtual void resetChanges ()
 
 ZdDocument (const char *szName=NULL)
 
virtual ~ZdDocument ()
 
virtual void updateViews ()
 
virtual bool isChanged ()
 
virtual void setChanges ()
 
virtual void resetChanges ()
 
- Public Member Functions inherited from ZqbAutoName
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
- Public Member Functions inherited from ZqbName
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 

Static Public Member Functions

static void initialize (int nExtraHW=0, const ZqbHdrField *pExtraHW=NULL, void(*InitExtraHW)(ZqbHeader &)=NULL)
 
static ZqbType hwType (int hwId)
 
static ZqbHdrFieldhwInfo (int hwId)
 

Protected Member Functions

void constructor ()
 

Protected Attributes

TrSetm_pTS
 
TrIndexTable m_it
 
ZqbAbstrTrace m_aTrace
 
ZqbRealTrace m_EmptyTrace
 
std::map< int, ZqbRealTrace * > m_mTraces
 
int m_iCurTrace
 
int m_nExtraHW
 
int m_iCustomCoordId
 
UnitId m_eLengthUnitId
 
size_t m_CurrentTrsBufferSize
 
std::vector< SortOrderm_vSortOrders
 
ZdCoordObjStream::CoordSelectionVec m_vSelectCoords
 
ZdCoordObjStream::CoordSelectionVec m_vInvisibleCoords
 
- Protected Attributes inherited from ZdDocument
ZqbViewVector m_Views
 
- Protected Attributes inherited from ZqbName
char * m_szName
 
char * m_szRoot
 

Static Protected Attributes

static void(* s_initExtraHW )(ZqbHeader &)
 

Additional Inherited Members

- Public Types inherited from ZdSeismicSet
typedef std::vector< int > TraceIdsV
 
typedef std::vector< double > CoordsV
 
typedef std::vector< int > TraceIdsV
 
typedef std::vector< double > CoordsV
 
- Public Types inherited from ZdCoordObjStream
typedef std::vector
< CoordSelection
CoordSelectionVec
 

Detailed Description

Class for accessing UNIVERS seismic data object using ZdSeismicSet abstraction. Identifier of the trace is just a sequence index of trace for the order through all ensembles.

Trace id is so called raw index. Index in applied order has name custom index. Index of ensemble is coordinate index. Index inside the ensemble is ensemble index.

Use TA_* ids to specify exact header words. To access extra header words use TA_EXTRA(x). Value of x should be from 0 to nExtraHW-1.

Constructor & Destructor Documentation

hds::ZdLdbSeismic::ZdLdbSeismic ( const char *  szDocName = NULL)

Default constructor, empty object not connected to seismic.

hds::ZdLdbSeismic::ZdLdbSeismic ( const char *  szProject,
const char *  szSeisFile,
int  nExtraHW = 0,
const char *  szDocName = NULL 
)
Create seismic file access document directly accessing LDB by

name of seismic file. Additional header words may be used in number given by nExtraHW. Optional document name may be specified.

hds::ZdLdbSeismic::ZdLdbSeismic ( TrSet pTS,
int  nExtraHW = 0,
const char *  szDocName = NULL 
)
Create seismic file access document.  Additional header words

may be used in number given by nExtraHW. Optional document name may be specified.

virtual hds::ZdLdbSeismic::~ZdLdbSeismic ( )
virtual

Deinitialize the object but don't close TrSet!

Member Function Documentation

void hds::ZdLdbSeismic::applyOrder ( )
virtual
Called automatically after setFirstOrder(),

setSecondaryOrder(), setTertiaryOrder() to apply these changes but before iterations started.

Reimplemented from ZdSeismicSet.

virtual double hds::ZdLdbSeismic::averageCoordStep ( )
virtual

Get average primary coordinate step between objects.

Implements ZdCoordObjStream.

void hds::ZdLdbSeismic::constructor ( )
protected

Constructor method. Object for accessing seismic in UNIVERS database.

virtual double hds::ZdLdbSeismic::coord ( )
virtual
Get current coordinate in case of previous go???Coord()

succeeded.

Implements ZdCoordObjStream.

virtual int hds::ZdLdbSeismic::coordCount ( ) const
virtual

Returns number of different coordinates.

Implements ZdSeismicSet.

virtual const char* hds::ZdLdbSeismic::coordMeaning ( ) const
virtual
Physical meaning of custom coordinate value.  "Coord" by

default.

Reimplemented from ZdSeismicSet.

virtual int hds::ZdLdbSeismic::coordToTraceId ( double  fCoord,
int  iEnsIndex = 0 
)
virtual
Try to find coordinate in the seismic set and return id of the

trace found. Ensemble index is taken into account too.

Implements ZdSeismicSet.

virtual void hds::ZdLdbSeismic::coordToTraceIds ( double  fCoord,
TraceIdsV viTraceIds 
)
virtual
Return all trace ids which match given coordinate with known

precision.

Implements ZdSeismicSet.

virtual ZqbType hds::ZdLdbSeismic::coordTypeFromId ( int  coordId) const
virtual

Get type of the coordinate from provided coordinate id.

Reimplemented from ZdCoordObjStream.

virtual const char* hds::ZdLdbSeismic::coordUnit ( ) const
virtual

Unit of measure for custom coordinate. "" by default.

Reimplemented from ZdSeismicSet.

virtual void* hds::ZdLdbSeismic::custom ( int  ens_index = 0,
ZqbType *  pRetType = NULL 
)
virtual

Get current custom coord of the trace.

Reimplemented from ZdCoordObjStream.

virtual int hds::ZdLdbSeismic::ensembleLength ( )
virtual
Get number of records found for this primary coordinate (always

>=1).

Implements ZdCoordObjStream.

virtual void hds::ZdLdbSeismic::getAllTraceIds ( TraceIdsV viTraceIds) const
virtual

Returns all trace ids (raw indeces).

Implements ZdSeismicSet.

virtual bool hds::ZdLdbSeismic::getCoordRange ( double  c[2])
virtual
Get range of primary coordinates respecting order of the stream

or return false in case of empty range.

Implements ZdCoordObjStream.

virtual void hds::ZdLdbSeismic::getCoords ( CoordsV vfCoords)
virtual

Return all different coordinates.

Implements ZdSeismicSet.

virtual const CoordSelectionVec& hds::ZdLdbSeismic::getCoordsSelection ( ) const
inlinevirtual

Get current coordinates selection.

Reimplemented from ZdCoordObjStream.

virtual int hds::ZdLdbSeismic::getCustomCoord ( ) const
virtual

Get current custom coord id. Should be reimplemented.

Reimplemented from ZdCoordObjStream.

int hds::ZdLdbSeismic::getFieldsCount ( ) const
inlinevirtual

Get number of fields in trace header.

Implements ZdSeismicFile.

virtual bool hds::ZdLdbSeismic::getFirstOrder ( int &  iCoordId,
ZqbOrder &  eOrder 
) const
virtual

Get first coordinate and it's order. Return false if not defined.

Reimplemented from ZdCoordObjStream.

virtual const CoordSelectionVec& hds::ZdLdbSeismic::getInvisibleCoordinates ( ) const
inlinevirtual

Coordinates to be unvisible.

Reimplemented from ZdCoordObjStream.

virtual bool hds::ZdLdbSeismic::getSecondaryOrder ( int &  iCoordId,
ZqbOrder &  eOrder 
) const
virtual

Get secondary coordinate and it's order. Return false if not defined.

Reimplemented from ZdCoordObjStream.

virtual bool hds::ZdLdbSeismic::getTertiaryOrder ( int &  iCoordId,
ZqbOrder &  eOrder 
) const
virtual

Get tertiary coordinate and it's order. Return false if not defined.

Reimplemented from ZdCoordObjStream.

const TrSet* hds::ZdLdbSeismic::getTrSetPtr ( ) const
inline

Access to set of traces.

virtual void hds::ZdLdbSeismic::globalAmplInfo ( double  pfAmm[2])
virtual

Obtain amplitude distribution bounds.

Reimplemented from ZdSeismicFile.

virtual bool hds::ZdLdbSeismic::goFirstCoord ( )
virtual
Reset iterator.  Returns \b true on success and \b false on

failure (empty stream).

Implements ZdCoordObjStream.

virtual bool hds::ZdLdbSeismic::goNextCoord ( )
virtual
Go to next iteration.  Returns \b true on success and \b false

on failure (end of stream).

Implements ZdCoordObjStream.

virtual const ZqbHeader& hds::ZdLdbSeismic::header ( int  ens_index = 0)
virtual
Return header of the current trace of the stream with given

index inside the ensemble.

Reimplemented from ZdSeismicFile.

virtual const ZqbHeader* hds::ZdLdbSeismic::headerById ( int  id)
virtual
Returns pointer to the header of the trace with given id.

Returns NULL if there is no such id in seismic set now.

Implements ZdSeismicSet.

virtual const ZqbHdrField* hds::ZdLdbSeismic::headerWordInfo ( int  hwId) const
virtual

Return full description of given header word.

Reimplemented from ZdSeismicFile.

static ZqbHdrField* hds::ZdLdbSeismic::hwInfo ( int  hwId)
static
Return full description of given header word (only static

one).

static ZqbType hds::ZdLdbSeismic::hwType ( int  hwId)
static

Return type of given header word (only static one).

static void hds::ZdLdbSeismic::initialize ( int  nExtraHW = 0,
const ZqbHdrField pExtraHW = NULL,
void(*)(ZqbHeader &)  InitExtraHW = NULL 
)
static
Initialization of UNIVERS seismic definitions for Zq trace

related functionality. Must be called once in the beginning of the application. Extra header words may be supplied. Each extra header word should have ZqbHdrField descriptor. A special procedure (one for all extra header words) may be supplied to initialize virtual header words.

virtual bool hds::ZdLdbSeismic::isModifiable ( ) const
virtual
Return \b true if the container allows to change its content.

By default returns false.

Reimplemented from ZdSeismicFile.

virtual int hds::ZdLdbSeismic::maxEnsembleLength ( )
virtual

Get maximum length of ensemble. 0 means unknown.

Implements ZdCoordObjStream.

virtual bool hds::ZdLdbSeismic::modify ( )
virtual
Change the mode of seismic set from read-only (default) to

modifiable. Return true if succeeded and false otherwise. By default returns false.

Reimplemented from ZdSeismicFile.

bool hds::ZdLdbSeismic::properOrder ( ) const

Just checks for proper result after applyOrder().

virtual void hds::ZdLdbSeismic::resetOrder ( )
virtual

Reset seismic coordinates order and selection.

Reimplemented from ZdSeismicSet.

virtual const float* hds::ZdLdbSeismic::samplesById ( int  id)
virtual
Returns pointer to the samples of the trace with given id.

Returns NULL if there is no such id in seismic set now.

Implements ZdSeismicSet.

virtual void hds::ZdLdbSeismic::setCoordsSelection ( const CoordSelectionVec selCoords)
inlinevirtual

Set selection of the coordinates.

Reimplemented from ZdCoordObjStream.

virtual void hds::ZdLdbSeismic::setCustomCoord ( int  iCoordId)
virtual

Set custom coordinate. The values returned by custom() method.

Reimplemented from ZdCoordObjStream.

virtual void hds::ZdLdbSeismic::setFirstOrder ( int  iCoordHW,
ZqbOrder  eOrder = Z_O_ASCENT 
)
virtual

Set custom primary seismic coordinate.

Reimplemented from ZdCoordObjStream.

virtual bool hds::ZdLdbSeismic::setHeader ( int  id,
const ZqbHeader hdr 
)
virtual
Set the header of trace with given id to the hdr contents and

return true if succeeded and false otherwise. Failure may be if id is not found and if seismic set is not modifiable just now.

Implements ZdSeismicSet.

virtual void hds::ZdLdbSeismic::setInvisibleCoordinates ( const CoordSelectionVec unvisibleCoords)
inlinevirtual

Set coordinates to be unvisible.

Reimplemented from ZdCoordObjStream.

virtual bool hds::ZdLdbSeismic::setSamples ( int  id,
const float *  pSamples 
)
virtual
Set the trace samples with given id to the pSamples contents and

return true if succeeded and false otherwise. Failure may be if id is not found and if seismic set is not modifiable just now.

Implements ZdSeismicSet.

virtual void hds::ZdLdbSeismic::setSecondaryOrder ( int  iSecondaryHW,
ZqbOrder  eOrder = Z_O_ASCENT 
)
virtual

Set custom secondary seismic coordinate.

Reimplemented from ZdCoordObjStream.

virtual void hds::ZdLdbSeismic::setTertiaryOrder ( int  iTertiaryHW,
ZqbOrder  eOrder = Z_O_ASCENT 
)
virtual

Set custom tertiary seismic coordinate.

Reimplemented from ZdCoordObjStream.

virtual bool hds::ZdLdbSeismic::setTrace ( int  id,
const ZqbRealTrace rtr 
)
virtual
Set the trace with given id to the rtr contents and return \b

true if succeeded and false otherwise. Failure may be if id is not found and if seismic set is not modifiable just now.

Implements ZdSeismicSet.

virtual const char* hds::ZdLdbSeismic::timeMeaning ( ) const
virtual

Physical meaning of sample time. "Time" by default.

Reimplemented from ZdSeismicSet.

virtual const char* hds::ZdLdbSeismic::timeUnit ( ) const
virtual

Unit of measure for sample time. "ms" by default.

Reimplemented from ZdSeismicSet.

virtual const ZqbRealTrace& hds::ZdLdbSeismic::trace ( int  ens_index = 0)
virtual
Return current trace of the stream with given index inside the

ensemble.

Implements ZdSeismicFile.

virtual const ZqbRealTrace* hds::ZdLdbSeismic::traceById ( int  id)
virtual
Returns pointer to the trace with given id.  Returns NULL if

there is no such id in seismic set now.

Implements ZdSeismicSet.

virtual int hds::ZdLdbSeismic::traceCount ( ) const
virtual

Returns number of traces.

Implements ZdSeismicSet.

virtual int hds::ZdLdbSeismic::traceId ( int  ens_index = 0)
virtual
Get unique trace index which can be associated with underlying

trace db or trace file. It's guaranteed the the index is unique among traces of the same seismic stream.

Implements ZdSeismicFile.

virtual double hds::ZdLdbSeismic::traceIdToCoord ( int  iTraceId,
int *  piEnsIndex = NULL 
)
virtual
Return coordinate of given trace and optionally returns its

ensemble index.

Implements ZdSeismicSet.

virtual const ZqbAbstrTrace& hds::ZdLdbSeismic::tracePar ( ) const
virtual

Get common trace parameters.

Implements ZdSeismicFile.

virtual bool hds::ZdLdbSeismic::visibleCoord ( )
virtual

Does current coord visible.

Reimplemented from ZdCoordObjStream.

Member Data Documentation

ZqbAbstrTrace hds::ZdLdbSeismic::m_aTrace
protected

Special empty trace object.

UnitId hds::ZdLdbSeismic::m_eLengthUnitId
protected

Current buffer size for traces (number of traces)

ZqbRealTrace hds::ZdLdbSeismic::m_EmptyTrace
protected

Map of traces with it's indexes as a keys.

int hds::ZdLdbSeismic::m_iCurTrace
protected

Number of extra header words.

TrIndexTable hds::ZdLdbSeismic::m_it
protected

Trace parameters.

std::map<int, ZqbRealTrace*> hds::ZdLdbSeismic::m_mTraces
protected

Index of the current trace in sequence.

int hds::ZdLdbSeismic::m_nExtraHW
protected

Id of the custom coord.

TrSet* hds::ZdLdbSeismic::m_pTS
protected

Index table used to exteriorize seismic trace subset visualized currently.

ZdCoordObjStream::CoordSelectionVec hds::ZdLdbSeismic::m_vInvisibleCoords
protected

Vector of unvisible coordinates.

ZdCoordObjStream::CoordSelectionVec hds::ZdLdbSeismic::m_vSelectCoords
protected

Vector of selected coordinates.

std::vector<SortOrder> hds::ZdLdbSeismic::m_vSortOrders
protected

Vector of sorting orders.

void(* hds::ZdLdbSeismic::s_initExtraHW)(ZqbHeader &)
staticprotected
Procedure to initialize extra (virtual and transient) header

words in existent (read from DB) header. Unit of measure for depth/length etc


The documentation for this class was generated from the following file: