XDMBandMosaicLT Class |
Namespace: Pixoneer.NXDL.NRSEX
public class XDMBandMosaicLT : XDMBand
The XDMBandMosaicLT type exposes the following members.
Name | Description | |
---|---|---|
XDMBandMosaicLT | XDMBandMosaicLT클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다. | |
XDMBandMosaicLT(XDMBandMosaicLT*) | XDMBandMosaicLT객체를 생성하는 생성자이다. 외부 XDMBandMosaicLT객체를 입력 받아 멤버 변수를 초기화한다. |
Name | Description | |
---|---|---|
GetBandTransparent | 모자이크를 수행할 영상 밴드의 transparent 값을 가져온다. | |
GetInputParam | 화소 추출을 위한 입력 파라미터를 얻는다. | |
RemoveMaskAllPolygons | 입력 밴드가 속해 있는 XRSLoadFile 과 관련된 마스킹을 위한 polygon 을 모두 삭제한다. | |
SetBandTransparent | 모자이크를 수행할 영상 밴드의 transparent 값을 설정. | |
SetInputParam | 화소 추출을 위한 입력 파라미터를 설정. | |
SetMaskPolygon | 입력 밴드가 속해 있는 XRSLoadFile 과 관련된 마스킹을 위한 polygon 을 설정한다. | |
SetMaskPolygonMode | 입력 밴드가 속해 있는 XRSLoadFile 과 관련된 폴리곤의 영상 마스킹 모드를 설정한다. |
// IO initialize to load image file XRasterIO RasterIO = new XRasterIO(); String strError = ""; if (RasterIO.Initialize(out strError) == false) { return; } // Image load 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); // Set input param XBandParamMosaicLT inputParam = new XBandParamMosaicLT(); XDMBandMosaicLT bandMosaic = new XDMBandMosaicLT(); // Create Mosaic Parameter Info BandInfoLT info = new BandInfoLT(); info.SrcBand = xrsFileInput1.GetBandAt(0); info.HistoMethod = eMosaicHisto.None; info.Transparent = 0.0; //info.HistoCovariance = 0.5; // info.HistoMethod 가 Mean_StdDev, Hue_Adjustment 일 경우 값 설정 필요 //info.HistoMaxMain = 0.2; //info.HistoMaxSub = 0.1; //info.HistoMeanMain = 0.05; //info.HistoMeanSub = 0.01; //info.HistoMinMain = 0.7; //info.HistoMinSub = 0.08; //info.HistoVariance = 0.001; inputParam.ArrBandInfo.Add(info); info = new BandInfoLT(); info.SrcBand = xrsFileInput2.GetBandAt(0); info.HistoMethod = eMosaicHisto.None; info.Transparent = 0.0; //info.HistoCovariance = 0.5; // info.HistoMethod 가 Mean_StdDev, Hue_Adjustment 일 경우 값 설정 필요 //info.HistoMaxMain = 0.2; //info.HistoMaxSub = 0.1; //info.HistoMeanMain = 0.05; //info.HistoMeanSub = 0.01; //info.HistoMinMain = 0.7; //info.HistoMinSub = 0.08; //info.HistoVariance = 0.001; inputParam.ArrBandInfo.Add(info); // set Mosaic Input Parameter inputParam.PixelSizeX = info.SrcBand.XPixelSize; // 출력 해상도 설정 inputParam.PixelSizeY = info.SrcBand.YPixelSize; inputParam.BlankValue = 0.0; // 모자이크 결과 빈 공간에 0값으로 채움 inputParam.ResampleMethod = eResampleMethod.Nearest; if (!bandMosaic.SetInputParam(ref inputParam)) { MessageBox.Show("false"); return; } bandMosaic.SR = xrsFileInput1.SR; // create output file XRSSaveFile fileSave = new XRSSaveFile(); XDMBand bandCast = (XDMBand)bandMosaic; fileSave.AddBand(ref bandCast); // Save output file XThread thd = null; String strFilePathSave = @"E:\SampleImage\mosaic\MosaicResult.xdm"; if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd)) { MessageBox.Show(strError); return; }