private List<StandardImsPeak> FindPeaksBasedOnXIC(VoltageGroup voltageGroup, ExtractedIonChromatogram chromatogram, IImsTarget target)
{
if (this.Parameters.PeakDetectorSelection == PeakDetectorEnum.WaterShed)
{
// Find peaks using multidimensional peak finder.
List<IntensityPoint> intensityPoints = chromatogram.IntensityPoints;
List<FeatureBlob> featureBlobs = PeakFinding.FindPeakUsingWatershed(intensityPoints, this.smoother, this.Parameters.FeatureFilterLevel);
// Recapture the 2D peak using the 1D feature blob from multidimensional peak finder.
return featureBlobs.Select(featureBlob => new StandardImsPeak(featureBlob, this.uimfReader, voltageGroup, target.MassWithAdduct, this.Parameters.MzWindowHalfWidthInPpm)).ToList();
}
else if (this.Parameters.PeakDetectorSelection == PeakDetectorEnum.MASICPeakFinder)
{
// Find peaks using MASIC peak finder
List<IntensityPoint> intensityPoints = chromatogram.IntensityPoints;
IList<clsPeak> masicPeaks = PeakFinding.FindPeakUsingMasic(intensityPoints, this.NumberOfScans);
// Recapture the 2D peak using the 1D feature blob from multidimensional peak finder.
return masicPeaks.Select(peak => new StandardImsPeak(peak)).ToList();
}
else
{
throw new NotImplementedException(string.Format("{0} not supported", this.Parameters.PeakDetectorSelection));
}
}