|
NXImageLayerComposites Class
|
NXImageLayerComposites은 XDMCompManager 객체에 있는 composite 목록을 도시한다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NXImageAssembly: NXImage (in NXImage.dll) Version: 3.0.0.0
Syntaxpublic class NXImageLayerComposites : NXImageLayer
The NXImageLayerComposites type exposes the following members.
Constructors
Properties
Methods
Events
Example
예제 #1:
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NIO;
using Pixoneer.NXDL.NXImage;
using Pixoneer.NXDL.NGR;
partial class FormMain
{
private Pixoneer.NXDL.NXImage.NXImageView nxImageView1;
private Pixoneer.NXDL.NXImage.NXImageLayerComposites nxImageLayerComposites1;
public XRasterIO m_RSFileDriverManager;
private void InitializeComponent()
{
this.nxImageView1 = new Pixoneer.NXDL.NXImage.NXImageView();
this.nxImageLayerComposites1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nxImageLayerComposites1.Location = new System.Drawing.Point(20, 110);
this.nxImageLayerComposites1.Name = "nxImageLayerComposites1";
this.nxImageLayerComposites1.Size = new System.Drawing.Size(145, 30);
this.nxImageLayerComposites1.TabIndex = 2;
this.nxImageLayerComposites1.Visible = false;
this.nxImageView1.Controls.Add(this.nxImageLayerComposites1);
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
String strError;
XRSLoadFile xrsFile = m_RSFileDriverManager.LoadFile(openFileDialog1.FileName, out strError, true, eIOCreateXLDMode.All_NoMsg);
DisplayFile(xrsFile);
}
}
private void DisplayFile(XRSLoadFile xrsFile)
{
XDMComposite newcomp;
XDMCompManager xdmManager = nxImageLayerComposites1.GetXDMCompManager();
int numBand = xrsFile.NumBand;
newcomp = new XDMComposite();
newcomp.Name = xrsFile.FileName;
if (numBand >= 3)
{
XDMBand bandL0 = xrsFile.GetBandAt(0);
XDMBand bandL1 = xrsFile.GetBandAt(1);
XDMBand bandL2 = xrsFile.GetBandAt(2);
newcomp.Mode = eCompMode.RGB;
newcomp.SetBand(ref bandL0, 2);
newcomp.SetBand(ref bandL1, 1);
newcomp.SetBand(ref bandL2, 0);
for (int i = 0; i < 3; i++)
{
newcomp.SetCutType(eCompCutType.Ct95, i);
newcomp.SetStretchCoverage(eCompStretchCoverage.Band, i);
newcomp.SetStretchType(eCompStretchType.Gaussian, i);
newcomp.SetCutMin(0.0, i);
newcomp.SetCutMax(255.0, i);
}
}
else
{
XDMBand bandL0 = xrsFile.GetBandAt(0);
newcomp.Mode = eCompMode.Gray;
newcomp.SetBand(ref bandL0, 0);
newcomp.SetCutType(eCompCutType.Ct95, 0);
newcomp.SetStretchCoverage(eCompStretchCoverage.Band, 0);
newcomp.SetStretchType(eCompStretchType.Gaussian, 0);
}
xdmManager.AddXDMComposite(ref newcomp);
nxImageLayerComposites1.ZoomFit();
nxImageView1.Invalidate();
newcomp = null;
xdmManager = null;
nxImageView1.Invalidate();
}
}
See Also