RefractiveIndex/example/RefractiveIndex.h

72 lines
1.8 KiB
C
Raw Permalink Normal View History

2012-01-24 15:13:07 +01:00
#pragma once
#include "ofMain.h"
2012-02-11 18:54:46 +01:00
#include "ofEvents.h"
//#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"
#include "ofxXmlSettings.h"
2012-02-21 01:34:24 +01:00
#define MODE_DRAWING 0xEEFF
#define MODE_ANALYSING 0xFFEE
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
// refindx
2012-01-24 15:13:07 +01:00
void setup_camera();
void stop_camera();
void analysis_cb(string & analysis);
2012-02-11 18:54:46 +01:00
void start_analysis();
void stop_analysis();
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 ){;}
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:
//void eventsIn(guiCallbackData & data);
//void grabBackgroundEvent(guiCallbackData & data);
// gui
//ofxControlPanel _gui;
2012-01-24 15:13:07 +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;
static int _mode;
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;
static ofxXmlSettings XML; // made this static so we can access RUN_NUM in the analyses
2012-01-24 15:13:07 +01:00
};