diff --git a/src/CamNoiseAnalysis.cpp b/src/CamNoiseAnalysis.cpp index e7b2355..b710995 100755 --- a/src/CamNoiseAnalysis.cpp +++ b/src/CamNoiseAnalysis.cpp @@ -150,18 +150,15 @@ void CamNoiseAnalysis::draw() // this runs at save_cb timer rate = DELTA_T_SAVE void CamNoiseAnalysis::save_cb(Timer& timer) { + _save_cnt++; - - string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; - string thisLocation = RefractiveIndex::_location; - string file = _whole_file_path+"/"+file_name; - + cout << "ColorSingleAnalysis::saving...\n"; + + string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; + ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - _saved_filenames.push_back(file); - - //if(_save_cnt >= NUM_SAVE_PER_RUN) - // _RUN_DONE = true; + _saved_filenames.push_back(_whole_file_path+"/"+file_name); } diff --git a/src/ColorMultiAnalysis.cpp b/src/ColorMultiAnalysis.cpp index 02a5873..0a8f1b5 100755 --- a/src/ColorMultiAnalysis.cpp +++ b/src/ColorMultiAnalysis.cpp @@ -174,19 +174,16 @@ void ColorMultiAnalysis::draw() // this runs at save_cb timer rate = DELTA_T_SAVE void ColorMultiAnalysis::save_cb(Timer& timer) { + _save_cnt++; - // UPDATE THE COLOR ON THE SCREEN - //float c_last = c; + cout << "ColorMultiAnalysis::saving...\n"; - // cout << "COLORMULTIANALYSIS::saving...\n"; - // cout << "c_last... " << c << endl; string file_name = ofToString(_save_cnt,2)+"_"+ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; - // cout<<_whole_file_path<= NUM_SAVE_PER_RUN){ - // _RUN_DONE = true; - //} + _saved_filenames.push_back(_whole_file_path+"/"+file_name); + + } diff --git a/src/ColorSingleAnalysis.cpp b/src/ColorSingleAnalysis.cpp index 0ee5153..ae711db 100755 --- a/src/ColorSingleAnalysis.cpp +++ b/src/ColorSingleAnalysis.cpp @@ -156,15 +156,13 @@ void ColorSingleAnalysis::save_cb(Timer& timer) { _save_cnt++; - // cout << "ColorSingleAnalysis::saving...\n"; + cout << "ColorSingleAnalysis::saving...\n"; string file_name =ofToString(_save_cnt,2)+"_"+fileNameTag+"_"+ofToString(_run_cnt,2)+".jpg"; ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - //cout<<_whole_file_path+"/"+file_name<= NUM_SAVE_PER_RUN) - // _RUN_DONE = true; + _saved_filenames.push_back(_whole_file_path+"/"+file_name); + } diff --git a/src/DiffNoiseAnalysis.cpp b/src/DiffNoiseAnalysis.cpp index 54e635b..152a993 100755 --- a/src/DiffNoiseAnalysis.cpp +++ b/src/DiffNoiseAnalysis.cpp @@ -167,32 +167,17 @@ void DiffNoiseAnalysis::draw() // this runs at save_cb timer rate = DELTA_T_SAVE void DiffNoiseAnalysis::save_cb(Timer& timer) { - - - float rand10 = ofRandom(0,10); - - if (rand10 > 5.0) { - - cout << "DiffNoiseAnalysis::saving...\n"; - cout << "c_last... " << c << endl; - cout<<"rand10... " <= NUM_SAVE_PER_RUN) - // _RUN_DONE = true; } diff --git a/src/IResponseAnalysis.cpp b/src/IResponseAnalysis.cpp index efa0e96..e251aa7 100755 --- a/src/IResponseAnalysis.cpp +++ b/src/IResponseAnalysis.cpp @@ -113,16 +113,10 @@ void IResponseAnalysis::save_cb(Timer& timer) _save_cnt++; cout << "IResponseAnalysis::saving...\n"; - //cout << "c_last... " << c << endl; - string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; - string thisLocation = RefractiveIndex::_location; - //RefractiveIndex::_pixels = RefractiveIndex::_vidGrabber.getPixelsRef(); //get ofPixels from the camera - // fileName = imageSaveFolderPath+whichAnalysis+"_"+ofToString(100.0*i*scanLineSpeed/ofGetHeight(),2)+"%_"+ofToString(i)+".jpg"; - //ofSaveImage(vectorOfPixels[i], fileName, OF_IMAGE_QUALITY_BEST); + string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - //if(_save_cnt >= NUM_SAVE_PER_RUN) - // _RUN_DONE = true; + _saved_filenames.push_back(_whole_file_path+"/"+file_name); } diff --git a/src/RelaxRateAnalysis.cpp b/src/RelaxRateAnalysis.cpp index 521e049..0db9a01 100755 --- a/src/RelaxRateAnalysis.cpp +++ b/src/RelaxRateAnalysis.cpp @@ -128,18 +128,12 @@ void RelaxRateAnalysis::draw() void RelaxRateAnalysis::save_cb(Timer& timer) { _save_cnt++; + cout << "RelaxRateAnalysis::saving...\n"; - //cout << "c_last... " << c << endl; + string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; - string thisLocation = RefractiveIndex::_location; - string file = _whole_file_path+"/"+file_name; - - ofSaveImage(RefractiveIndex::_pixels, file, OF_IMAGE_QUALITY_BEST); + ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - _saved_filenames.push_back(file); - - //if(_save_cnt >= NUM_SAVE_PER_RUN) - // _RUN_DONE = true; - + _saved_filenames.push_back(_whole_file_path+"/"+file_name); } diff --git a/src/ShadowScapesAnalysis.cpp b/src/ShadowScapesAnalysis.cpp index c39a34f..b2a4b21 100755 --- a/src/ShadowScapesAnalysis.cpp +++ b/src/ShadowScapesAnalysis.cpp @@ -211,7 +211,10 @@ void ShadowScapesAnalysis::draw() void ShadowScapesAnalysis::save_cb(Timer& timer) { + _save_cnt++; + cout << "ShadowScapesAnalysis::saving...\n"; + string file_name; if(_dir == H) { @@ -227,6 +230,7 @@ void ShadowScapesAnalysis::save_cb(Timer& timer) } ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - _save_cnt++; - + + _saved_filenames.push_back(_whole_file_path+"/"+file_name); + } diff --git a/src/ShapeFromShadingAnalysis.cpp b/src/ShapeFromShadingAnalysis.cpp index 5bb67dd..3bc8200 100755 --- a/src/ShapeFromShadingAnalysis.cpp +++ b/src/ShapeFromShadingAnalysis.cpp @@ -306,7 +306,10 @@ void ShapeFromShadingAnalysis::draw() } ofDisableAlphaBlending(); - } + } else { + + _RUN_DONE = true; + } _frame_cnt++; //cout << "_frame_cnt:" << _frame_cnt << endl; @@ -337,14 +340,14 @@ void ShapeFromShadingAnalysis::draw() // this runs at save_cb timer rate = DELTA_T_SAVE void ShapeFromShadingAnalysis::save_cb(Timer& timer) { - //cout << "ShapeFromShadingAnalysis::saving...\n"; + _save_cnt++; + + cout << "ShapeFromShadingAnalysis::saving...\n"; string file_name = ofToString(_save_cnt,2)+"_"+ quad +"_"+ofToString(_run_cnt,2)+".jpg"; ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - _save_cnt++; - //if(_save_cnt >= NUM_SAVE_PER_RUN) - // _RUN_DONE = true; + _saved_filenames.push_back(_whole_file_path+"/"+file_name); } diff --git a/src/StrobeAnalysis.cpp b/src/StrobeAnalysis.cpp index 5778165..ebbd4dd 100755 --- a/src/StrobeAnalysis.cpp +++ b/src/StrobeAnalysis.cpp @@ -152,17 +152,16 @@ void StrobeAnalysis::draw() // this runs at save_cb timer rate = DELTA_T_SAVE void StrobeAnalysis::save_cb(Timer& timer) { - string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(_strobe_on) +"_"+ofToString(_run_cnt,2)+".jpg"; - ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); + _save_cnt++; - cout << "_save_cnt" << _save_cnt << endl; + cout << "StrobeAnalysis::saving...\n"; - cout << "_save_cnt_max" << _save_cnt_max << endl; + string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(_strobe_on) +"_"+ofToString(_run_cnt,2)+".jpg"; - //TODO: something fucked here with my calc of _save_cnt_max - new structure should fix it? - //if(_save_cnt >= _save_cnt_max-10) { - // _RUN_DONE = true; - //} + ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); + + _saved_filenames.push_back(_whole_file_path+"/"+file_name); + }