![]() | NXMapLayerComposites Class |
Namespace: Pixoneer.NXDL.NXMap
public class NXMapLayerComposites : NXMapLayer
The NXMapLayerComposites type exposes the following members.
Name | Description | |
---|---|---|
![]() | NXMapLayerComposites | NXMapLayerComposites 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자. |
Name | Description | |
---|---|---|
![]() | LayerVisible | 레이어의 도시여부를 확인하거나 설정한다. (Overrides NXMapLayerLayerVisible.) |
![]() | ShowBoundary | 전체 영역 경계를 보이는지를 확인하거나 설정한다. |
![]() | ShowPixelBased | 영상을 Pixel-Based로 도시하는지를 확인하거나 설정한다. |
![]() | TextureID | 도시되고 있는 텍스쳐의 ID를 가져온다. |
Name | Description | |
---|---|---|
![]() | ClearCache | 캐싱을 삭제한다. |
![]() | EnableCache | 캐싱을 활성화한다. |
![]() | EnableThread | 쓰레드를 활성화한다. |
![]() | GetXDMCompManager | XDMCompManager 객체를 가져온다. |
![]() | Invalidate | 전체 화면을 갱신하도록 하며, 컨트롤의 내용을 다시 그리도록 한다. |
![]() | InvalidateCache | 캐싱을 갱신한다. |
![]() | Lock | 쓰레드를 잠근다. |
![]() | UnLock | 잠근 쓰레드를 푼다. |
![]() | ZoomFit | 화면에 전체 영상이 도시되도록 확대축소하는 함수이다. |
using Pixoneer.NXDL.NRS; using Pixoneer.NXDL.NIO; using Pixoneer.NXDL.NXMap; using Pixoneer.NXDL.NGR; partial class FormMain { private Pixoneer.NXDL.NXMap.NXMapView nxMapView1; private Pixoneer.NXDL.NXMap.NXMapLayerComposites nxMapLayerComposites1; public XRasterIO m_RSFileDriverManager; private void InitializeComponent() { this.nxMapView1 = new Pixoneer.NXDL.NXMap.NXMapView(); this.nxMapLayerComposites1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.nxMapLayerComposites1.Location = new System.Drawing.Point(20, 110); this.nxMapLayerComposites1.Name = "nxMapLayerComposites1"; this.nxMapLayerComposites1.Size = new System.Drawing.Size(145, 30); this.nxMapLayerComposites1.TabIndex = 2; this.nxMapLayerComposites1.Visible = false; this.nxMapView1.Controls.Add(this.nxMapLayerComposites1); } 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 = nxMapLayerComposites1.GetXDMCompManager(); //xdmManager.RemoveXDMCompositeAll(); 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); //Cut Type Gaussian 95 newcomp.SetStretchCoverage(eCompStretchCoverage.Band, i); //XDMCOMPOSITE_SC_BAND newcomp.SetStretchType(eCompStretchType.Gaussian, i); //XDMCOMPOSITE_ST_GAUSSIAN 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); nxMapLayerComposites1.ZoomFit(); nxMapView1.Invalidate(); newcomp = null; xdmManager = null; nxMapView1.Invalidate(); } }