public void Bind(object pArgument) { if (pArgument is glmFunctionArguments) { glmFunctionArguments arg = (glmFunctionArguments)pArgument; inrsBandsCoef = arg.InRasterCoefficients; glm = arg.GlmModel; outrs = arg.OutRaster; myFunctionHelper.Bind(outrs); myFunctionHelperCoef.Bind(inrsBandsCoef); myRasterInfo = myFunctionHelper.RasterInfo; myPixeltype = myRasterInfo.PixelType; myValidFlag = true; } else { throw new System.Exception("Incorrect arguments object. Expected: regressionFunctionArguments"); } }
public IFunctionRasterDataset calcGlmFunction(object inRaster, Statistics.dataPrepGlm glm) { 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.glmFunctionDataset(); FunctionRasters.glmFunctionArguments args = new FunctionRasters.glmFunctionArguments(this); args.InRasterCoefficients = rRst; args.GlmModel = glm; frDset.Init(rsFunc, args); return frDset; }