![]() | XDMBandMosaic Class |
Namespace: Pixoneer.NXDL.NRS
public class XDMBandMosaic : XDMBand
The XDMBandMosaic type exposes the following members.
Name | Description | |
---|---|---|
![]() | XDMBandMosaic | XDMBandMosaic 클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다. |
Name | Description | |
---|---|---|
![]() | GetInputParam | 모자이크를 위한 입력 매개변수를 가져온다. |
![]() | SetInputParam | 모자이크를 위한 입력 매개변수를 설정한다. |
using Pixoneer.NXDL; using Pixoneer.NXDL.NRS; using Pixoneer.NXDL.NIO; // IO initialize to load image file XRasterIO RasterIO = new XRasterIO(); String strError = ""; if (RasterIO.Initialize(out strError) == false) { return; } // Image load 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); // Set input param 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); } // Create New process band and set input param 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); // Save output file XThread thd = null; String strFilePathSave = "D:\\Sample\\Out_Mosaic.xdm"; if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd)) { return; }