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

首頁 > 編程 > C# > 正文

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

2019-10-29 21:14:05
字體:
來源:轉載
供稿:網友

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);       }}

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

 

注:相關教程知識閱讀請移步到c#教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 武山县| 桐乡市| 兴海县| 谢通门县| 石门县| 崇文区| 永顺县| 剑川县| 伊川县| 丹江口市| 长乐市| 上栗县| 偃师市| 长垣县| 西吉县| 兰西县| 互助| 平度市| 秦皇岛市| 册亨县| 佛冈县| 罗平县| 邯郸县| 新河县| 洛川县| 平南县| 梨树县| 曲松县| 闵行区| 张家口市| 疏附县| 临海市| 布拖县| 通辽市| 图们市| 怀来县| 延安市| 津南区| 鹰潭市| 通渭县| 万荣县|