Пример #1
0
 public static void WholeApplyFilter(float[] filter)
 {
     Parallel.For(0, numberOfSonograms, k =>
     {
         for (int i = 0; i < numberOfTraces; i++)
         {
             tracesData[k * numberOfTraces + i].data = FuncProc.ApplyFilter(tracesData[k * numberOfTraces + i].data, filter);
         }
     });
     DeconvolveAllTraces();
     RefreshSlicesData();
 }
Пример #2
0
        private void фВЧToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            string input;

            input = Interaction.InputBox("Введите частоту среза", "ФВЧ построчно", "");
            double fcut;

            if (!Double.TryParse(input, out fcut))
            {
                fcut = 0;
            }
            if (fcut > 0)
            {
                input = Interaction.InputBox("Введите m", "ФВЧ построчно", "");
                int m;
                if (!Int32.TryParse(input, out m))
                {
                    m = 32;
                }

                var filter = FuncProc.Hpf((float)fcut, m);

                var modalFuncs1 = new TrendModal(FuncProc.GetDiscreteSpectre(filter));
                modalFuncs1.Show();


                var msgBoxResult = Interaction.MsgBox("На все данные?", MsgBoxStyle.YesNo);
                switch (msgBoxResult)
                {
                case MsgBoxResult.Yes:
                    Data.WholeApplyFilter(filter);
                    LoadNewSlice();
                    break;

                case MsgBoxResult.No:
                    data = FuncProc.ApplyFilter(data, filter);
                    break;
                }
                DrawImage();
            }
        }