Exemplo n.º 1
0
        private void HandleLowPass(VibrationMessage message)
        {
            var result     = lpFilter.Filter(message.VData, message.SamplePoint, message.SampleFre);
            var upodateMsg = message.UpdateVData(result);

            foreach (var sub in _linkList)
            {
                sub.Tell(upodateMsg);
            }
        }
Exemplo n.º 2
0
 private void lowPassFilterButton_Click(object sender, EventArgs e)
 {
     if (otherFiltersInputImgBox.Image != null)
     {
         var inputBitmap             = new Bitmap(otherFiltersInputImgBox.Image);
         var LowPassFilterMaskClient = new LowPassFilter(inputBitmap,
                                                         Settings.Default.StoreAsColorWherePossible);
         otherFiltersOutputImgBox.Image = LowPassFilterMaskClient.Filter();
     }
 }
Exemplo n.º 3
0
 public double[] Filter(double[] input, int samplePoint, double sampleFre, double rpm)
 {
     if (FilterType == FilterType.BandPass)
     {
         return(BPFilter.Filter(input, samplePoint, sampleFre, rpm));
     }
     else if (FilterType == FilterType.HighPass)
     {
         return(HPFilter.Filter(input, samplePoint, sampleFre, rpm));
     }
     else if (FilterType == FilterType.LowPass)
     {
         return(LPFilter.Filter(input, samplePoint, sampleFre, rpm));
     }
     return(input);
 }