使用VS2010程序实现了遥感图像tif格式,以BSQ方式存储的遥感图像的解析,各波段数据的提取,假彩色方式的显示。源代码下带有测试图像,有单波段的,三波段,四波段的图像各一幅。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 405714 2017-04-11 15:21 CSharp read tiff-BSQ-2017-05-31can256.tif
文件 144 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadapp.config
文件 13824 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.exe
文件 144 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.exe.config
文件 36352 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.pdb
文件 11592 2017-05-31 16:26 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.vshost.exe
文件 144 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.vshost.exe.config
文件 490 2015-10-30 15:19 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.vshost.exe.manifest
文件 5539 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadFileRead.csproj
文件 452 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadFileRead.csproj.user
..A..H. 7168 2012-04-19 16:34 CSharp read tiff-BSQ-2017-05-31FileReadFileReadPro.suo
文件 2119 2017-05-31 16:21 CSharp read tiff-BSQ-2017-05-31FileReadForm1.cs
文件 6149 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadForm1.Designer.cs
文件 6012 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadForm1.resx
文件 411 2011-10-02 08:47 CSharp read tiff-BSQ-2017-05-31FileReadHelper.cs
文件 863 2017-05-31 11:24 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugDesignTimeResolveAssemblyReferences.cache
文件 6127 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugDesignTimeResolveAssemblyReferencesInput.cache
文件 5581 2017-05-31 16:26 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.csproj.FileListAbsolute.txt
文件 975 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.csproj.GenerateResource.Cache
文件 2060 2017-05-26 15:45 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.csprojResolveAssemblyReference.cache
文件 13824 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.exe
文件 180 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.Form1.resources
文件 36352 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.pdb
文件 180 2017-05-26 15:14 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.Properties.Resources.resources
文件 4608 2017-05-25 09:09 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugTempPEProperties.Resources.Designer.cs.dll
文件 528 2017-05-31 09:59 CSharp read tiff-BSQ-2017-05-31FileReadProgram.cs
文件 1366 2011-10-02 08:35 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesAssemblyInfo.cs
文件 2856 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesResources.Designer.cs
文件 5612 2011-10-02 08:35 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesResources.resx
文件 1108 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesSettings.Designer.cs
............此处省略36个文件信息
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-31can256.tif
文件 144 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadapp.config
文件 13824 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.exe
文件 144 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.exe.config
文件 36352 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.pdb
文件 11592 2017-05-31 16:26 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.vshost.exe
文件 144 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.vshost.exe.config
文件 490 2015-10-30 15:19 CSharp read tiff-BSQ-2017-05-31FileReadinDebugFileRead.vshost.exe.manifest
文件 5539 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadFileRead.csproj
文件 452 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadFileRead.csproj.user
..A..H. 7168 2012-04-19 16:34 CSharp read tiff-BSQ-2017-05-31FileReadFileReadPro.suo
文件 2119 2017-05-31 16:21 CSharp read tiff-BSQ-2017-05-31FileReadForm1.cs
文件 6149 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadForm1.Designer.cs
文件 6012 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadForm1.resx
文件 411 2011-10-02 08:47 CSharp read tiff-BSQ-2017-05-31FileReadHelper.cs
文件 863 2017-05-31 11:24 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugDesignTimeResolveAssemblyReferences.cache
文件 6127 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugDesignTimeResolveAssemblyReferencesInput.cache
文件 5581 2017-05-31 16:26 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.csproj.FileListAbsolute.txt
文件 975 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.csproj.GenerateResource.Cache
文件 2060 2017-05-26 15:45 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.csprojResolveAssemblyReference.cache
文件 13824 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.exe
文件 180 2017-05-31 11:34 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.Form1.resources
文件 36352 2017-05-31 16:25 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.pdb
文件 180 2017-05-26 15:14 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugFileRead.Properties.Resources.resources
文件 4608 2017-05-25 09:09 CSharp read tiff-BSQ-2017-05-31FileReadobjDebugTempPEProperties.Resources.Designer.cs.dll
文件 528 2017-05-31 09:59 CSharp read tiff-BSQ-2017-05-31FileReadProgram.cs
文件 1366 2011-10-02 08:35 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesAssemblyInfo.cs
文件 2856 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesResources.Designer.cs
文件 5612 2011-10-02 08:35 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesResources.resx
文件 1108 2017-05-25 09:08 CSharp read tiff-BSQ-2017-05-31FileReadPropertiesSettings.Designer.cs
............此处省略36个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)