view annotationCalculatorSrc/testApp.h @ 56:4394c9490716 tip

minor changes
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Mon, 24 Dec 2012 18:58:39 +0000
parents 5274e3b5479d
children
line wrap: on
line source
#pragma once

#include "ofMain.h"
#include "BeatAnnotationReader.h"
#include "PlotTools.h"
#include "MatchMultitrackAnnotationReader.h"
#include "Histogram.h"

#include "EwertAnnotationReader.h"

#define NUMBER_OF_SCREENS 9
class testApp : public ofBaseApp{

	public:
		void setup();
		void update();
		void draw();

		void keyPressed  (int key);
		void keyReleased(int key);
		void mouseMoved(int x, int y );
		void mouseDragged(int x, int y, int button);
		void mousePressed(int x, int y, int button);
		void mouseReleased(int x, int y, int button);
		void windowResized(int w, int h);
		void dragEvent(ofDragInfo dragInfo);
		void gotMessage(ofMessage msg);
	
	typedef vector<double> DoubleVector;
	typedef vector<DoubleVector> DoubleMatrix;
	DoubleMatrix GroundTruth;
	
	BeatAnnotationReader beatReader;
	
	void processFile(int file);
	
	void setFilePaths(int fileToLoad);
	void readInFiles();
	void processResults();
	void printPercentageTotals();
	
	void drawAlignmentVectors();
	
	PlotTools plotter;
	
	double xPlotMin, xPlotMax, yPlotMin, yPlotMax;
	void getYvalues();
	void printPlotValues();
	
	std::string matchPath;
	MatchMultitrackAnnotationReader matchBackwardsNotations;
	MatchMultitrackAnnotationReader matchForwardNotations;
		
	Histogram multiHistogram;
	Histogram matchBackwardsHistogram;
	Histogram matchForwardHistogram;
	
	Histogram multiAbsTotalHistogram;
	Histogram matchBackwardsAbsTotalHistogram;
	Histogram matchForwardAbsTotalHistogram;
	
	Histogram ewertHistogram;
	Histogram ewertAbsTotalHistogram;
	
	int screenToDraw;
	int histogramWidth, histogramBinNumber;
	
	
	std::string liveGroundTruthPath, rehearsalGroundTruthPath;
	std::string liveToRehMultitrackAlignmentPath;
	std::string liveToRehMatchOFpath, liveToRehMatchOBpath;
	
	int squareX, squareY, squareWidth, squareHeight;
	bool squareBeingDragged;
	void drawSquare();
	void setCoordinatesToSquare();
	
	EwertAnnotationReader ewertReader;
	void readEwertAnnotations();
	std::string ewertAlignmentPath;
	bool ewertFlag;
};