|
NXMilmapLayerComposites Class
|
Milmap 뷰에 영상 처리 구성 요소를 추가하고자 할 때 이 레이어를 사용한다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NXMilmapAssembly: NXMilmap (in NXMilmap.dll) Version: 3.0.0.5
Syntaxpublic class NXMilmapLayerComposites : NXRenderLayer
The NXMilmapLayerComposites type exposes the following members.
Constructors
Properties
Methods
Events
Example
예제 #1:
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);
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);
newComp.SetStretchCoverage(eCompStretchCoverage.Band, i);
newComp.SetStretchType(eCompStretchType.Gaussian, i);
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();
nxMilmapImageProcessLayer1.SetShaderAlgorithm(nxMilmapImageProcessLayer1.GenShaderCodeHDR());
}
}
See Also