Exemplo n.º 1
0
 public void Bind(object pArgument)
 {
     if (pArgument is kdaFunctionArguments)
     {
         kdaFunctionArguments arg = (kdaFunctionArguments)pArgument;
         inrsBandsCoef = arg.InRasterCoefficients;
         kda           = arg.KDAModel;
         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 calcKdaFunction(object inRaster, Statistics.dataPrepDiscriminantAnalysis kda)
 {
     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.kdaFunctionDataset();
     FunctionRasters.kdaFunctionArguments args = new FunctionRasters.kdaFunctionArguments(this);
     args.InRasterCoefficients = rRst;
     args.KDAModel = kda;
     frDset.Init(rsFunc, args);
     return frDset;
 }