最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

C# 利用IRawPixels接口遍歷柵格數(shù)據(jù)

 更新時(shí)間:2017年02月10日 11:22:49   作者:杰桀  
本文主要介紹了利用IRawPixels接口遍歷柵格數(shù)據(jù)。具有很好的參考價(jià)值,下面跟著小編一起來看下吧

AO的版本為10.2,開發(fā)的語(yǔ)言是C#。柵格數(shù)據(jù)來源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);     
  }
}

以上就是本文的全部?jī)?nèi)容,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來一定的幫助,同時(shí)也希望多多支持腳本之家!

相關(guān)文章

最新評(píng)論

塘沽区| 西吉县| 普兰店市| 临清市| 鹤山市| 修水县| 竹溪县| 湖南省| 宁远县| 阿克| 铜梁县| 乡城县| 静安区| 东兴市| 武安市| 顺平县| 中宁县| 通海县| 宁波市| 海盐县| 凤阳县| 黄梅县| 泸定县| 白银市| 伊川县| 乌什县| 临泽县| 纳雍县| 黄骅市| 白河县| 兴安县| 邹城市| 旬邑县| 石门县| 天台县| 和政县| 纳雍县| 永济市| 阳新县| 台东县| 永泰县|