Click or drag to resize
XDL

NXImageLayerCompLink Class

동일한 뷰에서 2개의 영상을 동시에 비교하여 도시할 수 있는 컨트롤이다.
Inheritance Hierarchy

Namespace:  Pixoneer.NXDL.NXImage
Assembly:  NXImage (in NXImage.dll) Version: 2.0.3.31
Syntax
C#
public class NXImageLayerCompLink : NXImageLayer

The NXImageLayerCompLink type exposes the following members.

Constructors
  NameDescription
Public methodNXImageLayerCompLink
Top
Properties
  NameDescription
Public propertyFrontAlpha
앞쪽 Composite 레이어에 대한 투명값을 가져오거나 설정한다.
Public propertyLayerVisible
레이어의 도시여부를 확인하거나 설정한다.
(Overrides NXImageLayerLayerVisible.)
Public propertyLayoutMode
영상을 교차도시하기 위한 화면 분할 모드(Horizontal이나 Vertical)를 가져오거나 설정한다.
LayoutMode is deprecated : Unsafe property, please use SwipeMode
Public propertyShowBoundary
전체 영역에 대한 경계를 보이거나 숨길수 있는 여부를 설정하거나 얻는다.
Public propertySwipeFrontOnly
앞쪽 Composite 레이어의 영상만 교차도시를 수행할 지 여부를 설정하거나 얻는다.
Public propertySwipeMode
영상을 교차도시하기 위한 화면 분할 모드(Horizontal이나 Vertical)를 가져오거나 설정한다.
Public propertySwipeOn
영상 교차도시 수행 여부를 설정하거나 얻는다.
Top
Methods
  NameDescription
Public methodEnableCache
캐싱을 활성화한다.
Public methodGetXDLCompManager1
첫번째 Composite 레이어의 Composite manager를 가져온다.
Public methodGetXDLCompManager2
두번째 Composite 레이어의 Composite manager를 가져온다.
Public methodInvalidate
전체 화면을 갱신하도록 하며, 컨트롤의 내용을 다시 그리도록 한다.
Public methodLock
두 개의 Composite 레이어의 XDMCompManager 객체를 다른 쓰레드에서 변경하지 못하도록 제한한다.
Public methodSetComp1Front
첫번째 Composite 레이어를 앞쪽으로 이동한다.
Public methodSetComp2Front
두번째 Composite 레이어를 앞쪽으로 이동한다.
Public methodUnLock
두 개의 Composite 레이어의 XDMCompManager 객체의 제한 설정을 해제한다.
Public methodZoomFit
화면에 전체 영상이 도시되도록 확대축소하는 함수이다.
Top
Examples
예제 #1:
using Pixoneer.NXDL.NIO;
partial class FormMain
{
    private Pixoneer.NXDL.NXImage.NXImageView nxImageView1;
    private Pixoneer.NXDL.NXImage.NXImageLayerCompLink nxImageLayerCompLink1;

    private void InitializeComponent()
    {
        this.nxImageView1 = new Pixoneer.NXDL.NXImage.NXImageView();
        this.nxImageLayerCompLink1 = new Pixoneer.NXDL.NXImage.NXImageLayerCompLink();

        this.nxImageLayerCompLink1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        this.nxImageLayerCompLink1.FrontAlpha = 1F;
        this.nxImageLayerCompLink1.SwipeMode = Pixoneer.NXDL.NXImage.NXImageLayerCompLink.eSwipeMode.Horizontal;
        this.nxImageLayerCompLink1.Location = new System.Drawing.Point(20, 75);
        this.nxImageLayerCompLink1.Name = "nxImageLayerCompLink1";
        this.nxImageLayerCompLink1.Size = new System.Drawing.Size(145, 30);
        this.nxImageLayerCompLink1.TabIndex = 1;
        this.nxImageLayerCompLink1.Visible = false;

        this.nxImageView1.Controls.Add(this.nxImageLayerCompLink1);
    }

    private void horToolStripMenuItem_Click(object sender, EventArgs e)
    {
        nxImageLayerCompLink1.SwipeMode = NXImageLayerCompLink.eSwipeMode.Horizontal;
    }

    private void vertToolStripMenuItem_Click(object sender, EventArgs e)
    {
        nxImageLayerCompLink1.SwipeMode = NXImageLayerCompLink.eSwipeMode.Vertical;
    }

    private void openPairFilesToolStripMenuItem_Click(object sender, EventArgs e)
    {
        string strFile1 = "";
        string strFile2 = "";

        if (openFileDialog1.ShowDialog() == DialogResult.OK)
        {
            strFile1 = openFileDialog1.FileName;
        } else return;

        if (openFileDialog1.ShowDialog() == DialogResult.OK)
        {
            strFile2 = openFileDialog1.FileName;
        } else return;


        FillCompisiteManager(strFile1, false);
        FillCompisiteManager(strFile2, true);

        nxImageLayerCompLink1.ZoomFit();
    }

    private void FillCompisiteManager(string strFile, bool bS)
    {
        String strError;
        XRSLoadFile xrsFile = m_RSFileDriverManager.LoadFile(strFile, out strError, true, eIOCreateXLDMode.All_NoMsg);
        if (xrsFile == null) return;

        XDMComposite newcomp;
        XDMCompManager xdmManager;
        if(bS)
            xdmManager = nxImageLayerCompLink1.GetXDLCompManager2();
        else
            xdmManager = nxImageLayerCompLink1.GetXDLCompManager1();


        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;
            if (bS)
            {
                newcomp.SetBand(ref bandL0, 0);
                newcomp.SetBand(ref bandL1, 2);
                newcomp.SetBand(ref bandL2, 1);
            }
            else
            {
                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);

        newcomp = null;
        xdmManager = null;
    }
}
See Also