|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace RiverPortray
|
|
|
|
|
|
{
|
|
|
|
|
|
public class OutlineDetector
|
|
|
|
|
|
{
|
|
|
|
|
|
#if DEBUG
|
|
|
|
|
|
const string FACIES_LIB = "FaciesOutlineLib.dll";
|
|
|
|
|
|
#else
|
|
|
|
|
|
const string FACIES_LIB = "FaciesOutlineLib.dll";
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void showDialog(IntPtr parentHandle);
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void EmbedQtWidget(IntPtr parentHandle);
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void InitializeQtApplication(); // Function to initialize QApplication
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void ResizeQtWidget(int width, int height); // Resize the Qt widget
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void ShutdownQtApplication(); // Function to clean up QApplication
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern bool LoadGridFile(string gridFile);
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern bool LoadGrid(int numx, int numy, double x0, double y0, double dx, double dy, long values, double zMin, double zMax);
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void ViewBlackWhite();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void ViewColorful();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void CreateLines();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern IntPtr GetContourData();
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern IntPtr GetContourDataPtr();
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void DeletePointerArray(IntPtr message);
|
|
|
|
|
|
|
|
|
|
|
|
#region 计算参数
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern bool GetSurfaceZRange(ref double zMin, ref double zMax);
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern bool GetDilateMax(ref int diLateMax);
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern double GetFaciesZMin();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void SetFaciesZMin(double zValue);
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern double GetFaciesZMax();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void SetFaciesZMax(double zValue);
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern int GetDilate();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void SetDilate(int dilate);
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern double GetFaciesAreaMin();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void SetFaciesAreaMin(double area);
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern int GetFaciesSmoothTimes();
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern void SetFaciesSmoothTimes(int times);
|
|
|
|
|
|
[DllImport(FACIES_LIB, CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
public static extern bool GetSurfaceParameter(ref int xNum, ref int yNum, ref double deltaX, ref double deltaY, ref double zMin, ref double zMax);
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|