UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zd_seismic_set.hpp
1 /* zd_seismic_set.hpp */
2 /* $Id: zd_seismic_set.hpp,v 1.2 2007/11/15 15:21:26 vlad Exp $ */
3 #ifndef __zd_seismic_set_hpp
4 #define __zd_seismic_set_hpp
5 
6 #include "zqb_real_trace.hpp"
7 #include "zd_seismic_file.hpp"
8 
9 
18 {
19 public:
20 
22  typedef std::vector<int> TraceIdsV;
23 
25  typedef std::vector<double> CoordsV;
26 
27 
30  ZdSeismicSet (const char* szDocName = NULL);
31 
32 
34  virtual int traceCount () const = 0;
35 
37  virtual void getAllTraceIds (TraceIdsV& viTraceIds) const = 0;
38 
39 
40  /*
41  * Coordinate based services (see ZdCoordObjStream)
42  */
43 
45  virtual int coordCount () const = 0;
46 
48  virtual void setCoordPrecision (double fPrec);
49 
51  virtual double getCoordPrecision () const;
52 
55  virtual int coordToTraceId (double fCoord,
56  int iEnsIndex = 0) = 0;
57 
60  virtual void coordToTraceIds (double fCoord,
61  TraceIdsV& viTraceIds) = 0;
62 
64  virtual void getCoords (CoordsV& vfCoords) = 0;
65 
68  virtual double traceIdToCoord (int iTraceId,
69  int* piEnsIndex = NULL) = 0;
70 
71 
72  /*
73  * Write-only access features
74  */
75 
80  virtual bool setHeader (int id, const ZqbHeader& hdr) = 0;
81 
85  virtual bool setTrace (int id, const ZqbRealTrace& rtr) = 0;
86 
91  virtual bool setSamples (int id, const float* pSamples) = 0;
92 
93  /*
94  * Read-only access features
95  */
96 
99  virtual const ZqbHeader* headerById (int id) = 0;
100 
104  virtual bool headerById (int id, ZqbHeader& hdr);
105 
108  virtual const float* samplesById (int id) = 0;
109 
114  virtual bool samplesById (int id, float* pSamples);
115 
118  virtual const ZqbRealTrace* traceById (int id) = 0;
119 
123  virtual bool traceById (int id, ZqbRealTrace& rtr);
124 
125 
126  /*
127  * Run-time type identification facility
128  */
129 
132  virtual bool compatibleType (const char* szType) const;
133 
134 
135 private:
136 
138  double m_fCoordPrec;
139 
141  static int s_iNameCounter;
142 
144  static char *s_szOwnType;
145 
146 };
147 
148 
149 #endif /* zd_seismic_set.hpp */
virtual bool setHeader(int id, const ZqbHeader &hdr)=0
std::vector< double > CoordsV
Definition: zd_seismic_set.hpp:25
virtual bool setTrace(int id, const ZqbRealTrace &rtr)=0
virtual int traceCount() const =0
virtual bool setSamples(int id, const float *pSamples)=0
Definition: zqb_header.hpp:27
virtual int coordCount() const =0
virtual void getCoords(CoordsV &vfCoords)=0
virtual void coordToTraceIds(double fCoord, TraceIdsV &viTraceIds)=0
virtual void setCoordPrecision(double fPrec)
virtual void getAllTraceIds(TraceIdsV &viTraceIds) const =0
ZdSeismicSet(const char *szDocName=NULL)
Definition: zd_seismic_file.hpp:17
virtual const ZqbHeader * headerById(int id)=0
std::vector< int > TraceIdsV
Definition: zd_seismic_set.hpp:22
virtual double getCoordPrecision() const
Definition: zqb_real_trace.hpp:19
Definition: zd_seismic_set.hpp:17
virtual const ZqbRealTrace * traceById(int id)=0
virtual double traceIdToCoord(int iTraceId, int *piEnsIndex=NULL)=0
virtual const float * samplesById(int id)=0
virtual bool compatibleType(const char *szType) const
virtual int coordToTraceId(double fCoord, int iEnsIndex=0)=0