annotate annotationCalculatorSrc/testApp.h @ 47:689704aa55d5

Added square and better scrolling through the matrix, better loading of files
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Wed, 09 May 2012 12:38:00 +0100
parents ba36a1721538
children 5359e2c0b0fb
rev   line source
andrew@43 1 #pragma once
andrew@43 2
andrew@43 3 #include "ofMain.h"
andrew@43 4 #include "BeatAnnotationReader.h"
andrew@43 5 #include "PlotTools.h"
andrew@45 6 #include "MatchMultitrackAnnotationReader.h"
andrew@45 7 #include "Histogram.h"
andrew@43 8
andrew@46 9 #define NUMBER_OF_SCREENS 4
andrew@43 10 class testApp : public ofBaseApp{
andrew@43 11
andrew@43 12 public:
andrew@43 13 void setup();
andrew@43 14 void update();
andrew@43 15 void draw();
andrew@43 16
andrew@43 17 void keyPressed (int key);
andrew@43 18 void keyReleased(int key);
andrew@43 19 void mouseMoved(int x, int y );
andrew@43 20 void mouseDragged(int x, int y, int button);
andrew@43 21 void mousePressed(int x, int y, int button);
andrew@43 22 void mouseReleased(int x, int y, int button);
andrew@43 23 void windowResized(int w, int h);
andrew@43 24 void dragEvent(ofDragInfo dragInfo);
andrew@43 25 void gotMessage(ofMessage msg);
andrew@43 26
andrew@43 27 typedef vector<double> DoubleVector;
andrew@43 28 typedef vector<DoubleVector> DoubleMatrix;
andrew@43 29 DoubleMatrix GroundTruth;
andrew@43 30
andrew@43 31 BeatAnnotationReader beatReader;
andrew@43 32
andrew@47 33 void setFilePaths(int fileToLoad);
andrew@47 34 void readInFiles();
andrew@47 35 void processResults();
andrew@47 36
andrew@45 37 void drawAlignmentVectors();
andrew@45 38
andrew@43 39 PlotTools plotter;
andrew@43 40
andrew@43 41 double xPlotMin, xPlotMax, yPlotMin, yPlotMax;
andrew@45 42 void getYvalues();
andrew@45 43 void printPlotValues();
andrew@43 44
andrew@45 45 std::string matchPath;
andrew@46 46 MatchMultitrackAnnotationReader matchBackwardsNotations;
andrew@46 47 MatchMultitrackAnnotationReader matchForwardNotations;
andrew@43 48
andrew@45 49 Histogram multiHistogram;
andrew@46 50 Histogram matchBackwardsHistogram;
andrew@46 51 Histogram matchForwardHistogram;
andrew@45 52
andrew@45 53 int screenToDraw;
andrew@45 54 int histogramWidth, histogramBinNumber;
andrew@45 55
andrew@47 56
andrew@47 57 std::string liveGroundTruthPath, rehearsalGroundTruthPath;
andrew@47 58 std::string liveToRehMultitrackAlignmentPath;
andrew@47 59 std::string liveToRehMatchOFpath, liveToRehMatchOBpath;
andrew@47 60
andrew@47 61 int squareX, squareY, squareWidth, squareHeight;
andrew@47 62 bool squareBeingDragged;
andrew@47 63 void drawSquare();
andrew@47 64 void setCoordinatesToSquare();
andrew@47 65
andrew@43 66 };