private void ShowGridLayerImage(string filename)
        {
            var layer = new GridLayer(filename);
            var image = filename = LayerImageGenerator.GenerateTemporaryImageFile(layer, "layer_", _richnessOptions.LowColor, _richnessOptions.HighColor, _richnessOptions.NoValueColor, 0, 255);

            SystemUtils.ShellExecute(image);
        }
        private void ShowGridLayerInMap(GridLayer grid, int intervals, double cutoff, IGridLayerBitmapOptions options, string filename = null)
        {
            this.InvokeIfRequired(() => {
                var prefix = grid.Name;
                FileInfo f = new FileInfo(grid.Name);
                if (f.Exists)
                {
                    prefix = f.Name.Substring(0, f.Name.LastIndexOf("."));
                }

                var map = PluginManager.Instance.GetMap();

                if (filename == null)
                {
                    filename = LayerImageGenerator.GenerateTemporaryImageFile(grid, prefix, options.LowColor, options.HighColor, options.NoValueColor, cutoff, intervals);
                }
                else
                {
                    map.RemoveRasterLayer(filename);
                    LayerImageGenerator.CreateImageFileFromGrid(grid, filename, options.LowColor, options.HighColor, options.NoValueColor, cutoff, intervals);
                }


                map.Show();
                map.AddRasterLayer(filename);
            });
        }