ArffWidgetSpeed.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // ArffWidgetSpeed.h
  2. #include "ArffWidgetBase.h"
  3. class ArffWidgetSpeed : public ArffWidgetBase
  4. {
  5. public slots:
  6. void HandleToggleView();
  7. public:
  8. ArffWidgetSpeed(double filterWindow);
  9. virtual void SetData(Arff &arff, int attToPaint, double maxValue=-1.0);
  10. virtual void SetFovData(Arff &arff, double maxValue=-1.0);
  11. void DisplayFov();
  12. void DisplayHead();
  13. protected:
  14. virtual void PaintLine(QPainter *painter);
  15. private:
  16. vector<double> m_vSpeed;
  17. vector<double> m_vSecondSpeed;
  18. vector<double> m_vHeadSpeed;
  19. vector<double> *m_pSpeed;
  20. bool m_FovDisplayed;
  21. double m_speedWindow; // window duration from which we compute the step for speed calculation
  22. void PaintSpeed(const vector<double>& vSpeed, QPainter *painter);
  23. // Paints speed from the provided vector to the painter.
  24. void PaintSpeedLines(QPainter *painter);
  25. // Paints the speed line. Speed is calculated differently depending on the type of
  26. // of stimulus (normal or 360 video).
  27. bool IsArff360();
  28. // Checks the relation of the ARFF and returns true if the recording was in
  29. // 360 degrees equirectangular.
  30. void NormalizeSpeed(vector<double> &vSpeed);
  31. // Removes extreme speed values and converts speed to a non linear representation.
  32. double TransformPercentage(double perc);
  33. // Expands the range for lower speed values to make them more visible.
  34. };