2012-01-24 15:13:07 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ofMain.h"
|
2012-02-11 18:54:46 +01:00
|
|
|
#include "ofEvents.h"
|
2012-02-15 07:58:30 +01:00
|
|
|
//#include "ofxControlPanel.h"
|
2012-01-24 15:13:07 +01:00
|
|
|
|
|
|
|
|
#include "AbstractAnalysis.h"
|
|
|
|
|
#include "AnalysisAdaptor.h"
|
|
|
|
|
|
2012-02-21 16:48:39 +01:00
|
|
|
#include "ofxOpenCv.h"
|
2012-02-21 01:34:24 +01:00
|
|
|
|
2012-01-24 15:13:07 +01:00
|
|
|
class RefractiveIndex : public ofBaseApp
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// ofx
|
|
|
|
|
void setup();
|
|
|
|
|
void update();
|
|
|
|
|
void draw();
|
2012-02-12 09:39:36 +01:00
|
|
|
void exit();
|
2012-01-24 15:13:07 +01:00
|
|
|
|
2012-02-15 07:58:30 +01:00
|
|
|
// refindx
|
2012-01-24 15:13:07 +01:00
|
|
|
void setup_camera();
|
2012-02-12 09:39:36 +01:00
|
|
|
void stop_camera();
|
2012-02-15 07:58:30 +01:00
|
|
|
void analysis_cb(string & analysis);
|
2012-02-11 18:54:46 +01:00
|
|
|
void start_analysis();
|
|
|
|
|
void stop_analysis();
|
2012-02-15 07:58:30 +01:00
|
|
|
void state_analysis();
|
2012-01-24 15:13:07 +01:00
|
|
|
|
|
|
|
|
// ofx
|
|
|
|
|
void keyPressed (int key);
|
|
|
|
|
void keyReleased(int key){;}
|
|
|
|
|
void mouseMoved(int x, int y ){;}
|
2012-02-12 09:39:36 +01:00
|
|
|
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:
|
|
|
|
|
|
2012-02-15 07:58:30 +01:00
|
|
|
//void eventsIn(guiCallbackData & data);
|
|
|
|
|
//void grabBackgroundEvent(guiCallbackData & data);
|
|
|
|
|
|
|
|
|
|
// gui
|
|
|
|
|
//ofxControlPanel _gui;
|
2012-01-24 15:13:07 +01:00
|
|
|
|
2012-02-15 07:58:30 +01:00
|
|
|
AbstractAnalysis* _currentAnalysis;
|
|
|
|
|
int _currentAnalysisIndx;
|
|
|
|
|
AnalysisAdaptor* _analysisAdapator;
|
|
|
|
|
vector<AbstractAnalysis*> _analysisVector;
|
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
|
2012-02-15 07:58:30 +01:00
|
|
|
static string _location;
|
|
|
|
|
|
2012-02-21 16:48:39 +01:00
|
|
|
ofxCvColorImage colorImg;
|
2012-01-24 16:52:22 +01:00
|
|
|
|
2012-01-24 15:13:07 +01:00
|
|
|
};
|