public void Bind(object pArgument) { if (pArgument is LocalRescaleFunctionArguments) { LocalRescaleFunctionArguments arg = (LocalRescaleFunctionArguments)pArgument; inrsBands = arg.InRaster; bndCnt = inrsBands.RasterInfo.BandCount; bndCntf = System.Convert.ToSingle(bndCnt - 1); myFunctionHelper.Bind(inrsBands); myRasterInfo = myFunctionHelper.RasterInfo; myPixeltype = myRasterInfo.PixelType; myValidFlag = true; } else { throw new System.Exception("Incorrect arguments object. Expected: LocalFunctionArguments"); } }
public IFunctionRasterDataset localRescalefunction(object inRaster, rasterUtil.localRescaleType op) { string tempAr = funcDir + "\\" + FuncCnt + ".afr"; IFunctionRasterDataset frDset = new FunctionRasterDatasetClass(); IFunctionRasterDatasetName frDsetName = new FunctionRasterDatasetNameClass(); frDsetName.FullName = tempAr; frDset.FullName = (IName)frDsetName; IRasterFunction rsFunc = null; switch (op) { case localRescaleType.PrcTile: rsFunc = new FunctionRasters.localPrctileDataset(); break; default: break; } FunctionRasters.LocalRescaleFunctionArguments args = new FunctionRasters.LocalRescaleFunctionArguments(this); IFunctionRasterDataset inRs = createIdentityRaster(inRaster); args.InRaster = inRs; frDset.Init(rsFunc, args); return frDset; }