RefractiveIndex/example/RefractiveIndex.h

80 lines
1.9 KiB
C
Raw Normal View History

2012-01-24 15:13:07 +01:00
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ author: dviid
~ contact: dviid@labs.ciid.dk
*/
#pragma once
#include "ofMain.h"
2012-02-11 18:54:46 +01:00
#include "ofEvents.h"
2012-01-24 15:13:07 +01:00
#include "AbstractAnalysis.h"
#include "AnalysisAdaptor.h"
typedef map<string, AnalysisAdaptor*> TAnalysisMap;
typedef vector<AnalysisAdaptor*> TAnalysisVec;
2012-01-24 15:13:07 +01:00
class RefractiveIndex : public ofBaseApp
{
public:
// ofx
void setup();
void update();
void draw();
void exit();
2012-01-24 15:13:07 +01:00
// camera
2012-01-24 15:13:07 +01:00
void setup_camera();
void stop_camera();
// starts the whole process
2012-02-11 18:54:46 +01:00
void start_analysis();
// stops the whole process
2012-02-11 18:54:46 +01:00
void stop_analysis();
// callbacks
void acquire_cb(string & analysis);
void synthesize_cb(string & analysis);
// state machine
void state_machine_analysis();
2012-01-24 15:13:07 +01:00
// ofx
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){;}
2012-01-24 15:13:07 +01:00
void windowResized(int w, int h){;}
protected:
AbstractAnalysis* _currentAnalysis;
AnalysisAdaptor* _currentAnalysisAdaptor;
AnalysisAdaptor* _currentSynthesisAdaptor;
TAnalysisMap::iterator _currentAnalysisIndx;
2012-01-24 15:13:07 +01:00
TAnalysisMap _acquisitionMap;
TAnalysisMap _synthesisMap;
2012-01-24 15:13:07 +01:00
TAnalysisVec _display_results_vector;
2012-01-24 16:52:22 +01:00
public:
// acquisition
static ofPixels _pixels;
static ofVideoGrabber _vidGrabber;
2012-02-11 18:54:46 +01:00
vector<string> videoSourceList;
2012-01-24 16:52:22 +01:00
static int _vid_w, _vid_h, _vid_id;
static bool _vid_stream_open;
static bool _vid_toggle_on;
2012-02-11 18:54:46 +01:00
// this should be in xml
static string _location;
2012-01-24 16:52:22 +01:00
2012-01-24 15:13:07 +01:00
};