diff --git a/src/CamNoiseAnalysis.cpp b/src/CamNoiseAnalysis.cpp index e7b2355..f0b5c13 100755 --- a/src/CamNoiseAnalysis.cpp +++ b/src/CamNoiseAnalysis.cpp @@ -152,14 +152,13 @@ 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; + cout << "ColorSingleAnalysis::saving...\n"; + + string file_name = ofToString(_save_cnt,2)+"_"+ ofToString(c,2)+"_"+ofToString(_run_cnt,2)+".jpg"; - string file = _whole_file_path+"/"+file_name; - ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - _saved_filenames.push_back(file); + _saved_filenames.push_back(_whole_file_path+"/"+file_name); //if(_save_cnt >= NUM_SAVE_PER_RUN) // _RUN_DONE = true; diff --git a/src/ColorMultiAnalysis.cpp b/src/ColorMultiAnalysis.cpp index 02a5873..55adcde 100755 --- a/src/ColorMultiAnalysis.cpp +++ b/src/ColorMultiAnalysis.cpp @@ -176,16 +176,14 @@ void ColorMultiAnalysis::save_cb(Timer& timer) { _save_cnt++; - // UPDATE THE COLOR ON THE SCREEN - //float c_last = c; - - // cout << "COLORMULTIANALYSIS::saving...\n"; - // cout << "c_last... " << c << endl; + cout << "ColorMultiAnalysis::saving...\n"; + 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; //} diff --git a/src/ColorSingleAnalysis.cpp b/src/ColorSingleAnalysis.cpp index 0ee5153..464a112 100755 --- a/src/ColorSingleAnalysis.cpp +++ b/src/ColorSingleAnalysis.cpp @@ -156,14 +156,14 @@ 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; diff --git a/src/DiffNoiseAnalysis.cpp b/src/DiffNoiseAnalysis.cpp index 54e635b..0b7df2d 100755 --- a/src/DiffNoiseAnalysis.cpp +++ b/src/DiffNoiseAnalysis.cpp @@ -167,30 +167,16 @@ 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) { - + _save_cnt++; + 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..27ed0c2 100755 --- a/src/IResponseAnalysis.cpp +++ b/src/IResponseAnalysis.cpp @@ -110,19 +110,17 @@ void IResponseAnalysis::draw() // this runs at save_cb timer rate = DELTA_T_SAVE 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); + _saved_filenames.push_back(_whole_file_path+"/"+file_name); + //if(_save_cnt >= NUM_SAVE_PER_RUN) // _RUN_DONE = true; } diff --git a/src/RelaxRateAnalysis.cpp b/src/RelaxRateAnalysis.cpp index 521e049..74be19e 100755 --- a/src/RelaxRateAnalysis.cpp +++ b/src/RelaxRateAnalysis.cpp @@ -128,17 +128,15 @@ 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; + + ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); - string file = _whole_file_path+"/"+file_name; - - ofSaveImage(RefractiveIndex::_pixels, file, OF_IMAGE_QUALITY_BEST); + _saved_filenames.push_back(_whole_file_path+"/"+file_name); - _saved_filenames.push_back(file); - //if(_save_cnt >= NUM_SAVE_PER_RUN) // _RUN_DONE = true; diff --git a/src/ShadowScapesAnalysis.cpp b/src/ShadowScapesAnalysis.cpp index c39a34f..f68a9ef 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,8 @@ 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..a006b75 100755 --- a/src/ShapeFromShadingAnalysis.cpp +++ b/src/ShapeFromShadingAnalysis.cpp @@ -306,7 +306,9 @@ void ShapeFromShadingAnalysis::draw() } ofDisableAlphaBlending(); - } + } else { + _RUN_DONE = true; + } _frame_cnt++; //cout << "_frame_cnt:" << _frame_cnt << endl; @@ -339,10 +341,16 @@ 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++; + + _saved_filenames.push_back(_whole_file_path+"/"+file_name); //if(_save_cnt >= NUM_SAVE_PER_RUN) // _RUN_DONE = true; diff --git a/src/StrobeAnalysis.cpp b/src/StrobeAnalysis.cpp index 5778165..3944c30 100755 --- a/src/StrobeAnalysis.cpp +++ b/src/StrobeAnalysis.cpp @@ -152,13 +152,17 @@ 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"; + + ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST); + + _saved_filenames.push_back(_whole_file_path+"/"+file_name); + //TODO: something fucked here with my calc of _save_cnt_max - new structure should fix it? //if(_save_cnt >= _save_cnt_max-10) {