/// <summary>
        ///  特性分析中下拉框状态改变响应函数
        /// </summary>      
        private void featurecomboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selectedText = featurecomboBox1.SelectedItem.ToString();

            int index = arr_tar.IndexOf(selectedText);
            //int index =(int) selectedId;
            FeatureModel feature = new FeatureModel();
            Dictionary<String, double> featDicX;
            Dictionary<String, double> featDicY;

            if (scene == Scene.COMMAND)
            {

                featDicX = feature.getTimeAndSpaceFeatureX(command_listmix[index], 13);
                featDicY = feature.getTimeAndSpaceFeatureY(command_listmix[index], 13);

                fftList = feature.getFrequentFFTFeature(command_listmix[index]);
                ifftList = feature.getFrequentIFFTFeature(command_listmix[index]);
            }
            else
            {
                if (noiseFlag == NoiseEnum.NoNoise)
                    return;

                if (noiseFlag == NoiseEnum.GUASSIAN)
                {
                    featDicX = feature.getTimeAndSpaceFeatureX(guassianList_final[index], 13);
                    featDicY = feature.getTimeAndSpaceFeatureY(guassianList_final[index], 13);

                    //频率分析的轨迹点
                    fftList = feature.getFrequentFFTFeature(guassianList_final[index]);
                    ifftList = feature.getFrequentIFFTFeature(guassianList_final[index]);
                }
                else if (noiseFlag == NoiseEnum.POISSON)
                {
                    featDicX = feature.getTimeAndSpaceFeatureX(poissonList_final[index], 13);
                    featDicY = feature.getTimeAndSpaceFeatureY(poissonList_final[index], 13);

                    //频率分析
                    fftList = feature.getFrequentFFTFeature(poissonList_final[index]);
                    ifftList = feature.getFrequentIFFTFeature(poissonList_final[index]);
               }

            else
            {
                featDicX = feature.getTimeAndSpaceFeatureX(uniformList_final[index], 13);
                featDicY = feature.getTimeAndSpaceFeatureY(uniformList_final[index], 13);

                //频率分析
                fftList = feature.getFrequentFFTFeature(poissonList_final[index]);
                ifftList = feature.getFrequentIFFTFeature(poissonList_final[index]);
            }

            }
            String[] featName = new String[13];
            int i = 0;
            foreach (String key in featDicX.Keys)
            {
                featName[i++] = key;
            }

            featurelistView.BeginUpdate();

            featurelistView.Clear();
            ColumnHeader header1 = new ColumnHeader();
            header1.Text = " ";
            header1.Width = 85;
            ColumnHeader header2 = new ColumnHeader();
            header2.Text = "X";
            header2.Width = 90;
            ColumnHeader header3 = new ColumnHeader();
            header3.Text = "Y";
            header3.Width = 90;

            featurelistView.Columns.AddRange(new ColumnHeader[] { header1, header2, header3 });
            featurelistView.FullRowSelect = true;
            //listview 中添加数据
            //featurelistView.Items.Add(" ");
            featurelistView.Items.Add("算法");

            //listItem.SubItems.Add("数值分析");
            featurelistView.Items[0].SubItems.Add("数值分析");
            featurelistView.Items[0].SubItems.Add("数值分析");
            ListViewItem listItem = new ListViewItem();
            for (i = 0; i < 13; i++)
            {
                featurelistView.Items.Add("" + featName[i]);
                featurelistView.Items[i + 1].SubItems.Add("" + featDicX[featName[i]]);
                featurelistView.Items[i + 1].SubItems.Add("" + featDicY[featName[i]]);

            }
            //如果场景是声呐(主动)
            if (scene == Scene.ACT_SONAR)
            {
                featurelistView.Items.Add("探测距离");
                featurelistView.Items[++i].SubItems.Add(">40km");
                featurelistView.Items[i].SubItems.Add(">40km");

                featurelistView.Items.Add("方位");
                featurelistView.Items[++i].SubItems.Add("0~2*pi");
                featurelistView.Items[i].SubItems.Add("0~2*pi");
            }
            else if (scene == Scene.PAS_SONAR)   //声呐被动
            {
                featurelistView.Items.Add("探测距离");
                featurelistView.Items[++i].SubItems.Add("<20km");
                featurelistView.Items[i].SubItems.Add("<20km");

                featurelistView.Items.Add("方位");
                featurelistView.Items[++i].SubItems.Add("0~2*pi");
                featurelistView.Items[i].SubItems.Add("0~2*pi");
            }
            else if (scene == Scene.ELEC_VS)    //电子对抗
            {
                addfeature_to_listview(i);
            }

            featurelistView.View = System.Windows.Forms.View.Details;
            featurelistView.GridLines = true;
            featurelistView.EndUpdate();

            //弹出新窗口,绘制频率分析轨迹
            FrequencyForm frequentForm = new FrequencyForm();
            frequentForm.Show();
            frequentForm.draw_fft_trail(fftList, selectedText);
            frequentForm.draw_ifft_trail(ifftList, selectedText);
        }
