/* */ #include "AbstractAnalysis.h" #include "RefractiveIndex.h" #include "ofxFileHelper.h" // this is the main threaded loop for a given analysis void AbstractAnalysis::do_synthesize() { _saved_filenames_analysis.clear(); _state = STATE_ACQUIRING; acquire(); if(_state == STATE_STOP) goto exit; _state = STATE_SYNTHESISING; synthesise(); if(_state == STATE_STOP) goto exit; _state = STATE_DISPLAY_RESULTS; displayresults(); exit: ofNotifyEvent(_synthesize_cb, _name); } void AbstractAnalysis::create_dir() { // HERE IS WHERE WE SETUP THE DIRECTORY FOR ALL THE SAVED IMAGES //FOR WINDOWS i HAVE HAD TO REPLACE SPACES WITH UNDERSCORES AND REDUCE THE LENGTH OF THE FOLDER NAME time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); string time = asctime(timeinfo); string replaceTime = ""; //DON'T INCLUDE THE DAY IN WORDS EG 'TUE' OR THE YEAR EG 2012 THIS MAKES THE DIRECTORY NAME TOO LONG AND CAUSES DIR CREATION TO FAIL for(int i=4;i