UNIVERS
15.3
UNIVERS base processing software API
|
#include <zd_useismic.hpp>
Classes | |
struct | TraceItem |
Public Member Functions | |
ZdUSeismic (TrSet *pTS, int nExtraHW=0, const char *szDocName=NULL) | |
ZdUSeismic (const char *szProject, const char *szSeisFile, int nExtraHW=0, const char *szDocName=NULL) | |
virtual | ~ZdUSeismic () |
TrSet * | handle () |
const TrSet * | handle () const |
const TrIndexTable * | indexTable () const |
int | extraHeaderWords () const |
virtual bool | getCoordRange (double c[2]) |
virtual double | averageCoordStep () |
virtual const ZqbAbstrTrace & | tracePar () 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 ZqbHeader * | headerById (int id) |
virtual const float * | samplesById (int id) |
virtual const ZqbRealTrace * | traceById (int id) |
virtual void | setCustomCoord (int iCoordHW, ZqbOrder eOrder=Z_O_ASCENT) |
virtual void | setSecondaryOrder (int iSecondaryHW, ZqbOrder eOrder=Z_O_ASCENT) |
virtual void | setTertiaryOrder (int iTertiaryHW, ZqbOrder eOrder=Z_O_ASCENT) |
virtual void | setCustomHdrWord (int iCustomHW) |
virtual bool | goFirstCoord () |
virtual bool | goNextCoord () |
virtual double | coord () |
virtual void * | custom (int ens_index=0, ZqbType *pRetType=NULL) |
virtual int | ensembleLength () |
virtual int | maxEnsembleLength () |
virtual const ZqbRealTrace & | trace (int ens_index=0) |
virtual const ZqbHeader & | header (int ens_index=0) |
virtual int | traceId (int ens_index=0) |
void | getValuesList (int hwId, std::vector< int > &vValues) |
void | getValuesList (int hwId, std::vector< float > &vValues) |
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 |
bool | properOrder () const |
void | applyOrder () |
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 void | resetOrder () |
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 ZqbHeader * | defHeaderPar () const |
virtual int | getFieldsCount () const =0 |
virtual const ZqbHdrField * | headerWordInfo (int hwId) 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) | |
ZdCoordObjStream (const char *szDocName=NULL) | |
virtual void | setCustomCoord (int iCoordId) |
virtual int | getCustomCoord () const |
virtual void | setFirstOrder (int iCoordId, ZqbOrder eOrder=Z_O_ASCENT) |
virtual bool | getFirstOrder (int &iCoordId, ZqbOrder &eOrder) const |
virtual bool | getSecondaryOrder (int &iCoordId, ZqbOrder &eOrder) const |
virtual bool | getTertiaryOrder (int &iCoordId, ZqbOrder &eOrder) const |
virtual void | setCoordsSelection (const CoordSelectionVec &selCoords) |
virtual const CoordSelectionVec & | getCoordsSelection () const |
virtual void | setInvisibleCoordinates (const CoordSelectionVec &unvisibleCoords) |
virtual const CoordSelectionVec & | getInvisibleCoordinates () const |
virtual bool | visibleCoord () |
virtual ZqbType | coordTypeFromId (int coordId) const |
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 () |
ZqbName & | operator= (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 () |
ZqbName & | operator= (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 ZqbHdrField * | hwInfo (int hwId) |
Protected Member Functions | |
int | curEnsSize (int iCurTrace) |
void | constructor () |
void | setSortOrder (ZqbHeader &hdr) |
Protected Attributes | |
TrSet * | m_pTS |
TrIndexTable | m_it |
std::vector< TraceItem > | m_vTraces |
std::vector< std::pair< int, ZqbOrder > > | m_vOrder |
ZqbAbstrTrace | m_aTrace |
ZqbRealTrace | m_EmptyTrace |
int | m_iCurTrace |
int | m_nExtraHW |
int | m_nMaxEnsSize |
std::vector< double > | m_vfCoords |
std::vector< int > | m_viStartEns |
std::vector< int > | m_viEnsLengths |
std::map< int, int > | m_mId2I |
UnitId | m_eLengthUnitId |
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 |
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.
ZdUSeismic::ZdUSeismic | ( | 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.
ZdUSeismic::ZdUSeismic | ( | 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.
|
virtual |
Deinitialize the object but don't close TrSet!
|
virtual |
Called automatically after setCustomCoord(), setSecondaryOrder(), setTertiaryOrder() to apply these changes but before iterations started.
Reimplemented from ZdSeismicSet.
|
virtual |
Get average primary coordinate step between objects.
Implements ZdCoordObjStream.
|
protected |
Constructor method.
|
virtual |
Get current coordinate in case of previous go???Coord() succeeded.
Implements ZdCoordObjStream.
|
virtual |
Returns number of different coordinates.
Implements ZdSeismicSet.
|
virtual |
Physical meaning of custom coordinate value. "Coord" by default.
Reimplemented from ZdSeismicSet.
|
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 |
Return all trace ids which match given coordinate with known precision.
Implements ZdSeismicSet.
|
virtual |
Unit of measure for custom coordinate. "" by default.
Reimplemented from ZdSeismicSet.
|
protected |
Find number of traces in current ensemble.
|
virtual |
Get the pointer to some custom value for the current coordinate or return NULL if no such value is defined. A type is returned in optional pRetType. Until the next call pointee contents rest the same.
Reimplemented from ZdCoordObjStream.
|
virtual |
Get number of records found for this primary coordinate (always >=1).
Implements ZdCoordObjStream.
int ZdUSeismic::extraHeaderWords | ( | ) | const |
Return number of extra header words.
|
virtual |
Returns all trace ids (raw indeces).
Implements ZdSeismicSet.
|
virtual |
Get range of primary coordinates respecting order of the stream or return false in case of empty range.
Implements ZdCoordObjStream.
|
virtual |
Return all different coordinates.
Implements ZdSeismicSet.
void ZdUSeismic::getValuesList | ( | int | hwId, |
std::vector< int > & | vValues | ||
) |
Return vector of sorted integer unique values of the given header word. Used to split seismic set by values of given header word.
void ZdUSeismic::getValuesList | ( | int | hwId, |
std::vector< float > & | vValues | ||
) |
Return vector of sorted floating point unique values of the given header word. Used to split seismic set by values of given header word.
|
virtual |
Obtain amplitude distribution bounds.
Reimplemented from ZdSeismicFile.
|
virtual |
Reset iterator. Returns true on success and false on failure (empty stream).
Implements ZdCoordObjStream.
|
virtual |
Go to next iteration. Returns true on success and false on failure (end of stream).
Implements ZdCoordObjStream.
TrSet* ZdUSeismic::handle | ( | ) |
Provide access to internal I/O handle.
const TrSet* ZdUSeismic::handle | ( | ) | const |
Provide constant access to internal I/O handle.
|
virtual |
Return header of the current trace of the stream with given index inside the ensemble.
Reimplemented from ZdSeismicFile.
|
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.
|
static |
Return full description of given header word (only static one).
|
static |
Return type of given header word (only static one).
const TrIndexTable* ZdUSeismic::indexTable | ( | ) | const |
Provide constant access to internal index table.
|
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 |
Return true if the container allows to change its content. By default returns false.
Reimplemented from ZdSeismicFile.
|
virtual |
Get maximum length of ensemble. 0 means unknown.
Implements ZdCoordObjStream.
|
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 ZdUSeismic::properOrder | ( | ) | const |
Just checks for proper result after applyOrder().
|
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 |
Set custom primary seismic coordinate.
Reimplemented from ZdCoordObjStream.
|
virtual |
Set custom value taken from given header word. See custom().
|
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 |
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 |
Set custom secondary seismic coordinate.
Reimplemented from ZdCoordObjStream.
|
protected |
Set sort order for given header.
|
virtual |
Set custom tertiary seismic coordinate.
Reimplemented from ZdCoordObjStream.
|
virtual |
Set the trace with given id to the rtr 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 |
Physical meaning of sample time. "Time" by default.
Reimplemented from ZdSeismicSet.
|
virtual |
Unit of measure for sample time. "ms" by default.
Reimplemented from ZdSeismicSet.
|
virtual |
Return current trace of the stream with given index inside the ensemble.
Implements ZdSeismicFile.
|
virtual |
Returns pointer to the trace with given id. Returns NULL if there is no such id in seismic set now.
Implements ZdSeismicSet.
|
virtual |
Returns number of traces.
Implements ZdSeismicSet.
|
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 |
Return coordinate of given trace and optionally returns its ensemble index.
Implements ZdSeismicSet.
|
virtual |
Get common trace parameters.
Implements ZdSeismicFile.
|
protected |
Trace parameters.
|
protected |
Unit of measure for depth/length etc
|
protected |
Special empty trace object.
|
protected |
Index of the current trace in sequence. It enumerates items in m_vfCoords, m_viStartEns, m_viEnsLengths vectors.
|
protected |
Index table used to exteriorize seismic trace subset visualized currently.
|
protected |
Mapping of raw trace id (used to address trace in TrSet with turned off index table) to ordered trace indeces (m_vTraces).
|
protected |
Number of extra header words.
|
protected |
Maximum number of traces in ensemble.
|
protected |
Object for accessing seismic in UNIVERS database.
|
protected |
List of unique coordinates.
|
protected |
List of ensemble lengths for each coordinate.
|
protected |
List of starting indeces of ensembles in the index table.
|
protected |
Order rules.
|
protected |
Vector of traces to visualize. Don't load too large data sets to prevent long load time!
|
staticprotected |
Procedure to initialize extra (virtual and transient) header words in existent (read from DB) header.