Exemplo n.º 1
0
        /// <summary>
        /// Load the contents of the wiff file specified by <paramref name="filePath"/>
        /// </summary>
        /// <param name="filePath">A <see cref="string"/> containing the full qualified path to the wiff file.</param>
        /// <returns>A <see cref="ISpecFileContent"/> reference to a object containing the loaded data.</returns>
        public ISpecFileContent Load(string filePath)
        {
            Document document = new Document();

            document.FileName     = filePath;
            document.DocumentName = Path.GetFileNameWithoutExtension(filePath);
            WiffFileContent wiffContent = new WiffFileContent(document, filePath);

            if (!wiffContent.LoadContent())
            {
                document = null;
                return(null);
            }

            document.Content = wiffContent;
            return(wiffContent);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Load the contents of the wiff file specified by <paramref name="filePath"/>
        /// </summary>
        /// <param name="filePath">A <see cref="string"/> containing the full qualified path to the wiff file.</param>
        /// <returns>A <see cref="ISpecFileContent"/> reference to a object containing the loaded data.</returns>
        public ISpecFileContent Load(string filePath)
        {
            var document = new Document
            {
                FileName = filePath, DocumentName = Path.GetFileNameWithoutExtension(filePath)
            };

            var wiffContent = new WiffFileContent(document, filePath);

            if (!wiffContent.LoadContent())
            {
                return(null);
            }

            document.Content = wiffContent;
            return(wiffContent);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="wiffFile">A <see cref="FMANWiffFileClass"/> instance. The source from where to
        /// read the samples properties and data.</param>
        /// <param name="wiffFileContent">The <see cref="WiffFileContent"/> instance this sample belongs to.</param>
        /// <param name="sampleIndex">A <see cref="int"/> value specifying the <b>one-based</b>index of this sample in the <paramref name="wiffFile"/>.</param>
        /// <remarks>Please take note, that the the counting of samples in the wiff file start with 1( in contrary to most ather indexes).</remarks>
        public WiffSample(FMANWiffFileClass wiffFile, WiffFileContent wiffFileContent, int sampleIndex)
        {
            if (wiffFile == null)
            {
                throw new ArgumentNullException("wiffFile");
            }

            if (wiffFileContent == null)
            {
                throw new ArgumentNullException("wiffFileContent");
            }

            if (sampleIndex < 0)
            {
                throw new ArgumentOutOfRangeException("sampleIndex");
            }

            index = sampleIndex;
            this.wiffFileContent = wiffFileContent;

            Initialize(wiffFile);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WiffSample"/> class.
        /// Constructor
        /// </summary>
        /// <param name="wiffFile"> The source from where to read the samples properties and data </param>
        /// <param name="wiffFileContent"> instance this sample belongs to </param>
        /// <param name="sampleIndex"> value specifying the <b>one-based</b>index of this sample in the  </param>
        /// <param name="maldiparamstr"> String that contains the Maldi Parameters </param>
        public WiffSample(Batch wiffFile, WiffFileContent wiffFileContent, int sampleIndex, string maldiparamstr)
        {
            if (wiffFile == null)
            {
                throw new ArgumentNullException("wiffFile");
            }

            if (wiffFileContent == null)
            {
                throw new ArgumentNullException("wiffFileContent");
            }

            if (sampleIndex < 0)
            {
                throw new ArgumentOutOfRangeException("sampleIndex");
            }

            this.maldiparametersstring = maldiparamstr;
            this.index           = sampleIndex;
            this.wiffFileContent = wiffFileContent;

            this.Initialize(wiffFile);
        }