UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hds_segy.hpp
1 /* hds_segy.hpp */
2 /* $Id$ */
3 #ifndef __hds_segy_hpp
4 #define __hds_segy_hpp
5 
6 #include <vector>
7 
8 #include <QIODevice>
9 #include <QString>
10 
11 
13 namespace hds
14 {
15  class SEGY
16  {
17  public:
18 
20  enum Format
21  {
22  UNDEFINED = 0,
23  IBM = 1,
24  Int4 = 2,
25  Int2 = 3,
26  IEEE = 5
27  };
28 
31  {
32  THK_NTR = 0,
34  THK_NSP,
35  THK_NRP,
37  THK_L,
38 
43  };
44 
46  SEGY(QIODevice *segy_io_dev = 0x0);
47 
49  ~SEGY();
50 
51 
53  bool nextTrace(std::vector<float> &samples, std::vector<int> &header);
54 
56  void reset();
57 
58 
61  int samplesNum() const;
62 
65  float dtVal() const;
66 
68  Format format() const;
69 
70 
72  static int getTrHdrVal(TraceHeaderKey key, const std::vector<int> &header);
73 
74 
76  static QString formatStr(Format fmt);
77 
78 
80  qint64 ioDeviceSize() const;
81 
83  qint64 ioDevicePos() const;
84 
85  protected:
86 
88  QIODevice *m_psegy_io_dev;
89 
91  std::vector<char> m_current_line_text_hdr;
92 
94  std::vector<char> m_current_line_bin_hdr;
95 
97  bool m_cur_line_hdrs_loaded;
98 
101  };
102 };
103 
104 #endif /* hds_segy.hpp */
int samplesNum() const
Format
Definition: hds_segy.hpp:20
Definition: hds_segy.hpp:41
Definition: hds_segy.hpp:40
qint64 ioDevicePos() const
SEGY(QIODevice *segy_io_dev=0x0)
QIODevice * m_psegy_io_dev
Definition: hds_segy.hpp:88
Definition: hds_segy.hpp:36
float dtVal() const
TraceHeaderKey
Definition: hds_segy.hpp:30
bool load_current_line_headers()
Definition: hds_segy.hpp:42
qint64 ioDeviceSize() const
std::vector< char > m_current_line_text_hdr
Definition: hds_segy.hpp:91
Definition: hds_segy.hpp:32
void reset()
Definition: hds_segy.hpp:39
Definition: hds_segy.hpp:15
Format format() const
static QString formatStr(Format fmt)
static int getTrHdrVal(TraceHeaderKey key, const std::vector< int > &header)
std::vector< char > m_current_line_bin_hdr
Definition: hds_segy.hpp:94