예제 #1
0
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;
}
예제 #2
0
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;
}