mid-commit AbstractAnalysis::saveimage
This commit is contained in:
parent
3649211943
commit
b5cebe9304
@ -316,3 +316,13 @@ int AbstractAnalysis::getRecordedValueFromFileName(string str){
|
||||
}
|
||||
|
||||
|
||||
void AbstractAnalysis::saveimage(string filename)
|
||||
{
|
||||
if(RefractiveIndex::_pixels.isAllocated()) {
|
||||
ofSaveImage(RefractiveIndex::_pixels, filename, OF_IMAGE_QUALITY_BEST);
|
||||
_saved_filenames.push_back(filename);
|
||||
} else {
|
||||
ofLog(OF_LOG_ERROR) << "RefractiveIndex::_pixels NOT allocated...";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ public:
|
||||
protected:
|
||||
|
||||
virtual void create_dir();
|
||||
virtual void saveimage(string filename);
|
||||
|
||||
// acquire images - all the children (see - do_synthesize)
|
||||
virtual void acquire() = 0;
|
||||
|
||||
@ -419,10 +419,10 @@ void ShapeFromShadingAnalysis::save_cb(Timer& timer)
|
||||
{
|
||||
//cout << "ShapeFromShadingAnalysis::saving...\n";
|
||||
|
||||
string file_name = ofToString(_save_cnt,2)+"_"+ quad +"_"+ofToString(_run_cnt,2)+".jpg";
|
||||
_saved_filenames.push_back(ofToDataPath("")+_whole_file_path+"/"+file_name);
|
||||
|
||||
ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST);
|
||||
string file_name = ofToString(_save_cnt,2)+"_"+ quad +"_"+ofToString(_run_cnt,2)+".jpg";
|
||||
|
||||
saveimage(file_name);
|
||||
|
||||
_save_cnt++;
|
||||
|
||||
//if(_save_cnt >= NUM_SAVE_PER_RUN)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user