You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "viewwidget.h"
|
|
#include "GSurface.h"
|
|
#include "coutlinedetector.h"
|
|
using namespace std;
|
|
class ViewOperator
|
|
{
|
|
public:
|
|
ViewOperator(ViewWidget* view);
|
|
~ViewOperator();
|
|
// 从内存加载曲面
|
|
bool LoadGrid(int numx, int numy, double x0, double y0, double dx, double dy, double* values, double zMin = -1E300, double zMax = 1E300);
|
|
// 从文件加载曲面
|
|
bool LoadDfg(QString strDfg);
|
|
bool GetSurfaceZRange(double& zMin, double& zMax);
|
|
bool GetSurfaceParameter(int& xNum, int& yNum, double& deltaX, double& deltaY, double& zMin, double& zMax);
|
|
bool GetDilateMax(int& diLateMax);
|
|
void ViewBlackWhite();
|
|
void ViewColorFul();
|
|
void CreateLines();
|
|
char* WriteContours();
|
|
CPolygonTreeInterface* GetContourPtr();
|
|
|
|
public:
|
|
double m_faciesZMin;
|
|
double m_faciesZMax;
|
|
int m_dilate; // 膨胀系数
|
|
double m_areaMin;
|
|
int m_smoothTimes;
|
|
|
|
private:
|
|
void updateParameter();
|
|
void processImageAndCreateOriginalContours();
|
|
void showOriginalContours();
|
|
|
|
private:
|
|
ViewWidget *viewWidget;
|
|
GSurface* m_pSurface;
|
|
COutlineDetector* m_detector;
|
|
GSurface m_surfBlackWhite;
|
|
};
|
|
|