public void Bind(object pArgument) { if (pArgument is clusterFunctionArguments) { clusterFunctionArguments arg = (clusterFunctionArguments)pArgument; inrsBandsCoef = arg.InRasterCoefficients; outrs = arg.OutRaster; //Console.WriteLine("Number of Bands in outrs = " + ((IRasterBandCollection)outrs).Count.ToString()); cluster = (Statistics.dataPrepClusterGaussian)arg.ClusterModel; myFunctionHelper.Bind(outrs); myFunctionHelperCoef.Bind(inrsBandsCoef); myRasterInfo = myFunctionHelper.RasterInfo; myPixeltype = myRasterInfo.PixelType; myValidFlag = true; } else { throw new System.Exception("Incorrect arguments object. Expected: plrFunctionArguments"); } }