![]() |
XDMBand
|
public class XDMBandRiverDetect : XDMBand
The XDMBandRiverDetect type exposes the following members.
Name | Description | |
---|---|---|
![]() | XDMBandRiverDetect | XDMBandRiverDetect 클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다. |
Name | Description | |
---|---|---|
![]() | Detect | 특정 레벨로 영상을 읽어 수역 탐지를 위한 통계 계산 및 region 계산을 수행한다. |
![]() | GetInputParam | XDMBandRiverDetect처리를 위한 파라미터를 얻는다. |
![]() | SetInputParam | XDMBandRiverDetect처리를 위한 입력 파라미터 설정. |
// IO initialize to load image file XRasterIO RasterIO = new XRasterIO(); String strError = ""; if (RasterIO.Initialize(out strError) == false) { return; } //////// Create NDWI Band // Image load String strFilePathLoad = @"D:\Sample\RS_Sample\Kompsat3_NDWI\Kompsat3_NDWI.xdm"; XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg); //////// Create RiverDetect Band XBandParamRiverDetect InputParam = new XBandParamRiverDetect(); InputParam.SrcNDWIBand = xrsFileInput.GetBandAt(0); // Create New process band and set input param XDMBandRiverDetect bandProcess = new XDMBandRiverDetect(); bandProcess.BandName = xrsFileInput.FileName; bandProcess.SetInputParam(ref InputParam); if (!bandProcess.Detect(0, null)) { Console.WriteLine("Fail"); return; } // create XRSSaveFile to save realtime band(XDMBandXXXX) // load another file to protect thread lock(it is stable and faster). XRSSaveFile fileSave = new XRSSaveFile(); XDMBand bandCast = (XDMBand)bandProcess; fileSave.AddBand(ref bandCast); // Save output file XThread thd = null; String strFilePathSave = "D:\\Sample\\Out_RiverDetect.xdm"; if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd)) { return; }