Exemple #1
0
        private void OpenFile(object parameter)
        {
            var ofd = new OpenFileDialog
            {
                Filter = "Grid|*.grd"
            };

            if (ofd.ShowDialog() == true)
            {
                int    rows, cols;
                double xtick, ytick, zmin, zmax;
                var    para = Convert.ToString(parameter);
                if (para == "Anomaly")
                {
                    anomalyData = OpenFile(ofd.OpenFile(), out rows, out cols, out xtick, out ytick, out zmin, out zmax);

                    AnomalyMin = zmin;
                    AnomalyMax = zmax;
                    AnomalyMap = GetMap(anomalyData, zmin, zmax);

                    EdgeDetection.Initialize(cols, rows, xtick, ytick, anomalyData);

                    frqData  = null;
                    xdrData  = null;
                    ydrData  = null;
                    zdrData  = null;
                    xdrfData = null;
                    ydrfData = null;
                    zdrfData = null;
                    vxxData  = null;
                    vyyData  = null;
                    vxyData  = null;
                }
                else if (para == "Local")
                {
                    secondData = OpenFile(ofd.OpenFile(), out rows, out cols, out xtick, out ytick, out zmin, out zmax);

                    SecondMin = zmin;
                    SecondMax = zmax;
                    SedondMap = GetMap(secondData, zmin, zmax);
                }
            }
        }