Ejemplo n.º 1
0
 public void Bind(object pArgument)
 {
     if (pArgument is pairedttestFunctionArguments)
     {
         pairedttestFunctionArguments arg = (pairedttestFunctionArguments)pArgument;
         inrsBandsCoef = arg.InRasterCoefficients;
         outrs         = arg.OutRaster;
         //Console.WriteLine("Number of Bands in outrs = " + ((IRasterBandCollection)outrs).Count.ToString());
         tDic = arg.TTestDictionary;
         IRasterProps rsProp = (IRasterProps)outrs;
         myFunctionHelper.Bind(outrs);
         myFunctionHelperCoef.Bind(inrsBandsCoef);
         myRasterInfo = myFunctionHelper.RasterInfo;
         myPixeltype  = myRasterInfo.PixelType;
         myValidFlag  = true;
     }
     else
     {
         throw new System.Exception("Incorrect arguments object. Expected: plrFunctionArguments");
     }
 }
 public IFunctionRasterDataset calcPairedTTestFunction(object inRaster, Statistics.dataPrepPairedTTest pairedttest)
 {
     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.pairedttestFunctionDataset();
     FunctionRasters.pairedttestFunctionArguments args = new FunctionRasters.pairedttestFunctionArguments(this);
     args.InRasterCoefficients = rRst;
     args.TTestModel = pairedttest;
     frDset.Init(rsFunc, args);
     return frDset;
 }