the NUM_RUN is now set using the xml config.refindx in each class

This commit is contained in:
Jamie Allen 2012-02-22 19:41:16 +01:00
parent a51a98a099
commit 245d67cf8f
11 changed files with 49 additions and 11 deletions

View File

@ -36,7 +36,7 @@ bool RefractiveIndex::_vid_stream_open;
bool RefractiveIndex::_vid_toggle_on; bool RefractiveIndex::_vid_toggle_on;
string RefractiveIndex::_location; string RefractiveIndex::_location;
ofxXmlSettings XML; ofxXmlSettings RefractiveIndex::XML;
void RefractiveIndex::setup() void RefractiveIndex::setup()
{ {

View File

@ -9,6 +9,7 @@
#include "AnalysisAdaptor.h" #include "AnalysisAdaptor.h"
#include "ofxOpenCv.h" #include "ofxOpenCv.h"
#include "ofxXmlSettings.h"
class RefractiveIndex : public ofBaseApp class RefractiveIndex : public ofBaseApp
{ {
@ -61,5 +62,6 @@ public:
// this should be in xml // this should be in xml
static string _location; static string _location;
static ofxXmlSettings XML; // made this static so we can access RUN_NUM in the analyses
}; };

View File

@ -10,11 +10,14 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void CamNoiseAnalysis::setup(int camWidth, int camHeight) void CamNoiseAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN CamNoiseAnalysis " << NUM_RUN << endl;
NUM_RUN = 5; //NUM_RUN = 5;
int acq_run_time = 20; // 20 seconds of acquiring per run int acq_run_time = 20; // 20 seconds of acquiring per run

View File

@ -9,11 +9,14 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void ColorMultiAnalysis::setup(int camWidth, int camHeight) void ColorMultiAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN ColorMultiAnalysis " << NUM_RUN << endl;
NUM_RUN = 5; //NUM_RUN = 5;
int acq_run_time = 35; int acq_run_time = 35;

View File

@ -10,11 +10,14 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void ColorSingleAnalysis::setup(int camWidth, int camHeight) void ColorSingleAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN ColorSingleAnalysis " << NUM_RUN << endl;
NUM_RUN = 5; //NUM_RUN = 5;
int acq_run_time = 25; // 20 seconds of acquiring per run int acq_run_time = 25; // 20 seconds of acquiring per run

View File

@ -10,11 +10,14 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void DiffNoiseAnalysis::setup(int camWidth, int camHeight) void DiffNoiseAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN DiffNoiseAnalysis " << NUM_RUN << endl;
NUM_RUN = 5; //NUM_RUN = 5;
int acq_run_time = 20; // 20 seconds of acquiring per run int acq_run_time = 20; // 20 seconds of acquiring per run

View File

@ -10,10 +10,14 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void IResponseAnalysis::setup(int camWidth, int camHeight) void IResponseAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
NUM_RUN = 5; cout << "NUM_RUN IResponseAnalysis " << NUM_RUN << endl;
// NUM_RUN = 5;
int acq_run_time = 20; // 20 seconds of acquiring per run int acq_run_time = 20; // 20 seconds of acquiring per run

View File

@ -10,10 +10,15 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void RelaxRateAnalysis::setup(int camWidth, int camHeight) void RelaxRateAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = 5; NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN RelaxRateAnalysis " << NUM_RUN << endl;
//NUM_RUN = 5;
int acq_run_time = 20; // 20 seconds of acquiring per run int acq_run_time = 20; // 20 seconds of acquiring per run

View File

@ -5,6 +5,7 @@
#include "Poco/Thread.h" #include "Poco/Thread.h"
#include "RefractiveIndex.h" #include "RefractiveIndex.h"
//#include "ofxXmlSettings.h"
#include "ofxOpenCv.h" #include "ofxOpenCv.h"
using Poco::Timer; using Poco::Timer;
@ -13,10 +14,13 @@ using Poco::Thread;
#define STATE_SCAN 0 #define STATE_SCAN 0
#define STATE_ANALYSIS 1 #define STATE_ANALYSIS 1
#define NUMBER_RUNS 1
void ShadowScapesAnalysis::setup(int camWidth, int camHeight) void ShadowScapesAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = 5; NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN ShadowScapesAnalysis " << NUM_RUN << endl;
//NUM_RUN = 5;
int acq_run_time = 15; // 10 seconds of acquiring per run int acq_run_time = 15; // 10 seconds of acquiring per run

View File

@ -10,9 +10,15 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void ShapeFromShadingAnalysis::setup(int camWidth, int camHeight) void ShapeFromShadingAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = 5;
NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN ShapeFromShadingAnalysis " << NUM_RUN << endl;
// NUM_RUN = 5;
int acq_run_time = 20; // 20 seconds of acquiring per run int acq_run_time = 20; // 20 seconds of acquiring per run

View File

@ -10,9 +10,14 @@ using Poco::Timer;
using Poco::TimerCallback; using Poco::TimerCallback;
using Poco::Thread; using Poco::Thread;
#define NUMBER_RUNS 1
void StrobeAnalysis::setup(int camWidth, int camHeight) void StrobeAnalysis::setup(int camWidth, int camHeight)
{ {
NUM_RUN = 5; NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS);
cout << "NUM_RUN StrobeAnalysis " << NUM_RUN << endl;
//NUM_RUN = 5;
int acq_run_time = 25; // 20 seconds of acquiring per run int acq_run_time = 25; // 20 seconds of acquiring per run