bool CalibrationData::save(const std::string& filename){ std::string type = boost::filesystem::path(filename).extension().string(); if (type=="xml"){ return saveXML(filename); } else if(type=="slcalib"){ return saveSLCALIB(filename); } else if (type=="m"){ return saveMatlab(filename); } else { std::cerr << "CalibrationData error save: unknown file extension: " << type << std::endl; return false; } return false; }
bool CalibrationData::save(const QString& filename){ QFileInfo info(filename); QString type = info.suffix(); if (type=="xml"){ return saveXML(filename); } else if(type=="slcalib"){ return saveSLCALIB(filename); } else if (type=="m"){ return saveMatlab(filename); } else { std::cerr << "CalibrationData error save: unknown file extension: " << type.toStdString() << std::endl; return false; } return false; }