/// <summary> /// This method creates a custom gaze variable /// for regressions from the current user interface settings. /// </summary> /// <param name="isUsingAOI"> /// True, if regressions should only be detected in an AOI /// otherwise (for using all fixation data) false. /// </param> /// <param name="isAOIGroup"> /// True, if it is a AOI Group that the parameter belongs to, /// otherwise (for a single AOI) false. /// </param> private void CreateCustomGazeRegressionParam(bool isUsingAOI, bool isAOIGroup) { this.gazeParams |= GazeParams.Custom; var newGazeVariable = new CustomVariable(); if (isUsingAOI) { newGazeVariable.AOIName = isAOIGroup ? this.cbbGazeRegressionAOIGroups.Text : this.cbbGazeRegressionAOISingle.Text; } else { newGazeVariable.AOIName = string.Empty; } newGazeVariable.Number = (int)this.nudGazeRegressionLineHeight.Value; newGazeVariable.ColumnName = "GFIX_C" + this.gazeCustomParams.Count.ToString(); newGazeVariable.IsAOIGroup = isAOIGroup; newGazeVariable.ParamType = ParamTypes.Regressions; var var = new GazeVariable( GazeParams.Custom, newGazeVariable.ColumnName, "Gaze: " + newGazeVariable.ToString(), Type.GetType("System.Int32"), "N0", null, newGazeVariable.ReturnValues()); this.InsertOrRemoveColumn(true, var); this.gazeCustomParams.Add(newGazeVariable); }
/// <summary> /// This method initializes the default gaze variables for use in this interface. /// </summary> private void CreateGazeVariables() { var varGazeFixations = new GazeVariable( GazeParams.Fixations, "GFIXCOUN", "Gaze: Fixations (count)", Type.GetType("System.Int32"), "N0", this.chbGAZFixations, this.toolTipStatistic.GetToolTip(this.chbGAZFixations)); this.defaultVariables.Add("chbGAZFixations", varGazeFixations); var varGazeFixationsPS = new GazeVariable( GazeParams.FixationsPS, "GFIXCOpS", "Gaze: Fixations (count/s)", Type.GetType("System.Single"), "N2", this.chbGAZFixationsPS, this.toolTipStatistic.GetToolTip(this.chbGAZFixationsPS)); this.defaultVariables.Add("chbGAZFixationsPS", varGazeFixationsPS); var varGazeFixationDurationMean = new GazeVariable( GazeParams.FixationDurationMean, "GFIXDURA", "Gaze: Fixation Duration Mean (ms)", Type.GetType("System.Single"), "N2", this.chbGAZFixDurationMean, this.toolTipStatistic.GetToolTip(this.chbGAZFixDurationMean)); this.defaultVariables.Add("chbGAZFixDurationMean", varGazeFixationDurationMean); var varGazeFixationDurationMedian = new GazeVariable( GazeParams.FixationDurationMedian, "GFIXDUME", "Gaze: Fixation Duration Median (ms)", Type.GetType("System.Single"), "N2", this.chbGAZFixDurationMedian, this.toolTipStatistic.GetToolTip(this.chbGAZFixDurationMedian)); this.defaultVariables.Add("chbGAZFixDurationMedian", varGazeFixationDurationMedian); var varGazeFixationSaccadeRatio = new GazeVariable( GazeParams.FixationSaccadeRatio, "GFIXDUpS", "Gaze: Fixation/Saccade ratio", Type.GetType("System.Single"), "N2", this.chbGAZFixationSaccadesRatio, this.toolTipStatistic.GetToolTip(this.chbGAZFixationSaccadesRatio)); this.defaultVariables.Add("chbGAZFixationSaccadesRatio", varGazeFixationSaccadeRatio); var varGazeAverageSaccadeLength = new GazeVariable( GazeParams.AverageSaccadeLength, "GFIXSALE", "Gaze: Average Saccade Length (px)", Type.GetType("System.Single"), "N2", this.chbGAZSaccadeLength, this.toolTipStatistic.GetToolTip(this.chbGAZSaccadeLength)); this.defaultVariables.Add("chbGAZSaccadeLength", varGazeAverageSaccadeLength); var varGazeAverageSaccadeVelocity = new GazeVariable( GazeParams.AverageSaccadeVelocity, "GFIXSAVE", "Gaze: Average Saccade Velocity (px/s)", Type.GetType("System.Single"), "N2", this.chbGAZSaccadeVelocity, this.toolTipStatistic.GetToolTip(this.chbGAZSaccadeVelocity)); this.defaultVariables.Add("chbGAZSaccadeVelocity", varGazeAverageSaccadeVelocity); var varGazeTimeToFirstFixInSearchRect = new GazeVariable( GazeParams.TimeToFirstFixInSearchRect, "GFIXRECT", "Gaze: Time To First Fixation in AOI 'SearchRect' (ms)", Type.GetType("System.Int32"), "N0", this.chbGAZTime2FirstFixInSearchRect, this.toolTipStatistic.GetToolTip(this.chbGAZTime2FirstFixInSearchRect)); this.defaultVariables.Add("chbGAZTime2FirstFixInSearchRect", varGazeTimeToFirstFixInSearchRect); var varGazeTimeToFirstFixAtTarget = new GazeVariable( GazeParams.TimeToFirstFixAtTarget, "GFIXTARG", "Gaze: Time To First Fixation in AOI 'Target' (ms)", Type.GetType("System.Int32"), "N0", this.chbGAZTime2FirstFixAtTarget, this.toolTipStatistic.GetToolTip(this.chbGAZTime2FirstFixAtTarget)); this.defaultVariables.Add("chbGAZTime2FirstFixAtTarget", varGazeTimeToFirstFixAtTarget); var varGazeTimeToSecondFixAtTarget = new GazeVariable( GazeParams.TimeToSecondFixAtTarget, "GFIX2TAR", "Gaze: Time To Second Fixation in AOI 'Target' (ms)", Type.GetType("System.Int32"), "N0", this.chbGAZTime2SecondFixAtTarget, this.toolTipStatistic.GetToolTip(this.chbGAZTime2SecondFixAtTarget)); this.defaultVariables.Add("chbGAZTime2SecondFixAtTarget", varGazeTimeToSecondFixAtTarget); var varGazeTimeAtTarget = new GazeVariable( GazeParams.TimeAtTarget, "GFIXTAFT", "Gaze: AOI 'Target' Fixation Time (ms)", Type.GetType("System.Int32"), "N0", this.chbGAZFixTimeAtTarget, this.toolTipStatistic.GetToolTip(this.chbGAZFixTimeAtTarget)); this.defaultVariables.Add("chbGAZFixTimeAtTarget", varGazeTimeAtTarget); var varGazePathlength = new GazeVariable( GazeParams.Pathlength, "GFIXPATH", "Gaze: Fixation Connections Length (px)", Type.GetType("System.Int32"), "N0", this.chbGAZSaccadeLength, this.toolTipStatistic.GetToolTip(this.chbGAZSaccadeLength)); this.defaultVariables.Add("chbGAZPathlength", varGazePathlength); var varGazePathlengthPS = new GazeVariable( GazeParams.PathlengthPS, "GFIXPApS", "Gaze: Path velocity (px/s)", Type.GetType("System.Single"), "N2", this.chbGAZSaccadeVelocity, this.toolTipStatistic.GetToolTip(this.chbGAZSaccadeVelocity)); this.defaultVariables.Add("chbGAZPathlengthPS", varGazePathlengthPS); var varGazeFixationsUntilFirstMouseClick = new GazeVariable( GazeParams.FixationsUntilFirstMouseClick, "GFIXCO1C", "Gaze: Fixations Until First Click (count)", Type.GetType("System.Single"), "N2", this.chbGAZCountFix2FirstClick, this.toolTipStatistic.GetToolTip(this.chbGAZCountFix2FirstClick)); this.defaultVariables.Add("chbGAZCountFix2FirstClick", varGazeFixationsUntilFirstMouseClick); }
/// <summary> /// This method creates a custom gaze variable from the current user interface settings. /// </summary> /// <param name="isAOIGroup"> /// True, if it is a AOI Group that the parameter belongs to, /// otherwise (for a single AOI) false. /// </param> private void CreateCustomGazeParam(bool isAOIGroup) { this.gazeParams |= GazeParams.Custom; var newGazeVariable = new CustomVariable(); newGazeVariable.AOIName = isAOIGroup ? this.cbbGazeAOIGroups.Text : this.cbbGazeAOISingle.Text; newGazeVariable.ColumnName = "GFIX_C" + this.gazeCustomParams.Count.ToString(); newGazeVariable.Number = (int)this.nudGazeTimeUntilNumberOf.Value; newGazeVariable.IsAOIGroup = isAOIGroup; if (this.rdbGazeCompleteFixationTime.Checked) { newGazeVariable.ParamType = ParamTypes.CompleteTime; } else if (this.rdbGazeTimeUntil.Checked) { newGazeVariable.ParamType = ParamTypes.TimeUntil; } else if (this.rdbGazeNumberOfFixations.Checked) { newGazeVariable.ParamType = ParamTypes.NumberOf; } else if (this.rdbGazeFixationDurationMean.Checked) { newGazeVariable.ParamType = ParamTypes.FixationDurationMean; } else if (this.rdbGazeFixationDurationMedian.Checked) { newGazeVariable.ParamType = ParamTypes.FixationDurationMedian; } else if (this.rdbGazeSaccadeDuration.Checked) { newGazeVariable.ParamType = ParamTypes.SaccadeDuration; } else if (this.rdbGazeSaccadeLength.Checked) { newGazeVariable.ParamType = ParamTypes.SaccadeLength; } else if (this.rdbGazeSaccadeVelocity.Checked) { newGazeVariable.ParamType = ParamTypes.SaccadeVelocity; } var var = new GazeVariable( GazeParams.Custom, newGazeVariable.ColumnName, "Gaze: " + newGazeVariable.ToString(), Type.GetType("System.Int32"), "N0", null, newGazeVariable.ReturnValues()); this.InsertOrRemoveColumn(true, var); this.gazeCustomParams.Add(newGazeVariable); }