diff --git a/butterflow-ui/AboutWindow.xaml.cs b/butterflow-ui/AboutWindow.xaml.cs
index 1fa547e..c8f14c4 100644
--- a/butterflow-ui/AboutWindow.xaml.cs
+++ b/butterflow-ui/AboutWindow.xaml.cs
@@ -20,6 +20,7 @@ namespace butterflow_ui
///
public partial class AboutWindow : Window
{
+ /// Default constructor.
public AboutWindow()
{
InitializeComponent();
diff --git a/butterflow-ui/OptionsConfiguration.cs b/butterflow-ui/OptionsConfiguration.cs
index b0fd3c6..d8d073d 100644
--- a/butterflow-ui/OptionsConfiguration.cs
+++ b/butterflow-ui/OptionsConfiguration.cs
@@ -15,12 +15,19 @@ namespace butterflow_ui
{
#region Members
+ /// The default pyramid scale setting.
private const decimal DEFAULT_PYRAMID_SCALE = 0.5m;
+ /// The default levels setting.
private const int DEFAULT_LEVELS = 3;
+ /// The default window size setting.
private const int DEFAULT_WINDOW_SIZE = 25;
+ /// The default iterations setting.
private const int DEFAULT_ITERATIONS = 3;
+ /// The default pixel neighborhood setting.
private const int DEFAULT_PIXEL_NEIGHBORHOOD = 5;
+ /// The default smooth derivative standard deviation setting.
private const decimal DEFAULT_SMOOTH_DERIVATIVE_STANDARD_DEVIATION = 1.1m;
+ /// The default flow filter type setting.
private const FlowFilterType DEFAULT_FLOW_FILTER_TYPE = FlowFilterType.box;
/// An input interpreter used for converting string values to numeric values.
@@ -29,24 +36,43 @@ namespace butterflow_ui
/// The aspect ratio used for calculating heights when the aspect ratio is locked.
private decimal aspectRatio = 0;
+ /// The playback rate.
private string playbackRate;
+ /// A value indicating whether or not to keep the original audio in the final video.
private bool keepAudio;
+ /// The width of the output video.
private int width;
+ /// The height of the output video.
private int height;
- private bool keepSubRegions;
+ /// A value indicating whether or not to render unspecified subregions.
+ private bool keepSubregions;
+ /// A value indicating whether or not to render the final video with lossless quality.
private bool losslessQuality;
+ /// A value indicating whether or not to tune processing for smooth motion.
private bool smoothMotion;
+ /// A value indicating whether or not to lock the aspect ratio to the of the video.
private bool lockAspectRatio;
+ /// The video input file.
private string videoInput;
+ /// The video output file.
private string videoOutput;
+ /// A value indicating whether or not to use fast pyramids when processing a video.
private bool fastPyramid;
+ /// The pyramid scale setting.
private decimal pyramidScale;
+ /// The level size setting.
private int levels;
+ /// Size of the windowing average.
private int windowSize;
+ /// The number of iterations per pyramid level.
private int iterations;
+ /// The size of pixel neighborhood.
private int pixelNeighborhood;
+ /// The standard deviation of smooth derivatives
private decimal smoothDerivativeStandardDeviation;
+ /// Type of the flow filter to use for processing.
private FlowFilterType flowFilterType = FlowFilterType.box;
+ /// The subregions of the video on which to process.
private ObservableCollection subregions = new ObservableCollection();
#endregion
@@ -79,7 +105,7 @@ namespace butterflow_ui
}
/// Gets or sets a value indicating whether the keep audio.
- /// True if keep audio, false if not.
+ /// True if keeping audio in the final video, false if not.
public bool KeepAudio
{
get
@@ -177,11 +203,11 @@ namespace butterflow_ui
{
get
{
- return this.keepSubRegions;
+ return this.keepSubregions;
}
set
{
- this.keepSubRegions = value;
+ this.keepSubregions = value;
OnPropertyChanged();
}
}
@@ -439,7 +465,7 @@ namespace butterflow_ui
FlowFilterType = this.flowFilterType,
Iterations = this.iterations,
KeepAudio = this.keepAudio,
- KeepSubregions = this.keepSubRegions,
+ KeepSubregions = this.keepSubregions,
Levels = this.levels,
LockAspectRatio = this.lockAspectRatio,
LosslessQuality = this.losslessQuality,
diff --git a/butterflow-ui/OptionsConfigurationFile.cs b/butterflow-ui/OptionsConfigurationFile.cs
index 2fe2080..bc01f0c 100644
--- a/butterflow-ui/OptionsConfigurationFile.cs
+++ b/butterflow-ui/OptionsConfigurationFile.cs
@@ -6,25 +6,67 @@ using System.Threading.Tasks;
namespace butterflow_ui
{
- /// An options configuration file.
+ /// An options configuration file. This class is used to serialize out the configuration to a file.
[Serializable]
public class OptionsConfigurationFile
{
#region Properties
+ /// Gets or sets the playback rate.
+ /// The playback rate.
public string PlaybackRate { get; set; }
+
+ /// Gets or sets a value indicating whether the keep audio.
+ /// True if keep audio, false if not.
public bool KeepAudio { get; set; }
+
+ /// Gets or sets a value indicating whether the keep subregions that are not explicitly specified.
+ /// True if keeping subregions not explicitly specified, false if not.
public bool KeepSubregions { get; set; }
+
+ /// Gets or sets a value indicating whether the result is rendered in lossless quality.
+ /// True if lossless quality is selected, false if not.
public bool LosslessQuality { get; set; }
+
+ /// Gets or sets a value indicating whether the butterflow should be turned toward smooth motion.
+ /// True if tuned toward smooth motion, false if not.
public bool SmoothMotion { get; set; }
+
+ /// Gets or sets a value indicating whether to lock aspect ratio of the video.
+ /// True if locking aspect ratio of the video, false if not.
public bool LockAspectRatio { get; set; }
+
+ /// Gets or sets a value indicating whether to use fast pyramids.
+ /// True if using fast pyramids, false if not.
public bool FastPyramid { get; set; }
+
+ /// Gets or sets the pyramid scale factor.
+ /// The pyramid scale factor.
public decimal PyramidScale { get; set; }
+
+ /// Gets or sets the number of pyramid layers.
+ /// The number of pyramid layers.
public int Levels { get; set; }
+
+ /// Gets or sets the size of the windowing average.
+ /// The size of the windowing average.
public int WindowSize { get; set; }
+
+ /// Gets or sets the number of iterations at each pyramid level.
+ /// The number of iterations at each pyramid level.
public int Iterations { get; set; }
+
+ /// Gets or sets the size of the pixel neighborhood.
+ /// The size of the pixel neighborhood.
+ /// Per butterflow's documentation, the valid range for --poly-n is {5,7}.
public int PixelNeighborhood { get; set; }
+
+ /// Gets or sets the standard deviation of smooth derivatives.
+ /// The standard deviation of smooth derivatives.
public decimal SmoothDerivativeStandardDeviation { get; set; }
+
+ /// Gets or sets the type of the flow filter used for optical flow calculations.
+ /// The type of the flow filter used for optical flow calculations.
public FlowFilterType FlowFilterType { get; set; }
#endregion
diff --git a/butterflow-ui/PropertyChangedAlerter.cs b/butterflow-ui/PropertyChangedAlerter.cs
index 2bf4250..1bfd264 100644
--- a/butterflow-ui/PropertyChangedAlerter.cs
+++ b/butterflow-ui/PropertyChangedAlerter.cs
@@ -28,8 +28,28 @@ namespace butterflow_ui
#region Methods
- /// Executes the property changed action.
- /// The name.
+ ///
+ /// Executes the property changed action. This alerts subscribers to its change in value.
+ ///
+ /// (Optional) The name of the property.
+ ///
+ /// This will automatically pass in "SomeProperty" as the property name, derived useing the
+ /// attribute.
+ ///
+ /// public bool SomeProperty
+ /// {
+ /// get
+ /// {
+ /// return this.someProperty;
+ /// }
+ /// set
+ /// {
+ /// this.someProperty = value;
+ /// OnPropertyChanged();
+ /// }
+ /// }
+ ///
+ ///
protected virtual void OnPropertyChanged([CallerMemberName]string name = null)
{
if (!string.IsNullOrWhiteSpace(name))
@@ -42,6 +62,7 @@ namespace butterflow_ui
}
}
+ /// Executes when all properties are changed and should be updated.
protected virtual void OnAllPropertiesChanged()
{
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(string.Empty));
@@ -51,7 +72,7 @@ namespace butterflow_ui
/// The name of the property.
public void AddConstantCallProperty(string name)
{
- if(this.alwaysCall == null)
+ if (this.alwaysCall == null)
{
// This item has been deserialized and the list needs to be reinitialized.
this.alwaysCall = new List();