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 20080 2009-12-15 15:57:52Z vlad $ */
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 
17 class ZdSeismicSet : public ZdSeismicFile
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 
73  virtual void resetOrder() {;}
74 
76  virtual void applyOrder () {;}
77 
78  /*
79  * Write-only access features
80  */
81 
86  virtual bool setHeader (int id, const ZqbHeader& hdr) = 0;
87 
91  virtual bool setTrace (int id, const ZqbRealTrace& rtr) = 0;
92 
97  virtual bool setSamples (int id, const float* pSamples) = 0;
98 
102  virtual bool removeTrace(int /*id*/)
103  {return false;}
104 
109  virtual bool appendTrace(int /*id*/, const ZqbRealTrace& /*rtr*/)
110  {return false;}
111 
112 
113  /*
114  * Read-only access features
115  */
116 
119  virtual const ZqbHeader* headerById (int id) = 0;
120 
124  virtual bool headerById (int id, ZqbHeader& hdr);
125 
128  virtual const float* samplesById (int id) = 0;
129 
134  virtual bool samplesById (int id, float* pSamples);
135 
138  virtual const ZqbRealTrace* traceById (int id) = 0;
139 
143  virtual bool traceById (int id, ZqbRealTrace& rtr);
144 
145 
146  /*
147  * Run-time type identification facility
148  */
149 
152  virtual bool compatibleType (const char* szType) const;
153 
154 
155  /*
156  * Time and coord axis meaning.
157  */
158 
161  virtual const char* coordMeaning () const {return "Coord";}
162 
164  virtual const char* coordUnit () const {return "";}
165 
167  virtual const char* timeMeaning () const {return "Time";}
168 
170  virtual const char* timeUnit () const {return "ms";}
171 
172 private:
173 
175  double m_fCoordPrec;
176 
178  static int s_iNameCounter;
179 
181  static const char *s_szOwnType;
182 
183 };
184 
185 
186 #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)
virtual bool appendTrace(int, const ZqbRealTrace &)
Definition: zd_seismic_set.hpp:109
Definition: zd_seismic_file.hpp:17
virtual bool removeTrace(int)
Definition: zd_seismic_set.hpp:102
virtual const char * timeMeaning() const
Definition: zd_seismic_set.hpp:167
virtual const ZqbHeader * headerById(int id)=0
virtual void applyOrder()
Definition: zd_seismic_set.hpp:76
virtual const char * coordMeaning() const
Definition: zd_seismic_set.hpp:161
std::vector< int > TraceIdsV
Definition: zd_seismic_set.hpp:22
virtual double getCoordPrecision() const
Definition: zqb_real_trace.hpp:19
virtual const char * timeUnit() const
Definition: zd_seismic_set.hpp:170
Definition: zd_seismic_set.hpp:17
virtual const ZqbRealTrace * traceById(int id)=0
virtual const char * coordUnit() const
Definition: zd_seismic_set.hpp:164
virtual double traceIdToCoord(int iTraceId, int *piEnsIndex=NULL)=0
virtual const float * samplesById(int id)=0
virtual bool compatibleType(const char *szType) const
virtual void resetOrder()
Definition: zd_seismic_set.hpp:73
virtual int coordToTraceId(double fCoord, int iEnsIndex=0)=0