Example #1
0
 /// <summary> Loads an option configuration file's contents into the <seealso cref="OptionsConfiguration"/>. </summary>
 /// <param name="file"> The file to load. </param>
 public void LoadFile(OptionsConfigurationFile file)
 {
     this.FastPyramid       = file.FastPyramid;
     this.FlowFilterType    = file.FlowFilterType;
     this.Iterations        = file.Iterations.ToString();
     this.KeepAudio         = file.KeepAudio;
     this.KeepSubregions    = file.KeepSubregions;
     this.Levels            = file.Levels.ToString();
     this.LockAspectRatio   = file.LockAspectRatio;
     this.LosslessQuality   = file.LosslessQuality;
     this.PixelNeighborhood = file.PixelNeighborhood.ToString();
     this.PlaybackRate      = file.PlaybackRate;
     this.PyramidScale      = file.PyramidScale.ToString();
     this.SmoothDerivativeStandardDeviation = file.SmoothDerivativeStandardDeviation.ToString();
     this.SmoothMotion = file.SmoothMotion;
     this.WindowSize   = file.WindowSize.ToString();
 }
Example #2
0
        /// <summary> Converts this object to a <seealso cref="OptionsConfigurationFile"/>. </summary>
        /// <returns> This object as an OptionsConfigurationFile. </returns>
        public OptionsConfigurationFile ToFile()
        {
            var file = new OptionsConfigurationFile()
            {
                FastPyramid       = this.fastPyramid,
                FlowFilterType    = this.flowFilterType,
                Iterations        = this.iterations,
                KeepAudio         = this.keepAudio,
                KeepSubregions    = this.keepSubregions,
                Levels            = this.levels,
                LockAspectRatio   = this.lockAspectRatio,
                LosslessQuality   = this.losslessQuality,
                PixelNeighborhood = this.pixelNeighborhood,
                PlaybackRate      = this.playbackRate,
                PyramidScale      = this.pyramidScale,
                SmoothDerivativeStandardDeviation = this.smoothDerivativeStandardDeviation,
                SmoothMotion = this.smoothMotion,
                WindowSize   = this.windowSize
            };

            return(file);
        }