public Analyzer(double meanX, double meanY, GraphicsPath path) { Counters = new RunningCount[Enum.GetValues(typeof(AnalysisMetric)).Length]; foreach (AnalysisMetric metric in Enum.GetValues(typeof(AnalysisMetric))) { Counters[(int)metric] = new RunningCount(metric); } MeanX = meanX; MeanY = meanY; path.Flatten(); using (GraphicsPathIterator PathIterator = new GraphicsPathIterator(path)) { using (GraphicsPath Subpath = new GraphicsPath()) { Paths = new List <PointF[]>(); bool Closed; while (PathIterator.NextSubpath(Subpath, out Closed) > 0) { Paths.Add(Subpath.PathPoints); Subpath.Reset(); } } } }
public Analyzer(double meanX, double meanY, GraphicsPath path) { Counters = new RunningCount[Enum.GetValues(typeof(AnalysisMetric)).Length]; foreach(AnalysisMetric metric in Enum.GetValues(typeof(AnalysisMetric))) Counters[(int)metric] = new RunningCount(metric); MeanX = meanX; MeanY = meanY; path.Flatten(); using(GraphicsPathIterator PathIterator = new GraphicsPathIterator(path)) { using(GraphicsPath Subpath = new GraphicsPath()) { Paths = new List<PointF[]>(); bool Closed; while(PathIterator.NextSubpath(Subpath, out Closed) > 0) { Paths.Add(Subpath.PathPoints); Subpath.Reset(); } } } }
public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { // Update running count when an image is found if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { RunningCount.PlusValue(m_countValue); } }
/// <summary> /// Builds the query. /// </summary> /// <returns>QueryBuilder.</returns> protected override QueryBuilder BuildQuery() { var qb = base.BuildQuery(); if (Skip.HasValue) { qb.Add("skip", Skip.Value.ToString()); } if (Top.HasValue) { qb.Add("top", Top.Value.ToString()); } if (RunningCount.HasValue) { qb.Add("runningCount", RunningCount.ToString()); } return(qb); }