|
XDMBandMosaic Class
|
여러 개의 영상 데이터를 공간적으로 융합하여 하나의 영상 데이터로 생성하는 기능을 수행한다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NRSAssembly: NXDLrs (in NXDLrs.dll) Version: 2.0.3.38
Syntaxpublic class XDMBandMosaic : XDMBand
The XDMBandMosaic type exposes the following members.
Constructors | Name | Description |
---|
 | XDMBandMosaic | XDMBandMosaic 클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다. |
Top
Methods
Example
3장의 영상을 로딩하여 공간적으로 융합하여 하나의 영상 데이터를 생성한다.
출력 영상의 해상도는 입력 영상 중 가장 작은 해상도(고해상도)로 설정하고, 투명값으로 모두 0으로 설정하여 중첩영역에 대해 모자이크 영상처리가 되도록 한다.
using Pixoneer.NXDL;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NIO;
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
return;
}
String strFilePathLoad1 = "D:\\Sample\\sub1.xdm";
String strFilePathLoad2 = "D:\\Sample\\sub2.xdm";
String strFilePathLoad3 = "D:\\Sample\\sub3.xdm";
XRSLoadFile[] xrsFileInput = new XRSLoadFile[3];
xrsFileInput[0] = RasterIO.LoadFile(strFilePathLoad1, out strError, false, eIOCreateXLDMode.All_NoMsg);
xrsFileInput[1] = RasterIO.LoadFile(strFilePathLoad2, out strError, false, eIOCreateXLDMode.All_NoMsg);
xrsFileInput[2] = RasterIO.LoadFile(strFilePathLoad3, out strError, false, eIOCreateXLDMode.All_NoMsg);
XBandParamMosaic InputParam = new XBandParamMosaic();
InputParam.BlankValue = 0.0;
InputParam.PixelSizeX = XDataRange.MAX_REAL64;
InputParam.PixelSizeY = XDataRange.MAX_REAL64;
for (int i = 0; i < 3; i++)
{
XMosaicBandInfo bandInfo = new XMosaicBandInfo();
bandInfo.SrcBand = xrsFileInput[i].GetBandAt(0);
bandInfo.offsetX = 0.0;
bandInfo.offsetY = 0.0;
bandInfo.TransparentValue = 0.0;
if (InputParam.PixelSizeX > bandInfo.SrcBand.XPixelSize) InputParam.PixelSizeX = bandInfo.SrcBand.XPixelSize;
if (InputParam.PixelSizeY > bandInfo.SrcBand.YPixelSize) InputParam.PixelSizeY = bandInfo.SrcBand.YPixelSize;
InputParam.ArrBandInfo.Add(bandInfo);
}
XDMbandMosaic bandProcess = new XDMBandMosaic();
bandProcess.SetInputParam(ref InputParam);
bandProcess.BandName = "Mosaic_Result";
bandProcess.SR = xrsFileInput[0].GetBandAt(0).SR;
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandProcess;
fileSave.AddBand(ref bandCast);
XThread thd = null;
String strFilePathSave = "D:\\Sample\\Out_Mosaic.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
return;
}
See Also