![]() |
NXMilmap
|
public class NXMilmapLayerImageProcess : NXRenderLayer
The NXMilmapLayerImageProcess type exposes the following members.
Name | Description | |
---|---|---|
![]() | NXMilmapLayerImageProcess |
Name | Description | |
---|---|---|
![]() | LayerVisible | 레이어의 도시여부를 확인하거나 설정한다. (Overrides NXRenderLayerLayerVisible) |
Name | Description | |
---|---|---|
![]() | AddXDMComposite | 이 레이어에 XDMComposite를 추가한다. |
![]() | EnableShaderAlgorithm | GPU를 통한 쉐이더 알고리즘을 활성화할지 비활성화할지 설정한다. |
![]() | GenShaderCodeBasso | Basso 쉐이더 코드를 생성한다. |
![]() | GenShaderCodeCBS | CBS(Contrast Brightness Saturation) 쉐이더 코드를 생성한다. |
![]() | GenShaderCodeEdge | 모서리 탐지 쉐이더 코드를 생성한다. |
![]() | GenShaderCodeHDR | HDR(High Dynamic Range) 쉐이더 코드를 생성한다. |
![]() | GenShaderCodeNew | 초기화와 함께 새로운 쉐이더 코드를 생성한다. |
![]() | GetLayerID | 레이어의 ID를 가져온다. (Overrides NXRenderLayerGetLayerID) |
![]() | GetXDMCompManager | 이 레이어의 composite 관리자를 가져온다. |
![]() | Initialize | 내부 초기화 함수. 최초로 사용될 때 NXMilmapEngine이 자동호출한다. (Overrides NXRenderLayerInitialize) |
![]() | SetShaderAlgorithm | 쉐이더 알고리즘 코드를 설정한다. |
partial class FormMain { private Pixoneer.NXDL.NXMilmap.NXMilmapView nxMilmapView1; private Pixoneer.NXDL.NXMilmap.NXMilmapLayerImageProcess nxMilmapImageProcessLayer1; public XScene m_Scene; private void InitializeComponent() { this.nxMilmapView1 = new Pixoneer.NXDL.NXMilmap.NXMilmapView(); this.nxMilmapImageProcessLayer1 = new Pixoneer.NXDL.NXMilmap.NXMilmapLayerImageProcess(); } 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); // Set image process algorithm nxMilmapImageProcessLayer1.SetShaderAlgorithm(nxMilmapImageProcessLayer1.GenShaderCodeHDR()); } }