diff --git a/example/RefractiveIndex.cpp b/example/RefractiveIndex.cpp index 40d3b37..a46037c 100644 --- a/example/RefractiveIndex.cpp +++ b/example/RefractiveIndex.cpp @@ -36,7 +36,7 @@ bool RefractiveIndex::_vid_stream_open; bool RefractiveIndex::_vid_toggle_on; string RefractiveIndex::_location; -ofxXmlSettings XML; +ofxXmlSettings RefractiveIndex::XML; void RefractiveIndex::setup() { diff --git a/example/RefractiveIndex.h b/example/RefractiveIndex.h index f1f1f1d..6aabfd2 100644 --- a/example/RefractiveIndex.h +++ b/example/RefractiveIndex.h @@ -9,6 +9,7 @@ #include "AnalysisAdaptor.h" #include "ofxOpenCv.h" +#include "ofxXmlSettings.h" class RefractiveIndex : public ofBaseApp { @@ -61,5 +62,6 @@ public: // this should be in xml static string _location; + static ofxXmlSettings XML; // made this static so we can access RUN_NUM in the analyses }; \ No newline at end of file diff --git a/src/CamNoiseAnalysis.cpp b/src/CamNoiseAnalysis.cpp index 0b3cc3b..e3e71b8 100755 --- a/src/CamNoiseAnalysis.cpp +++ b/src/CamNoiseAnalysis.cpp @@ -10,11 +10,14 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 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 diff --git a/src/ColorMultiAnalysis.cpp b/src/ColorMultiAnalysis.cpp index 3523e6f..dc4ae93 100755 --- a/src/ColorMultiAnalysis.cpp +++ b/src/ColorMultiAnalysis.cpp @@ -9,11 +9,14 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 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; diff --git a/src/ColorSingleAnalysis.cpp b/src/ColorSingleAnalysis.cpp index a4c71d7..d8b3c6b 100755 --- a/src/ColorSingleAnalysis.cpp +++ b/src/ColorSingleAnalysis.cpp @@ -10,11 +10,14 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 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 diff --git a/src/DiffNoiseAnalysis.cpp b/src/DiffNoiseAnalysis.cpp index 0e9d260..77cfaf0 100755 --- a/src/DiffNoiseAnalysis.cpp +++ b/src/DiffNoiseAnalysis.cpp @@ -10,11 +10,14 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 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 diff --git a/src/IResponseAnalysis.cpp b/src/IResponseAnalysis.cpp index 89cfc94..4a23b2e 100755 --- a/src/IResponseAnalysis.cpp +++ b/src/IResponseAnalysis.cpp @@ -10,10 +10,14 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 + void IResponseAnalysis::setup(int camWidth, int camHeight) { - - NUM_RUN = 5; + NUM_RUN = RefractiveIndex::XML.getValue("config:analysis:NUM_RUN", NUMBER_RUNS); + cout << "NUM_RUN IResponseAnalysis " << NUM_RUN << endl; + +// NUM_RUN = 5; int acq_run_time = 20; // 20 seconds of acquiring per run diff --git a/src/RelaxRateAnalysis.cpp b/src/RelaxRateAnalysis.cpp index e195efa..d329d9b 100755 --- a/src/RelaxRateAnalysis.cpp +++ b/src/RelaxRateAnalysis.cpp @@ -10,10 +10,15 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 + 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 diff --git a/src/ShadowScapesAnalysis.cpp b/src/ShadowScapesAnalysis.cpp index fbaabc0..d7cd511 100755 --- a/src/ShadowScapesAnalysis.cpp +++ b/src/ShadowScapesAnalysis.cpp @@ -5,6 +5,7 @@ #include "Poco/Thread.h" #include "RefractiveIndex.h" +//#include "ofxXmlSettings.h" #include "ofxOpenCv.h" using Poco::Timer; @@ -13,10 +14,13 @@ using Poco::Thread; #define STATE_SCAN 0 #define STATE_ANALYSIS 1 +#define NUMBER_RUNS 1 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 diff --git a/src/ShapeFromShadingAnalysis.cpp b/src/ShapeFromShadingAnalysis.cpp index 9e26703..f7858f2 100755 --- a/src/ShapeFromShadingAnalysis.cpp +++ b/src/ShapeFromShadingAnalysis.cpp @@ -10,9 +10,15 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 + 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 diff --git a/src/StrobeAnalysis.cpp b/src/StrobeAnalysis.cpp index 6945285..4213709 100755 --- a/src/StrobeAnalysis.cpp +++ b/src/StrobeAnalysis.cpp @@ -10,9 +10,14 @@ using Poco::Timer; using Poco::TimerCallback; using Poco::Thread; +#define NUMBER_RUNS 1 + 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