Esempio n. 1
0
        public void LoadData(IMouseFrame[] frames)
        {
            //Load Whisker Angle Data
            WhiskerAngle.LoadData(frames);

            //Get whiskers
            double frameRate     = GlobalSettings.GlobalSettings.FrameRateSettings.OriginalFrameRate;
            double frameInterval = GlobalSettings.GlobalSettings.ClipSettings.FrameInterval;

            List <ISingleWhiskerFrequency> whiskers = new List <ISingleWhiskerFrequency>();

            foreach (IWhisker whisker in frames[0].Whiskers)
            {
                if (whisker.IsGenericPoint)
                {
                    continue;
                }

                ISingleWhiskerFrequency singleWhisker = ModelResolver.Resolve <ISingleWhiskerFrequency>();
                singleWhisker.Whisker       = whisker;
                singleWhisker.FrameRate     = frameRate;
                singleWhisker.FrameInterval = frameInterval;
                whiskers.Add(singleWhisker);
            }

            Whiskers = whiskers.ToArray();

            CreateWhiskers();
            UpdateTValue();
        }
Esempio n. 2
0
        public void LoadData(IMouseFrame[] frames)
        {
            //Load Whisker Angle Data
            WhiskerAngle.LoadData(frames);
            ProtractionRetraction.LoadData(frames);

            //Get whiskers
            List <ISingleWhiskerAmplitude> whiskers = new List <ISingleWhiskerAmplitude>();

            foreach (IWhisker whisker in frames[0].Whiskers)
            {
                if (whisker.IsGenericPoint)
                {
                    continue;
                }

                ISingleWhiskerAmplitude singleWhisker = ModelResolver.Resolve <ISingleWhiskerAmplitude>();
                singleWhisker.Whisker = whisker;
                ISingleWhiskerProtractionRetraction proRetWhisker = ProtractionRetraction.Whiskers.Single(x => x.WhiskerId == whisker.WhiskerId);
                singleWhisker.ProtractionRetractionData       = proRetWhisker.ProtractionRetractionData;
                singleWhisker.ProtractionRetractionDictionary = proRetWhisker.ProtractionRetractionDictionary;
                whiskers.Add(singleWhisker);
            }

            Whiskers = whiskers.ToArray();

            UpdateTValue();
        }
        public void LoadData(IMouseFrame[] frames)
        {
            //Load Whisker Angle Data
            WhiskerAngle.LoadData(frames);
            WhiskerAngle.UpdateTValue(0);
            //WhiskerAngularVelocity.LoadData(frames);

            List <ISingleWhiskerProtractionRetraction> whiskers = new List <ISingleWhiskerProtractionRetraction>();

            foreach (IWhisker whisker in frames[0].Whiskers)
            {
                if (whisker.IsGenericPoint)
                {
                    continue;
                }

                ISingleWhiskerProtractionRetraction singleWhisker = ModelResolver.Resolve <ISingleWhiskerProtractionRetraction>();
                singleWhisker.Whisker = whisker;

                double[] signal = new double[frames.Length];
                for (int i = 0; i < frames.Length; i++)
                {
                    signal[i] = WhiskerAngle.Frames[i].Targets.Single(x => x.Whisker.WhiskerId == whisker.WhiskerId).Angle;
                }

                singleWhisker.AngleSignal = signal;

                whiskers.Add(singleWhisker);
            }

            Whiskers = whiskers.ToArray();

            UpdateTValue();
        }
Esempio n. 4
0
        public void LoadData(IMouseFrame[] frames)
        {
            //Load Whisker Angle Data
            WhiskerAngle.LoadData(frames);

            List <ISingleWhiskerMeanOffset> whiskers = new List <ISingleWhiskerMeanOffset>();

            foreach (IWhisker whisker in frames[0].Whiskers)
            {
                if (whisker.IsGenericPoint)
                {
                    continue;
                }

                ISingleWhiskerMeanOffset singleWhisker = ModelResolver.Resolve <ISingleWhiskerMeanOffset>();
                singleWhisker.Whisker = whisker;
                whiskers.Add(singleWhisker);
            }

            Whiskers = whiskers.ToArray();

            UpdateTValue();
        }