|
XDMBandMosaicLT Class
|
XDMBandMosaicLT 클래스는 여러 장의 영상을 모자이크하여 하나의 영상으로 생성한다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NRSEXAssembly: NXDLrsEx (in NXDLrsEx.dll) Version: 2.0.3.38
Syntaxpublic class XDMBandMosaicLT : XDMBand
The XDMBandMosaicLT type exposes the following members.
Constructors
Methods
Example
This is example C# : 여러 장의 영상을 모자이크하는 예제
XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
return;
}
String strFilePathLoad1 = @"E:\SampleImage\mosaic\001.xdm";
String strFilePathLoad2 = @"E:\SampleImage\mosaic\002.xdm";
XRSLoadFile xrsFileInput1 = RasterIO.LoadFile(strFilePathLoad1, out strError, false, eIOCreateXLDMode.All_NoMsg);
XRSLoadFile xrsFileInput2 = RasterIO.LoadFile(strFilePathLoad2, out strError, false, eIOCreateXLDMode.All_NoMsg);
XBandParamMosaicLT inputParam = new XBandParamMosaicLT();
XDMBandMosaicLT bandMosaic = new XDMBandMosaicLT();
BandInfoLT info = new BandInfoLT();
info.SrcBand = xrsFileInput1.GetBandAt(0);
info.HistoMethod = eMosaicHisto.None;
info.Transparent = 0.0;
inputParam.ArrBandInfo.Add(info);
info = new BandInfoLT();
info.SrcBand = xrsFileInput2.GetBandAt(0);
info.HistoMethod = eMosaicHisto.None;
info.Transparent = 0.0;
inputParam.ArrBandInfo.Add(info);
inputParam.PixelSizeX = info.SrcBand.XPixelSize;
inputParam.PixelSizeY = info.SrcBand.YPixelSize;
inputParam.BlankValue = 0.0;
inputParam.ResampleMethod = eResampleMethod.Nearest;
if (!bandMosaic.SetInputParam(ref inputParam))
{
MessageBox.Show("false");
return;
}
bandMosaic.SR = xrsFileInput1.SR;
XRSSaveFile fileSave = new XRSSaveFile();
XDMBand bandCast = (XDMBand)bandMosaic;
fileSave.AddBand(ref bandCast);
XThread thd = null;
String strFilePathSave = @"E:\SampleImage\mosaic\MosaicResult.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
MessageBox.Show(strError);
return;
}
See Also