コード例 #1
0
ファイル: Manager.cs プロジェクト: lgatto/proteowizard
		public ManagedDataSource( SpectrumSource source )
		{
			this.source = source;

            chromatogramListForm = new ChromatogramListForm();
            chromatogramListForm.Text = source.Name + " chromatograms";
            chromatogramListForm.TabText = source.Name + " chromatograms";
            chromatogramListForm.ShowIcon = false;

            CVID nativeIdFormat = CVID.MS_scan_number_only_nativeID_format;
            foreach (SourceFile f in source.MSDataFile.fileDescription.sourceFiles)
            {
                // the first one in the list isn't necessarily useful - could be Agilent MSCalibration.bin or the like
                nativeIdFormat = f.cvParamChild(CVID.MS_native_spectrum_identifier_format).cvid;
                if (CVID.MS_no_nativeID_format != nativeIdFormat)
                    break;
            }
            spectrumListForm = new SpectrumListForm( nativeIdFormat );
            spectrumListForm.Text = source.Name + " spectra";
            spectrumListForm.TabText = source.Name + " spectra";
            spectrumListForm.ShowIcon = false;

            spectrumDataProcessing = new DataProcessing();
            //chromatogramDataProcessing = new DataProcessing();
			//graphInfoMap = new GraphInfoMap();
		}
コード例 #2
0
 internal SetInputFileCompletedEventArgs(SpectrumSource dataSource)
 {
     this.dataSource = dataSource;
 }
コード例 #3
0
        private void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            if (listView.SelectedItems.Count > 1)
            {
                List <string> dataSourceList = new List <string>();
                foreach (ListViewItem item in listView.SelectedItems)
                {
                    if (item.SubItems[1].Text != "File Folder")
                    {
                        dataSourceList.Add(String.Format("\"{0}\"", item.SubItems[0].Text));
                    }
                }
                sourcePathTextBox.Text = String.Join(" ", dataSourceList.ToArray());

                ticGraphControl.GraphPane.GraphObjList.Clear();
                ticGraphControl.GraphPane.CurveList.Clear();
                ticGraphControl.Visible = false;
            }
            else if (listView.SelectedItems.Count > 0)
            {
                sourcePathTextBox.Text = listView.SelectedItems[0].SubItems[0].Text;

                ticGraphControl.GraphPane.GraphObjList.Clear();
                ticGraphControl.GraphPane.CurveList.Clear();

                string sourcePath = Path.Combine(CurrentDirectory, sourcePathTextBox.Text);
                string sourceType = getSourceType(sourcePath);
                if (!String.IsNullOrEmpty(sourceType) &&
                    sourceType != "File Folder")
                {
                    using (MSData msd = new MSData())
                    {
                        ReaderList.FullReaderList.read(sourcePath, msd, 0, SpectrumSource.GetReaderConfig());
                        using (ChromatogramList cl = msd.run.chromatogramList)
                        {
                            if (cl != null && !cl.empty() && cl.find("TIC") != cl.size())
                            {
                                ticGraphControl.Visible = true;
                                pwiz.CLI.msdata.Chromatogram tic = cl.chromatogram(cl.find("TIC"), true);
                                Map <double, double>         sortedFullPointList = new Map <double, double>();
                                IList <double> timeList      = tic.binaryDataArrays[0].data;
                                IList <double> intensityList = tic.binaryDataArrays[1].data;
                                int            arrayLength   = timeList.Count;
                                for (int i = 0; i < arrayLength; ++i)
                                {
                                    sortedFullPointList[timeList[i]] = intensityList[i];
                                }
                                ZedGraph.PointPairList points = new ZedGraph.PointPairList(
                                    new List <double>(sortedFullPointList.Keys).ToArray(),
                                    new List <double>(sortedFullPointList.Values).ToArray());
                                ZedGraph.LineItem item = ticGraphControl.GraphPane.AddCurve("TIC", points, Color.Black, ZedGraph.SymbolType.None);
                                item.Line.IsAntiAlias = true;
                                ticGraphControl.AxisChange();
                                ticGraphControl.Refresh();
                            }
                            else
                            {
                                ticGraphControl.Visible = false;
                            }
                        }
                    }
                }
                else
                {
                    ticGraphControl.Visible = false;
                }
            }
            else
            {
                sourcePathTextBox.Text = "";
            }
        }
コード例 #4
0
ファイル: DataSource.cs プロジェクト: lgatto/proteowizard
		internal SetInputFileCompletedEventArgs( SpectrumSource dataSource )
		{
			this.dataSource = dataSource;
		}
コード例 #5
0
ファイル: Manager.cs プロジェクト: hap-adong/SeeMS
        public ManagedDataSource( SpectrumSource source )
        {
            this.source = source;

            chromatogramListForm = new ChromatogramListForm();
            chromatogramListForm.Text = source.Name + " chromatograms";
            chromatogramListForm.TabText = source.Name + " chromatograms";
            chromatogramListForm.ShowIcon = false;

            CVID nativeIdFormat = source.MSDataFile.fileDescription.sourceFiles[0].cvParamChild( CVID.MS_native_spectrum_identifier_format ).cvid;
            spectrumListForm = new SpectrumListForm( nativeIdFormat );
            spectrumListForm.Text = source.Name + " spectra";
            spectrumListForm.TabText = source.Name + " spectra";
            spectrumListForm.ShowIcon = false;

            spectrumDataProcessing = new DataProcessing();
            //chromatogramDataProcessing = new DataProcessing();
            //graphInfoMap = new GraphInfoMap();
        }