-
Notifications
You must be signed in to change notification settings - Fork 0
/
segy.h
72 lines (67 loc) · 1.76 KB
/
segy.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef SEGY_H
#define SEGY_H
#include <QtGui>
#include <segy.h>
class SEGY
{
public:
double _SampleInterval;
int _TotalSamples;
int _DataFormat;
int _SampleRate;
int _TRL;
long long _TotalTraces;
long long _CurrentTrace;
int _FirstCDP;
int _LastCDP;
double _CDPInc;
int _FirstSP;
int _LastSP;
double _SPInc;
double _FirstX;
double _FirstY;
double _LastX;
double _LastY;
int _ByteCDP;
int _ByteSP;
int _ByteX;
int _ByteY;
int _ByteLineName;
int _ByteInline;
int _ByteXline;
int _LineNameLength;
double _EndTime;
int _MinInline; long long _MinInline_Trace;
int _MaxInline; long long _MaxInline_Trace;
int _MinXline; long long _MinXline_Trace;
int _MaxXline; long long _MaxXline_Trace;
int _Corner1_X;
int _Corner1_Y;
int _Corner2_X;
int _Corner2_Y;
int _Corner3_X;
int _Corner3_Y;
QString _LineName;
SEGY();
bool OpenFile(char*);
bool FileIsOpen();
void ReadFirstAndLast();
void ShowTraceHeader(long long, QPlainTextEdit*);
void ShowBinaryHeader(QPlainTextEdit*);
void ShowEbcdicHeader(QPlainTextEdit*);
void SetByte(int,int,int,int,int,int,int,int);
int Read2Byte(long long,int);
int Read4Byte(long long,int);
void computeILXLRange();
void computeCorners();
private:
FILE* _F;
char _EbcdicHeader [3200];
char _BinaryHeader [400];
char _TraceHeader [240];
char _INPTRC [10000];
float _Data [10000];
float GetSample(int);
bool ReadTrace(long long);
};
#endif // SEGY_H