Example #1
0
        /// <summary>
        /// Gets the preprocessing method choosen.
        /// </summary>
        /// <returns>The preprocessing method.</returns>
        ISpectralPreprocessor GetPreprocessingMethod()
        {
            ISpectralPreprocessor result;

            switch (_method)
            {
            default:
            case SpectralPreprocessingMethod.None:
                result = new NoSpectralCorrection();
                break;

            case SpectralPreprocessingMethod.MultiplicativeScatteringCorrection:
                result = new MultiplicativeScatterCorrection();
                break;

            case SpectralPreprocessingMethod.StandardNormalVariate:
                result = new StandardNormalVariateCorrection();
                break;

            case SpectralPreprocessingMethod.FirstDerivative:
                result = new SavitzkyGolayCorrection(7, 1, 2);
                break;

            case SpectralPreprocessingMethod.SecondDerivative:
                result = new SavitzkyGolayCorrection(11, 2, 3);
                break;
            }
            return(result);
        }
 /// <summary>
 /// Gets the preprocessing method choosen.
 /// </summary>
 /// <returns>The preprocessing method.</returns>
 ISpectralPreprocessor GetPreprocessingMethod()
 {
   ISpectralPreprocessor result;
   switch(_method)
   {
     default:
     case SpectralPreprocessingMethod.None:
       result = new NoSpectralCorrection();
       break;
     case SpectralPreprocessingMethod.MultiplicativeScatteringCorrection:
       result = new MultiplicativeScatterCorrection();
       break;
     case SpectralPreprocessingMethod.StandardNormalVariate:
       result = new StandardNormalVariateCorrection();
       break;
     case SpectralPreprocessingMethod.FirstDerivative:
       result = new SavitzkyGolayCorrection(7,1,2);
       break;
     case SpectralPreprocessingMethod.SecondDerivative:
       result = new SavitzkyGolayCorrection(11,2,3);
       break;
   }
   return result;
 }