NXImageLayerComposites Class |
Namespace: Pixoneer.NXDL.NXImage
public class NXImageLayerComposites : NXImageLayer
The NXImageLayerComposites type exposes the following members.
Name | Description | |
---|---|---|
NXImageLayerComposites | NXImageLayerComposites 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자. |
Name | Description | |
---|---|---|
LayerVisible | 레이어의 도시여부를 확인하거나 설정한다. (Overrides NXImageLayerLayerVisible.) | |
ShowBoundary | 전체 영역 경계를 보이는지를 확인하거나 설정한다. | |
ShowPixelBased | 영상을 Pixel-Based로 도시하는지를 확인하거나 설정한다. | |
TextureID | 도시되고 있는 텍스쳐의 ID를 가져온다. |
Name | Description | |
---|---|---|
ClearCache | 캐싱을 삭제한다. | |
ClearTexture | 도시를 위한 텍스처를 삭제한다. | |
EnableCache |
캐싱을 활성화한다. 활성화하면 panning 및 zoom in/out 시 변경된 도시 영역의 빈 공간에 영상이 로딩되기 전까지 캐싱 영상으로 임시 도시한다. | |
EnableThread | 렌더링 쓰레드를 활성화한다. 렌더링 쓰레드가 활성화되면 NXImageLayerComposites에서 도시되는 텍스처 생성이 Render 함수와 별개로 실행된다. | |
GetXDMCompManager | XDMCompManager 객체를 가져온다. | |
Invalidate | 전체 화면을 갱신하도록 하며, 컨트롤의 내용을 다시 그리도록 한다. | |
InvalidateCache | 캐싱을 갱신한다. | |
Lock | XDMCompManager 객체를 다른 쓰레드에서 변경하지 못하도록 제한한다. | |
SetEnableUpdateAtEnd | Mouse-wheel을 이용한 Smooth Zooming 또는 마우스를 이용한 panning이 실행될 때 화면 텍스처의 갱신 시점을 조정한다. | |
UnLock | XDMCompManager 객체의 제한 설정을 해제한다. | |
ZoomFit | 화면에 전체 영상이 도시되도록 확대축소하는 함수이다. |
Name | Description | |
---|---|---|
OnUpdateBackBufferEnd |
BackBuffer 업데이트 종료 이벤트
| |
OnUpdateBackBufferStart |
BackBuffer 업데이트 시작 이벤트
|
using Pixoneer.NXDL.NRS; using Pixoneer.NXDL.NIO; using Pixoneer.NXDL.NXImage; using Pixoneer.NXDL.NGR; partial class FormMain { private Pixoneer.NXDL.NXImage.NXImageView nxImageView1; private Pixoneer.NXDL.NXImage.NXImageLayerComposites nxImageLayerComposites1; public XRasterIO m_RSFileDriverManager; private void InitializeComponent() { this.nxImageView1 = new Pixoneer.NXDL.NXImage.NXImageView(); this.nxImageLayerComposites1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.nxImageLayerComposites1.Location = new System.Drawing.Point(20, 110); this.nxImageLayerComposites1.Name = "nxImageLayerComposites1"; this.nxImageLayerComposites1.Size = new System.Drawing.Size(145, 30); this.nxImageLayerComposites1.TabIndex = 2; this.nxImageLayerComposites1.Visible = false; this.nxImageView1.Controls.Add(this.nxImageLayerComposites1); } 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 = nxImageLayerComposites1.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); nxImageLayerComposites1.ZoomFit(); nxImageView1.Invalidate(); newcomp = null; xdmManager = null; nxImageView1.Invalidate(); } }