|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件: SegY格式文件操作
|
|
|
//主要功能:
|
|
|
//
|
|
|
//程序编写:
|
|
|
//日期:2005-12-07
|
|
|
//
|
|
|
//
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#pragma once
|
|
|
#include ".\mxnbase.h"
|
|
|
|
|
|
namespace NMxn
|
|
|
{
|
|
|
|
|
|
class AFX_EXT_CLASS CMxnRow : public CMxnBase
|
|
|
{
|
|
|
protected:
|
|
|
virtual void RowMath(void);
|
|
|
CPoint* solid;
|
|
|
|
|
|
public:
|
|
|
CMxnRow(void);
|
|
|
virtual ~CMxnRow(void);
|
|
|
|
|
|
virtual int Initialize(CString name);
|
|
|
virtual void Close(void);
|
|
|
void operator=(CMxnRow& row);
|
|
|
|
|
|
int Read(); //读取一道的数据,完成后最大最小值也同时被获得
|
|
|
int ReadRowHead(void);
|
|
|
int ReadRowTrace(void);
|
|
|
int ReadRowTrace(int begin_index, int end_index); //指定一道的索引范围读取道数据
|
|
|
|
|
|
BOOL IsNullTrace(void);
|
|
|
|
|
|
void Write(CFileSegy& fw);
|
|
|
//采样间隔 dSampleInterval
|
|
|
//采样点个数 nSampleNumber
|
|
|
//数据类型 nDataType
|
|
|
//是否工作站格式IsPC
|
|
|
//格式代码 nFormatCode
|
|
|
void WriteTrace (CFileSegy& fw, short dSampleInterval, short nSampleNumber, CFileSegy::EDataType dt, int IsPC);
|
|
|
void WriteFileHead (CFileSegy& fw, short dSampleInterval=-1, short nSampleNumber=-1, CFileSegy::EDataType dt=CFileSegy::typeIbmFloat);
|
|
|
void WriteSourceTrace(CFileSegy& fw, short nSampleStep, short nSampleNumber);
|
|
|
|
|
|
double A(int index); //获得一个振幅值
|
|
|
void SetAt(int index,double v);
|
|
|
|
|
|
int GetRowLength(void); //一道的采样点个数
|
|
|
|
|
|
void DrawSolidLeft (CDC *pDC, CPoint2D &point, int y1, int y2, double dx, double dy);
|
|
|
void DrawSolidRight (CDC *pDC, CPoint2D &point, int y1, int y2, double dx, double dy);
|
|
|
void DrawRow (CDC *pDC, CPoint2D &point, int y1, int y2, double dx, double dy);
|
|
|
|
|
|
//振幅归一化
|
|
|
double FitScale(double av, double dx);
|
|
|
|
|
|
double times; // 振幅放大倍数
|
|
|
|
|
|
char *row_head; //道头
|
|
|
double *value; //道数据
|
|
|
|
|
|
double average; //振幅和的平均值
|
|
|
double amin,amax; //最大最小值
|
|
|
double rms; //均方根值
|
|
|
};
|
|
|
|
|
|
}//namespace
|
|
|
|