コード例 #1
0
 public void Bind(object pArgument)
 {
     if (pArgument is meanShiftFunctionArguments)
     {
         meanShiftFunctionArguments args = (meanShiftFunctionArguments)pArgument;
         inrs   = args.InRaster;
         radius = args.Radius;
         valrs  = args.ValueRaster;
         myFunctionHelper.Bind(inrs);
         myFunctionHelper2.Bind(valrs);
         myRasterInfo = myFunctionHelper.RasterInfo;
         myPixeltype  = myRasterInfo.PixelType;
         myValidFlag  = true;
     }
     else
     {
         throw new System.Exception("Incorrect arguments object. Expected: meanShiftArguments");
     }
 }
 public IFunctionRasterDataset createMeanShiftFuction(object inRaster, int minCells)
 {
     IFunctionRasterDataset rRst = createIdentityRaster(inRaster);
     string tempAr = funcDir + "\\" + FuncCnt + ".afr";
     IFunctionRasterDataset frDset = new FunctionRasterDatasetClass();
     IFunctionRasterDatasetName frDsetName = new FunctionRasterDatasetNameClass();
     frDsetName.FullName = tempAr;
     frDset.FullName = (IName)frDsetName;
     IRasterFunction rsFunc = new FunctionRasters.meanShiftFunctionDataset();
     FunctionRasters.meanShiftFunctionArguments args = new FunctionRasters.meanShiftFunctionArguments(this);
     args.ValueRaster = rRst;
     args.MinCells = minCells;
     frDset.Init(rsFunc, args);
     return frDset;
 }