예제 #1
0
        private void featureExplanationWindow_Click(object sender, RoutedEventArgs e)
        {
            if (windowFeatureExplanations != null)
            {
                windowFeatureExplanations.deactiveExplainationButton();
            }

            if (AnnoTier.Selected == null)
            {
                MessageBox.Show("Select annotation track first");
                return;
            }

            string test = SignalTrackStatic.Selected.Signal.FilePath;

            windowFeatureExplanations = new FeatureExplanationWindow(SignalTrackStatic.Selected.Signal.FilePath);


            try
            {
                int          frame  = FileTools.FormatFramesInteger(Time.CurrentPlayPosition, SignalTrackStatic.Selected.Signal.rate);
                List <float> sample = new List <float>();
                for (int d = 0; d < SignalTrackStatic.Selected.Signal.dim; d++)
                {
                    sample.Add(SignalTrackStatic.Selected.Signal.data[frame * SignalTrackStatic.Selected.Signal.dim + d]);
                }

                windowFeatureExplanations.featurestream = SignalTrackStatic.Selected.Signal.data;
                windowFeatureExplanations.sample        = sample;
                windowFeatureExplanations.dim           = SignalTrackStatic.Selected.Signal.dim;



                windowFeatureExplanations.Show();
            }
            catch
            {
            }
        }