Esempio n. 1
0
 public void Bind(object pArgument)
 {
     if (pArgument is pcaArguments)
     {
         pcaArguments arg = (pcaArguments)pArgument;
         inrsBandsCoef = arg.InRasterCoefficients;
         outrs         = arg.OutRaster;
         pca           = arg.PCA;
         myFunctionHelper.Bind(outrs);
         myFunctionHelperCoef.Bind(inrsBandsCoef);
         myRasterInfo = myFunctionHelper.RasterInfo;
         myPixeltype  = myRasterInfo.PixelType;
         myValidFlag  = true;
     }
     else
     {
         throw new System.Exception("Incorrect arguments object. Expected: pcaFunctionArguments");
     }
 }
 public IFunctionRasterDataset calcPrincipleComponentsFunction(object inRaster, Statistics.dataPrepPrincipleComponents pca)
 {
     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.pcaDataset();
     FunctionRasters.pcaArguments args = new FunctionRasters.pcaArguments(this);
     args.InRasterCoefficients = rRst;
     args.PCA = pca;
     frDset.Init(rsFunc, args);
     return frDset;
 }