Exemplo n.º 1
0
        public ISingleFrameResult GetData()
        {
            ISingleFrameResult result = ModelResolver.Resolve <ISingleFrameResult>();

            if (HeadPoints != null)
            {
                result.HeadPoints = HeadPoints.Select(x => x.GetPoint()).ToArray();
            }
            else
            {
                result.HeadPoints = null;
            }

            if (HeadPoint != null)
            {
                result.HeadPoint = HeadPoint.GetPoint();
            }

            if (SmoothedHeadPoint != null)
            {
                result.SmoothedHeadPoint = SmoothedHeadPoint.GetPoint();
            }

            if (Orientation != null)
            {
                result.Orientation = Orientation.GetVector();
            }

            result.CentroidSize    = CentroidSize;
            result.PelvicArea      = PelvicArea;
            result.Velocity        = Velocity;
            result.AngularVelocity = AngularVelocity;
            result.Distance        = Distance;
            result.PelvicArea2     = PelvicArea2;
            result.PelvicArea3     = PelvicArea3;
            result.PelvicArea4     = PelvicArea4;

            if (Centroid != null)
            {
                result.Centroid = Centroid.GetPoint();
            }

            result.DataLoadComplete();
            return(result);
        }
Exemplo n.º 2
0
        public ISingleFrameExtendedResults GetData()
        {
            ISingleFrameExtendedResults result = ModelResolver.Resolve <ISingleFrameExtendedResults>();

            if (HeadPoints != null)
            {
                result.HeadPoints = HeadPoints.Select(x => x.GetPoint()).ToArray();
            }
            else
            {
                result.HeadPoints = null;
            }

            if (BodyContour != null)
            {
                result.BodyContour = BodyContour.Select(x => x.GetPoint()).ToArray();
            }
            else
            {
                result.BodyContour = null;
            }

            if (HeadPoint != null)
            {
                result.HeadPoint = HeadPoint.GetPoint();
                result.MidPoint  = MidPoint.GetPoint();
            }

            if (SmoothedHeadPoint != null)
            {
                result.SmoothedHeadPoint = SmoothedHeadPoint.GetPoint();
            }

            if (Orientation != null)
            {
                result.Orientation = Orientation.GetVector();
            }

            result.CentroidSize    = CentroidSize;
            result.PelvicArea      = PelvicArea;
            result.Velocity        = Velocity;
            result.AngularVelocity = AngularVelocity;
            result.Distance        = Distance;
            result.PelvicArea2     = PelvicArea2;
            result.PelvicArea3     = PelvicArea3;
            result.PelvicArea4     = PelvicArea4;

            if (Centroid != null)
            {
                result.Centroid = Centroid.GetPoint();
            }

            if (Whiskers != null)
            {
                result.Whiskers = Whiskers.GetWhiskerCollection();
            }

            if (AllWhiskers != null)
            {
                result.AllWhiskers = AllWhiskers.GetWhiskerCollection();
            }

            if (BestTrackedWhisker != null)
            {
                result.BestTrackedWhisker = BestTrackedWhisker.GetWhiskerCollection();
            }

            result.DataLoadComplete();
            return(result);
        }