|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件 Section.h
|
|
|
//主要功能:
|
|
|
//
|
|
|
//程序编写: 2005-12-07
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#pragma once
|
|
|
#include "pointnameex.h"
|
|
|
#include "..\MxnFormat\Format.h"
|
|
|
#include "..\DrawModel\ScreenXY.h"
|
|
|
#include "..\DrawModel\Curve.h"
|
|
|
#include "..\DrawModel\Dimension3D.h"
|
|
|
#include "..\DrawModel\ImagePlus.h"
|
|
|
#include "..\DrawModel\grid.h"
|
|
|
#include "SegyBase.h"
|
|
|
|
|
|
#define SECTION_DISPLAY_FAST 0x00000001 //快速彩色显示,OLD
|
|
|
#define SECTION_DISPLAY_SLOW 0x00000002 //慢速彩色显示,OLD
|
|
|
|
|
|
#define SECTION_READ_DEFAULT 0x00000004 //缺省读方式
|
|
|
#define SECTION_READ_LOADALL 0x00000008 //全部装入内存方式
|
|
|
|
|
|
#define SECTION_ONLY_REFLASH 0x00000010 //仅重新显示一次,并不重新生成图像文件,该情况一般在人工设置好颜色后重新显示,为了加快速度
|
|
|
|
|
|
//剖面归一化方式
|
|
|
#define SECTION_UNIFORM_MAX 0x00000020 //原始(max(fabs(minVal,maxVal));
|
|
|
#define SECTION_UNIFORM_RMS 0x00000040 //均方根
|
|
|
#define SECTION_UNIFORM_MEAN 0x00000080 //平均((最大值+最小值)/2)
|
|
|
#define SECTION_UNIFORM_ALL (SECTION_UNIFORM_MAX|SECTION_UNIFORM_RMS|SECTION_UNIFORM_MEAN)
|
|
|
|
|
|
//剖面显示方式
|
|
|
#define SECTION_VIEW_WIGGLE 0x00000100 //曲线 wiggle code
|
|
|
#define SECTION_VIEW_POSITIVE_FILL 0x00000200 //右变面积 positive VA fill code
|
|
|
#define SECTION_VIEW_NEGATIVE_FILL 0x00000400 //左变面积 negative VA fill code
|
|
|
#define SECTION_VIEW_VARIABLE_DENSITY 0x00000800 //变密度 variable density code
|
|
|
#define SECTION_VIEW_ALL (SECTION_VIEW_WIGGLE|SECTION_VIEW_POSITIVE_FILL|SECTION_VIEW_NEGATIVE_FILL|SECTION_VIEW_VARIABLE_DENSITY)
|
|
|
|
|
|
class AFX_EXT_CLASS CSection : public CSegyBase
|
|
|
{
|
|
|
public:
|
|
|
CSection(void);
|
|
|
virtual ~CSection(void);
|
|
|
|
|
|
void Serialize(CArchive& ar, const short &ver) override;
|
|
|
virtual int Read(CFile& fr, const short& ver);
|
|
|
int ReadOld(CFile& fr, const short& ver);
|
|
|
virtual void Write(CFile& fw, const short& ver);
|
|
|
int ReadProperty(BYTE* bufData, const short& ver, int bufLen);
|
|
|
int ReadProperty(CFile &fr, const short &ver);
|
|
|
BOOL ReadElementDML(BYTE* bufData, const short& ver, int bufLen);
|
|
|
virtual void WriteDML(CFile &fw, const short& ver, int nBaseTabNum);
|
|
|
virtual int ReadDML(CFile &fr, const short &ver);
|
|
|
virtual void WritePCG(CFile &fw, const short& ver, int nBaseTabNum);
|
|
|
virtual int ReadPCG(CFile &fw, const short &ver);
|
|
|
|
|
|
int SetTraceData(float *puf, int dataLen);
|
|
|
|
|
|
CRect8 GetRange();
|
|
|
|
|
|
virtual void GetRange(CPoint3D& minPoint, CPoint3D& maxPoint);
|
|
|
virtual void GetRange(CRect8& range);
|
|
|
virtual BOOL IsInRange(CRect8& range);
|
|
|
virtual void operator=(CSection& sc);
|
|
|
|
|
|
// type为校正类型,比如两点校位、四点校位等;pValue为类对象指针,如CCalibrate2、CCalibrate4等
|
|
|
virtual void Calibrate(int type, void* pValue);
|
|
|
|
|
|
CColorBase *pColor;
|
|
|
CSeismicDraw m_memSecDraw;
|
|
|
CRect8 m_rect; // 范围
|
|
|
|
|
|
long step; //隔几道显示
|
|
|
int solidMode; //变面积方式
|
|
|
double times; //振幅放大倍数
|
|
|
long bkColor; //背景颜色
|
|
|
long frSolidColor; //前景充填颜色
|
|
|
long frLineColor; //前景曲线颜色
|
|
|
|
|
|
int GetDrawIdea(void); //快速与慢速彩色显示,返回值: 0为快速,1为慢速
|
|
|
void SetDrawIdea(DWORD nMode);
|
|
|
DWORD GetViewMode(void);//剖面显示模式,SECTION_READ_LOADALL为全部装入内存方式,SECTION_READ_DEFAULT为缺省方式
|
|
|
void SetViewMode(DWORD nMode);
|
|
|
|
|
|
void Initial(void);
|
|
|
|
|
|
long GetSampleByteLength(void);
|
|
|
|
|
|
//for CSectionXY
|
|
|
//void GetRangeXY(CRect8& range);
|
|
|
//void GetP0(double& x0, double& y0);
|
|
|
|
|
|
void CreateColor(void);
|
|
|
int IsSection(void);
|
|
|
void SetViewSize(int cx, int cy);
|
|
|
void SetSectionMode(int nMode);
|
|
|
void Offset(double dx, double dy);
|
|
|
|
|
|
void EnableOnlyRedraw(BOOL bEnable);
|
|
|
BOOL IsOnlyRedraw(void);
|
|
|
void LoadAllData(void); //读取SEGY的所有数据
|
|
|
|
|
|
DWORD SolidMode2ViewMode(int nSolidMode); //索引方式转换为位方式
|
|
|
int ViewMode2SolidMode(DWORD nViewMode); //位方式转换为索引方式
|
|
|
};
|