Click or drag to resize
XDL

NXImageLayerStereoComposites Class

composite를 이용하여 스테레오 영상을 도시하는 컨트롤을 나타낸다.
Inheritance Hierarchy

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

The NXImageLayerStereoComposites type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCursorOffset
커서 오프셋을 가져오거나 설정한다.
Public propertyCustomCursorOffsetUnit
사용자 지정 커서 오프셋 조정 단위를 설정한다.
Public propertyFixedMode
고정 모드인지를 확인하거나 설정한다.
Public propertyLayerVisible
레이어의 도시여부를 확인하거나 설정한다.
(Overrides NXImageLayerLayerVisible.)
Public propertyTerrainFollowing
Terrain following 옵션을 확인하거나 설정한다.
Public propertyUseCustomCursorOffsetUnit
사용자 지정 커서 오프셋 조정 단위 사용 여부를 설정한다.
Top
Methods
  NameDescription
Public methodConvRightImagePosition
왼쪽 커서의 영상 화소 위치를 오른쪽 커서의 화소 위치로 변환한다.
Public methodFindMatchPoint(Double, Double)
오른쪽 영상 화소 위치를 입력 왼쪽 영상 화소 위치와 맞는 위치를 찾는다.
Public methodFindMatchPoint(Double, Double, Double, Double)
오른쪽 영상 화소 위치를 입력 왼쪽 영상 화소 위치와 맞는 위치를 찾는다.
Public methodGetMatchKernelSize
영상 매칭을 위한 커널 크기를 가져온다.
Public methodGetSearchOffset
영상 매칭을 위한 검색 오프셋을 가져온다.
Public methodGetXDMCompManagerL
왼쪽 composite 관리자를 가져온다.
Public methodGetXDMCompManagerR
오른쪽 composite 관리자를 가져온다.
Public methodInvalidate
전체 화면을 갱신하도록 하며, 컨트롤의 내용을 다시 그리도록 한다.
Public methodLock
XDMCompManager 객체를 다른 쓰레드에서 변경하지 못하도록 제한한다.
Public methodSetMatchKernelSize
영상 매칭을 위한 커널 크기를 설정한다.
Public methodSetSearchOffset
영상 매칭을 위한 검색 오프셋을 설정한다.
Public methodSetYOffSetConst
Y 방향으로의 커서 오프셋을 설정한다.
Public methodSyncStereoViewPixelOffset
ImageView 인수를 이용하여 화소 오프셋 매개변수(스테레어 매개변수)를 동기화한다.
Public methodUnLock
XDMCompManager 객체의 제한 설정을 해제한다.
Public methodZoomFit
화면에 전체 영상이 보이도록 확대축소한다.
Public methodZoomOneToOne
영상의 해상도에 대해 1:1로 도시하도록 확대축소한다.
Top
Events
  NameDescription
Public eventOnStereoCursorPos
스테레오 커서 위치가 변경되면 이에 대한 왼쪽/오른쪽 커서 위치를 반환하도록 발생한다.
Top
Examples
예제 #1:
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

// Left and right Image load 
String strFilePathLoad1 = "D:\\Sample\\RS_Sample\\Epipolar\\po_120030_pan_0000010000.xdm";
String strFilePathLoad2 = "D:\\Sample\\RS_Sample\\Epipolar\\po_120030_pan_0010000000.xdm";
XRSLoadFile xrsFileInput1 = RasterIO.LoadFile(strFilePathLoad1, out strError, false, eIOCreateXLDMode.All_NoMsg);
XRSLoadFile xrsFileInput2 = RasterIO.LoadFile(strFilePathLoad2, out strError, false, eIOCreateXLDMode.All_NoMsg);

XDMBand bandL = xrsFileInput1.GetBandAt(0);
XDMBand bandR = xrsFileInput2.GetBandAt(0);

// Set Stereo mode and Color mask to NXImageView
nxImageLayerStereoComposites1.Lock();
nxImageView1.StereoViewType = eStereoType.Anaglyph;
nxImageView1.StereoColorMaskL = eStereoColorMask.Red;
nxImageView1.StereoColorMaskR = eStereoColorMask.GreenBlue;
nxImageView1.StereoFocusLayer = nxImageLayerStereoComposites1;

// Set layer stereo composite 
nxImageLayerStereoComposites1.StereoCursor.CursorColor = Color.White;
nxImageLayerStereoComposites1.StereoCursor.CursorSize = 20;
nxImageLayerStereoComposites1.StereoCursor.CursorThick = 2;
nxImageLayerStereoComposites1.StereoCursor.CursorType = XCursor.eCursorType.CROSSHAIR;
nxImageLayerStereoComposites1.StereoCursor.CursorOperation = XCursor.eOperation.XOR;

// Create Left and Right Composite 
XDMCompManager xdmCompManagerL = nxImageLayerStereoComposites1.GetXDMCompManagerL();
for (int i = 0; i < xdmCompManagerL.NumComp; i++)
{
    XDMComposite comp = xdmCompManagerL.GetXDMCompositeAt(i);
    comp.Dispose();
}
xdmCompManagerL.RemoveXDMCompositeAll();

XDMCompManager xdmCompManagerR = nxImageLayerStereoComposites1.GetXDMCompManagerR();
for (int i = 0; i < xdmCompManagerR.NumComp; i++)
{
    XDMComposite comp = xdmCompManagerR.GetXDMCompositeAt(i);
    comp.Dispose();
}
xdmCompManagerR.RemoveXDMCompositeAll();

// Create Left and Right composite.
XDMComposite newCompL = new XDMComposite();
XDMComposite newCompR = new XDMComposite();

newCompL.Name = bandL.BandName;

newCompL.Mode = eCompMode.RGB;
if (bandL != null) newCompL.SetBand(ref bandL, 2);
if (bandL != null) newCompL.SetBand(ref bandL, 1);
if (bandL != null) newCompL.SetBand(ref bandL, 0);
for (int i = 0; i < 3; i++)
{
    newCompL.SetCutType(eCompCutType.Ct95, i);
    newCompL.SetStretchCoverage(eCompStretchCoverage.Band, i);
    newCompL.SetStretchType(eCompStretchType.Gaussian, i);
}

newCompR.Name = bandR.BandName;

newCompR.Mode = eCompMode.RGB;
if (bandR != null) newCompR.SetBand(ref bandR, 2);
if (bandR != null) newCompR.SetBand(ref bandR, 1);
if (bandR != null) newCompR.SetBand(ref bandR, 0);

for (int i = 0; i < 3; i++)
{
    newCompR.SetCutType(eCompCutType.Ct95, i);
    newCompR.SetStretchCoverage(eCompStretchCoverage.Band, i);
    newCompR.SetStretchType(eCompStretchType.Gaussian, i);
}

xdmCompManagerL.AddXDMComposite(ref newCompL);
xdmCompManagerR.AddXDMComposite(ref newCompR);

// Stereo composite layer.
nxImageLayerStereoComposites1.ZoomFit();
nxImageLayerStereoComposites1.Invalidate();
nxImageLayerStereoComposites1.UnLock();

nxImageView1.RefreshScreen();
See Also