• 大小: 16.75MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-26
  • 语言: 其他
  • 标签: BSQ存储  C#读tif  

资源简介

使用VS2010程序实现了遥感图像tif格式,以BSQ方式存储的遥感图像的解析,各波段数据的提取,假彩色方式的显示。源代码下带有测试图像,有单波段的,三波段,四波段的图像各一幅。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FileRead
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void OpenToolStripMenuItem_Click(object sender EventArgs e)
        {
            OpenFileDialog open = new OpenFileDialog();
            open.Filter = “*.tif文件|*.tif|所有文件|*.*“;

            if (open.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            if (open.FileName == null)
            {
                return;
            }
            string pathsource = open.FileName;
            Helper.Path = pathsource;
            int len = open.FileName.Length;
            string str = open.FileName.Substring(len - 3 3);


            if (str == “tif“ || str == “TIF“)
            {
                ReadTIF read = new ReadTIF();//创建读取tif文件               
                System.Diagnostics.Stopwatch oTime = new System.Diagnostics.Stopwatch();//定义一个时间对象
                oTime.Start();//记录开始时间
                read.TifFileAllBands();//2017-05-25
                read.WriteFileColor(this);
                //read.WriteFileGray(this1);
                oTime.Stop();//记录结束时间
                //输出运行时间。  
                int t = oTime.Elapsed.Seconds + oTime.Elapsed.Milliseconds / 1000;
                MessageBox.Show(“程序的运行时间:“ + t.ToString() + “ 秒“ “程序的运行时间“);                
            }
        }

        private void SaveToolStripMenuItem_Click(object sender EventArgs e)
        {

        }

        private void QuitToolStripMenuItem_Click(object sender EventArgs e)
        {
            this.Close();
        }

        private void menuStrip1_ItemClicked(object sender ToolStripItemClickedEventArgs e)
        {

        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     405714  2017-04-11 15:21  CSharp read tiff-BSQ-2017-05-31\can256.tif

     文件        144  2017-05-25 09:08  CSharp read tiff-BSQ-2017-05-31\FileRead\app.config

     文件      13824  2017-05-31 16:25  CSharp read tiff-BSQ-2017-05-31\FileRead\bin\Debug\FileRead.exe

     文件        144  2017-05-25 09:08  CSharp read tiff-BSQ-2017-05-31\FileRead\bin\Debug\FileRead.exe.config

     文件      36352  2017-05-31 16:25  CSharp read tiff-BSQ-2017-05-31\FileRead\bin\Debug\FileRead.pdb

     文件      11592  2017-05-31 16:26  CSharp read tiff-BSQ-2017-05-31\FileRead\bin\Debug\FileRead.vshost.exe

     文件        144  2017-05-25 09:08  CSharp read tiff-BSQ-2017-05-31\FileRead\bin\Debug\FileRead.vshost.exe.config

     文件        490  2015-10-30 15:19  CSharp read tiff-BSQ-2017-05-31\FileRead\bin\Debug\FileRead.vshost.exe.manifest

     文件       5539  2017-05-25 09:08  CSharp read tiff-BSQ-2017-05-31\FileRead\FileRead.csproj

     文件        452  2017-05-25 09:08  CSharp read tiff-BSQ-2017-05-31\FileRead\FileRead.csproj.user

    ..A..H.      7168  2012-04-19 16:34  CSharp read tiff-BSQ-2017-05-31\FileRead\FileReadPro.suo

     文件       2119  2017-05-31 16:21  CSharp read tiff-BSQ-2017-05-31\FileRead\Form1.cs

     文件       6149  2017-05-31 11:34  CSharp read tiff-BSQ-2017-05-31\FileRead\Form1.Designer.cs

     文件       6012  2017-05-31 11:34  CSharp read tiff-BSQ-2017-05-31\FileRead\Form1.resx

     文件        411  2011-10-02 08:47  CSharp read tiff-BSQ-2017-05-31\FileRead\Helper.cs

     文件        863  2017-05-31 11:24  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6127  2017-05-31 16:25  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       5581  2017-05-31 16:26  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\FileRead.csproj.FileListAbsolute.txt

     文件        975  2017-05-31 11:34  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\FileRead.csproj.GenerateResource.Cache

     文件       2060  2017-05-26 15:45  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\FileRead.csprojResolveAssemblyReference.cache

     文件      13824  2017-05-31 16:25  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\FileRead.exe

     文件        180  2017-05-31 11:34  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\FileRead.Form1.resources

     文件      36352  2017-05-31 16:25  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\FileRead.pdb

     文件        180  2017-05-26 15:14  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\FileRead.Properties.Resources.resources

     文件       4608  2017-05-25 09:09  CSharp read tiff-BSQ-2017-05-31\FileRead\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件        528  2017-05-31 09:59  CSharp read tiff-BSQ-2017-05-31\FileRead\Program.cs

     文件       1366  2011-10-02 08:35  CSharp read tiff-BSQ-2017-05-31\FileRead\Properties\AssemblyInfo.cs

     文件       2856  2017-05-25 09:08  CSharp read tiff-BSQ-2017-05-31\FileRead\Properties\Resources.Designer.cs

     文件       5612  2011-10-02 08:35  CSharp read tiff-BSQ-2017-05-31\FileRead\Properties\Resources.resx

     文件       1108  2017-05-25 09:08  CSharp read tiff-BSQ-2017-05-31\FileRead\Properties\Settings.Designer.cs

............此处省略36个文件信息

评论

共有 条评论