国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > C# > 正文

C# 利用IRawPixels接口遍歷柵格數據

2020-01-24 00:46:25
字體:
來源:轉載
供稿:網友

AO的版本為10.2,開發的語言是C#。柵格數據來源IRasterDataset接口。

IRasterBandCollection pRasterBandCollection = pRasterDataset as IRasterBandCollection;IRasterBand pRasterBand = pRasterBandCollection.Item(0); IRaster pRaster = (pRasterDataset as IRasterDataset2).CreateFullRaster();IRawPixels pRawPixels = pRasterBand as IRawPixels;IRasterProps pRasterProps = pRasterBand as IRasterProps;int dHeight = pRasterProps.Height;int dWidth = pRasterProps.Width; IPnt pntSize = new PntClass();pntSize.SetCoords(dHeight, dWidth);IPnt pPixelBlockOrigin = new PntClass();pPixelBlockOrigin.SetCoords(0, 0);IPixelBlock pixelBlock = pRaster.CreatePixelBlock(pntSize);pRawPixels.Read(pPixelBlockOrigin, pixelBlock);System.Array arr = (System.Array)(pixelBlock as IPixelBlock3).get_PixelData(0);for (int i = 0; i < dHeight;i++ ) { for (int j = 0; j < dWidth; j++)  {   float number = 0;   float.TryParse(arr.GetValue(i,j).ToString(),out number);       }}

以上就是本文的全部內容,希望本文的內容對大家的學習或者工作能帶來一定的幫助,同時也希望多多支持武林網!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 英德市| 吕梁市| 吴桥县| 泗水县| 根河市| 太原市| 聂拉木县| 青岛市| 成武县| 钟山县| 松溪县| 屯门区| 杭州市| 嘉鱼县| 西盟| 乾安县| 五常市| 黔东| 即墨市| 逊克县| 乌拉特前旗| 榕江县| 专栏| 新安县| 株洲市| 库车县| 平远县| 常州市| 临沧市| 同江市| 兴山县| 堆龙德庆县| 海盐县| 夏邑县| 渝中区| 镇康县| 湘西| 栖霞市| 丹东市| 尼木县| 瓦房店市|