Click or drag to resize
XDL

NXMilmapLayerComposites Class

Milmap 뷰에 영상 처리 구성 요소를 추가하고자 할 때 이 레이어를 사용한다.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      System.Windows.FormsControl
        System.Windows.FormsScrollableControl
          System.Windows.FormsContainerControl
            System.Windows.FormsUserControl
              Pixoneer.NXDL.NGRNXRenderLayer
                Pixoneer.NXDL.NXMilmapNXMilmapLayerComposites

Namespace: Pixoneer.NXDL.NXMilmap
Assembly: NXMilmap (in NXMilmap.dll) Version: 3.0.0.0
Syntax
C#
public class NXMilmapLayerComposites : NXRenderLayer

The NXMilmapLayerComposites type exposes the following members.

Constructors
 NameDescription
Public methodNXMilmapLayerCompositesInitializes a new instance of the NXMilmapLayerComposites class
Top
Properties
 NameDescription
Public propertyLayerVisible 레이어의 도시여부를 확인하거나 설정한다.
(Overrides NXRenderLayerLayerVisible)
Top
Methods
 NameDescription
Public methodAddXDMComposite 이 레이어에 XDMComposite를 추가한다.
Public methodEnableShaderAlgorithm GPU를 통한 쉐이더 알고리즘을 활성화할지 비활성화할지 설정한다.
Public methodGenShaderCodeBasso Basso 쉐이더 코드를 생성한다.
Public methodGenShaderCodeCBS CBS(Contrast Brightness Saturation) 쉐이더 코드를 생성한다.
Public methodGenShaderCodeEdge 모서리 탐지 쉐이더 코드를 생성한다.
Public methodGenShaderCodeHDR HDR(High Dynamic Range) 쉐이더 코드를 생성한다.
Public methodGenShaderCodeNew 초기화와 함께 새로운 쉐이더 코드를 생성한다.
Public methodGetLayerID 레이어의 ID를 가져온다.
(Overrides NXRenderLayerGetLayerID)
Public methodGetXDMCompManager 이 레이어의 composite 관리자를 가져온다.
Public methodCode exampleHitTest 화면에 도시된 XDMComposite 중에서 특정 위치에 Hitting 되는 XDMComposite 중 가장 상위의 XDMComposite 를 가져온다.
Public methodInitialize 내부 초기화 함수. 최초로 사용될 때 NXMilmapEngine이 자동호출한다.
(Overrides NXRenderLayerInitialize)
Public methodInvalidate설정된 색합성을 반영하여 화면을 갱신하도록 한다.
Public methodSetShaderAlgorithm 쉐이더 알고리즘 코드를 설정한다.
Top
Example
예제 #1:
C#
partial class FormMain
{
    private Pixoneer.NXDL.NXMilmap.NXMilmapView nxMilmapView1;
    private Pixoneer.NXDL.NXMilmap.NXMilmapLayerComposites nxMilmapImageProcessLayer1;
    public XScene m_Scene;
    private void InitializeComponent()
    {
        this.nxMilmapView1 = new Pixoneer.NXDL.NXMilmap.NXMilmapView();
        this.nxMilmapImageProcessLayer1 = new Pixoneer.NXDL.NXMilmap.NXMilmapLayerComposites();
    }
    private void FormMain_Load(object sender, EventArgs e)
    {
        NXRenderLayer layer = (NXRenderLayer)nxMilmapImageProcessLayer1;
        nxMilmapView1.AddRenderLayer(ref layer);

        // Open file
        OpenFileDialog openFileDialog = new OpenFileDialog();
        openFileDialog.Filter = "XDM file(*.xdm)|*.XDM||";
        openFileDialog.RestoreDirectory = true;

        if (openFileDialog.ShowDialog() != DialogResult.OK) return;

        string strFileName = openFileDialog.FileName;
        string strError;
        m_xrsFileInput = m_RSFileDriverManager.LoadFile(strFileName, out strError, true, eIOCreateXLDMode.All_NoMsg);

        XDMComposite newComp = new XDMComposite();
        newComp.Name = strFileName;
        if (m_xrsFileInput.NumBand >= 3)
        {
            XDMBand bandL0 = m_xrsFileInput.GetBandAt(0);
            XDMBand bandL1 = m_xrsFileInput.GetBandAt(1);
            XDMBand bandL2 = m_xrsFileInput.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 = m_xrsFileInput.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);
        }
        nxMilmapImageProcessLayer1.AddXDMComposite(ref newComp);
        nxMilmapImageProcessLayer1.Invalidate();

        // Set image process algorithm
        nxMilmapImageProcessLayer1.SetShaderAlgorithm(nxMilmapImageProcessLayer1.GenShaderCodeHDR());
    }
}
See Also