Exemple #2
0
        private void featurecomboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int showIndex = featurecomboBox1.SelectedIndex;
            FeatureModel feature = new FeatureModel();
            if (showIndex == 0)
            {
                //当前选中了时域和空域特征分析
                Dictionary<String, double> featDic = feature.getTimeAndSpaceFeature(list,13);
                String[] featName = new String[13];
                int i = 0;
                foreach (String key in featDic.Keys)
                {
                    featName[i++] = key;
                }

                featurelistView.BeginUpdate();

                featurelistView.Clear();
                ColumnHeader header1 = new ColumnHeader();
                header1.Text = "算法";
                ColumnHeader header2 = new ColumnHeader();
                header2.Text = "数值分析";

                featurelistView.Columns.AddRange(new ColumnHeader[] { header1, header2 });
                featurelistView.FullRowSelect = true;
                //listview 中添加数据

                for (i = 0; i < 13; i++)
                {
                    featurelistView.Items.Add("" + featName[i]);
                    ListViewItem listItem = new ListViewItem();
                    listItem.SubItems.Add(""+featDic[featName[i]]);
                    featurelistView.Items[i].SubItems.Add("" + featDic[featName[i]]);

                }

                featurelistView.View = System.Windows.Forms.View.Details;
                featurelistView.GridLines = true;
                featurelistView.EndUpdate();

            }
            else if(showIndex == 1)
            {
                //当前选中了频域特征分析
               MessageBox.Show("频域特征分析未实现", "hints");
            }
        }
Exemple #3
0
        //特性分析中下拉框状态改变响应函数
        private void featurecomboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int showIndex = featurecomboBox1.SelectedIndex;
            FeatureModel feature = new FeatureModel();
            Dictionary<String, double> featDicX;
            Dictionary<String, double> featDicY;

            if (noiseFlag == NoiseEnum.NoNoise)
                return;
            if (showIndex == 0)
            {
                //当前选中了时域和空域特征分析(X)
                if (noiseFlag == NoiseEnum.GUASSIAN){
                    featDicX = feature.getTimeAndSpaceFeatureX(guassianList[0], 13);
                    featDicY = feature.getTimeAndSpaceFeatureY(guassianList[0], 13);
                }
                else if(noiseFlag == NoiseEnum.POISSON){
                    featDicX = feature.getTimeAndSpaceFeatureX(poissonList[0], 13);
                    featDicY = feature.getTimeAndSpaceFeatureY(uniformList[0], 13);
                }

                else{
                    featDicX = feature.getTimeAndSpaceFeatureX(uniformList[0], 13);
                    featDicY = feature.getTimeAndSpaceFeatureY(uniformList[0], 13);
                }

                String[] featName = new String[13];
                int i = 0;
                foreach (String key in featDicX.Keys)
                {
                    featName[i++] = key;
                }

                featurelistView.BeginUpdate();

                featurelistView.Clear();
                ColumnHeader header1 = new ColumnHeader();
                header1.Text = " ";
                header1.Width = 85;
                ColumnHeader header2 = new ColumnHeader();
                header2.Text = "X";
                header2.Width = 90;
                ColumnHeader header3 = new ColumnHeader();
                header3.Text = "Y";
                header3.Width = 90;

                featurelistView.Columns.AddRange(new ColumnHeader[] { header1, header2, header3 });
                featurelistView.FullRowSelect = true;
                //listview 中添加数据
                //featurelistView.Items.Add(" ");
                featurelistView.Items.Add("算法");

                //listItem.SubItems.Add("数值分析");
                featurelistView.Items[0].SubItems.Add("数值分析");
                featurelistView.Items[0].SubItems.Add("数值分析");
                ListViewItem listItem = new ListViewItem();
                for (i = 0; i < 13; i++)
                {
                    featurelistView.Items.Add("" + featName[i]);
                    //ListViewItem listItem = new ListViewItem();
                    //listItem.SubItems.Add(""+featDic[featName[i]]);
                    featurelistView.Items[i+1].SubItems.Add("" + featDicX[featName[i]]);
                    featurelistView.Items[i + 1].SubItems.Add("" + featDicY[featName[i]]);

                }

                featurelistView.View = System.Windows.Forms.View.Details;
                featurelistView.GridLines = true;
                featurelistView.EndUpdate();

            }
            else if (showIndex == 1)
            {
                //当前选中了时域和空域特征分析(Y)
            /*    if (noiseFlag == NoiseEnum.GUASSIAN)
                    featDic = feature.getTimeAndSpaceFeatureY(guassianList, 13);
                else if (noiseFlag == NoiseEnum.POISSON)
                    featDic = feature.getTimeAndSpaceFeatureY(poissonList, 13);
                else
                    featDic = feature.getTimeAndSpaceFeatureY(uniformList, 13);
                String[] featName = new String[13];
                int i = 0;
                foreach (String key in featDic.Keys)
                {
                    featName[i++] = key;
                }

                featurelistView.BeginUpdate();

                featurelistView.Clear();
                ColumnHeader header1 = new ColumnHeader();
                header1.Text = "算法";
                header1.Width = 95;
                ColumnHeader header2 = new ColumnHeader();
                header2.Text = "数值分析";
                header2.Width = 100;

                featurelistView.Columns.AddRange(new ColumnHeader[] { header1, header2 });
                featurelistView.FullRowSelect = true;
                //listview 中添加数据

                for (i = 0; i < 13; i++)
                {
                    featurelistView.Items.Add("" + featName[i]);
                    ListViewItem listItem = new ListViewItem();
                    listItem.SubItems.Add("" + featDic[featName[i]]);
                    featurelistView.Items[i].SubItems.Add("" + featDic[featName[i]]);

                }

                featurelistView.View = System.Windows.Forms.View.Details;
                featurelistView.GridLines = true;
                featurelistView.EndUpdate();
             */

            }
            else if(showIndex == 2)
            {
                //当前选中了频域特征分析
               MessageBox.Show("频域特征分析未实现", "hints");
            }
        }