Click or drag to resize
XDL

NXMapLayerComposites Class

NXMapLayerComposites은 XDMCompManager 객체에 있는 composite 목록을 도시한다.
Inheritance Hierarchy

Namespace:  Pixoneer.NXDL.NXMap
Assembly:  NXMap (in NXMap.dll) Version: 1.2.817.72
Syntax
C#
public class NXMapLayerComposites : NXMapLayer

The NXMapLayerComposites type exposes the following members.

Constructors
  NameDescription
Public methodNXMapLayerComposites
NXMapLayerComposites 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자.
Top
Properties
  NameDescription
Public propertyLayerVisible
레이어의 도시여부를 확인하거나 설정한다.
(Overrides NXMapLayerLayerVisible.)
Public propertyShowBoundary
전체 영역 경계를 보이는지를 확인하거나 설정한다.
Public propertyShowPixelBased
영상을 Pixel-Based로 도시하는지를 확인하거나 설정한다.
Public propertyTextureID
도시되고 있는 텍스쳐의 ID를 가져온다.
Top
Methods
  NameDescription
Public methodClearCache
캐싱을 삭제한다.
Public methodEnableCache
캐싱을 활성화한다.
Public methodEnableThread
쓰레드를 활성화한다.
Public methodGetXDMCompManager
XDMCompManager 객체를 가져온다.
Public methodInvalidate
전체 화면을 갱신하도록 하며, 컨트롤의 내용을 다시 그리도록 한다.
Public methodInvalidateCache
캐싱을 갱신한다.
Public methodLock
쓰레드를 잠근다.
Public methodUnLock
잠근 쓰레드를 푼다.
Public methodZoomFit
화면에 전체 영상이 도시되도록 확대축소하는 함수이다.
Top
Remarks

Examples
예제 #1:
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();
    }
}
See Also