Search Results for

    Show / Hide Table of Contents

    Class Plot

    Represents a single array of data with X and Y scales and other info useful for plotting a graph. Was first used to represent a track of scores at the bottom of a sonogram image.

    Inheritance
    Object
    Plot
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: TowseyLibrary
    Assembly: TowseyLibrary.dll
    Syntax
    public class Plot

    Constructors

    | Improve this Doc View Source

    Plot(String, Double[], Double)

    Declaration
    public Plot(string _title, double[] _data, double _threshold)
    Parameters
    Type Name Description
    String _title
    Double[] _data
    Double _threshold

    Properties

    | Improve this Doc View Source

    data

    Declaration
    public double[] data { get; set; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    threshold

    Declaration
    public double threshold { get; set; }
    Property Value
    Type Description
    Double
    | Improve this Doc View Source

    title

    Declaration
    public string title { get; set; }
    Property Value
    Type Description
    String

    Methods

    | Improve this Doc View Source

    DrawAnnotatedPlot(Int32)

    Declaration
    public Image<Rgb24> DrawAnnotatedPlot(int height)
    Parameters
    Type Name Description
    Int32 height
    Returns
    Type Description
    SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24>
    | Improve this Doc View Source

    DrawPlot(Int32)

    Assumes that the data has been normalised by a call to plot.NormalizeData(double min, double max) or equivalent.

    Declaration
    public Image<Rgb24> DrawPlot(int height)
    Parameters
    Type Name Description
    Int32 height

    height of the plot.

    Returns
    Type Description
    SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24>
    | Improve this Doc View Source

    FindStartsAndEndsOfScoreEvents(Double[], Double, Int32, Int32, out Double[], out List<Point>)

    Declaration
    public static void FindStartsAndEndsOfScoreEvents(double[] scores, double scoreThreshold, int minDuration, int maxDuration, out double[] prunedScores, out List<Point> startEnds)
    Parameters
    Type Name Description
    Double[] scores
    Double scoreThreshold
    Int32 minDuration
    Int32 maxDuration
    Double[] prunedScores
    List<SixLabors.ImageSharp.Point> startEnds
    | Improve this Doc View Source

    NormaliseData()

    Declaration
    public void NormaliseData()
    | Improve this Doc View Source

    NormalizeData(Double, Double)

    Declaration
    public void NormalizeData(double min, double max)
    Parameters
    Type Name Description
    Double min
    Double max
    | Improve this Doc View Source

    PreparePlot(Double[], String, Double)

    Prepares a plot of an array of score values. To obtain a more useful display, the maximum display value is set to 3 times the threshold value.

    Declaration
    public static Plot PreparePlot(double[] array, string title, double threshold)
    Parameters
    Type Name Description
    Double[] array

    an array of double.

    String title

    to accompany the plot.

    Double threshold

    A threshold value to be drawn on the plot.

    Returns
    Type Description
    Plot

    the plot.

    | Improve this Doc View Source

    PruneScoreArray(Double[], Double, Int32, Int32)

    Declaration
    public static double[] PruneScoreArray(double[] scores, double scoreThreshold, int minDuration, int maxDuration)
    Parameters
    Type Name Description
    Double[] scores
    Double scoreThreshold
    Int32 minDuration
    Int32 maxDuration
    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    ScaleDataArray(Int32)

    Declaration
    public void ScaleDataArray(int newLength)
    Parameters
    Type Name Description
    Int32 newLength

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top