public void Bind(object pArgument) { if (pArgument is PixelBlockToRasterFunctionArguments) { PixelBlockToRasterFunctionArguments args = (PixelBlockToRasterFunctionArguments)pArgument; inrs = args.InRaster; vPb = (IPixelBlock3)args.ValuePixelBlock; tlLoc = args.TopLeft; myFunctionHelper.Bind(inrs); myRasterInfo = myFunctionHelper.RasterInfo; myPixeltype = myRasterInfo.PixelType; myValidFlag = true; } else { throw new System.Exception("Incorrect arguments object. Expected: PixelBlockToRasterArguments"); } }
public IFunctionRasterDataset PixelBlockToRaster(IPixelBlock ValuePb,IPnt TopLeft,object inRasterObject) { IFunctionRasterDataset rRst = createIdentityRaster(inRasterObject); string tempAr = funcDir + "\\" + FuncCnt + ".afr"; IFunctionRasterDataset frDset = new FunctionRasterDatasetClass(); IFunctionRasterDatasetName frDsetName = new FunctionRasterDatasetNameClass(); frDsetName.FullName = tempAr; frDset.FullName = (IName)frDsetName; IRasterFunction rsFunc = new FunctionRasters.PixelBlockToRasterFunctionDataset(); FunctionRasters.PixelBlockToRasterFunctionArguments args = new FunctionRasters.PixelBlockToRasterFunctionArguments(this); args.ValuePixelBlock = ValuePb; args.ValueRaster = rRst; args.TopLeft = TopLeft; frDset.Init(rsFunc, args); return frDset; }