Click or drag to resize
XDL

XDMBand2DMem Class

XDMBand2DMem클래스는 메모리 공간 상의 2차원 배열의 이미지 자료를 생성한다.
Inheritance Hierarchy

Namespace:  Pixoneer.NXDL.NRS
Assembly:  NXDLrs (in NXDLrs.dll) Version: 1.2.817.72
Syntax
C#
public class XDMBand2DMem : XDMBand

The XDMBand2DMem type exposes the following members.

Constructors
  NameDescription
Public methodXDMBand2DMem
XDMBand2DMem 클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Methods
  NameDescription
Public methodGetInputParam
설정된 입력 변수를 얻는다.
Public methodSetInputParam
입력 매개변수를 설정한다.
Top
Remarks

XDMComposite에 설정되는 XDMBand는 보통 XRasterIO를 통해 생성된 XDMBandRaw객체나 XDMBand로부터 상속받은 영상처리 Band(예: XDMBandChangeDetect)를 설정하는데, 메모리 상의 2차원 이미지를 XDMComposite에 설정하고자 할 경우는 XDMBand2DMem클래스를 사용하면 된다. 메모리 공간 데이터를 XDMBand2DMem에 설정하여 XDMComposite객체에 추가한 다음 도시를 수행한다.

Examples
영상을 로딩하여 영상의 (0,0)~(200,300) 영역에 해당하는 데이터를 읽어 XDMBandDMem 밴드 인스턴스에 메모리를 설정하고 XDM 파일로 저장한다.
// IO initialize to load image file
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

// Image load
String strFilePathLoad = "D:\\Sample\\IKONOS.xdm";
XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);

// Load grid data from xdm file or generate Grid data.
XGrid gridData = new XGrid();
xrsFileInput.GetBandAt(0).ReadSubset(ref gridData, 0, 0, 200, 0, 300);

// Set input param
XBandParam2DMem InputParam = new XBandParam2DMem();
InputParam.GridData = gridData;


// Create New process band and set input param
XDMBand2DMem bandProcess = new XDMBand2DMem();
if (!bandProcess.SetInputParam(ref InputParam))
{
    return;
}

// create XRSSaveFile to save realtime band(XDMBandXXXX)
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;

fileSave.AddBand(ref bandCast);

// Save output file
XThread thd = null;
String strFilePathSave = "D:\\Sample\\Out_2DMem.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
    return;
}
See Also