本文整理汇总了C++中Projector::setOutputFileName方法的典型用法代码示例。如果您正苦于以下问题:C++ Projector::setOutputFileName方法的具体用法?C++ Projector::setOutputFileName怎么用?C++ Projector::setOutputFileName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projector
的用法示例。
在下文中一共展示了Projector::setOutputFileName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
pmeshname = atoi(optarg);
}
break;
}
case '?':
default: // help
{
std::cout << "Usage: " << argv[0] << " [options] "
<< "InputFile InputProjectionFile [outputfile]"
<< std::endl;
std::cout << "where options are: " << std::endl;
std::cout << " -p pmesh number 6=LeastSqrs 8=Bilinear "
<< "9=bicubic" << std::endl;
std::cout << " -n pmeshsize" << std::endl;
std::cout << " -l logfile for timings " << std::endl;
std::cout << " -s number where number is the output scale"
<< std::endl;
std::cout << " -S forces output scale same length as input scale"
<< std::endl;
std::cout << " -? this help screen" << std::endl;
return 0;
}
}
if (optind > argc-2 || argv[optind+1] == NULL)
{
std::cout << "You must specify a input file and a input projection file"
<< std::endl
<< "See -h for help" << std::endl;
return 0;
}
else
{
filename = std::string(argv[optind++]);
parameterfile = std::string(argv[optind++]);
}
if (parameterfile == std::string(" ") || filename == std::string(" "))
{
std::cout << "You must specify a input file and parameter file "
<< "use -help for options" << std::endl;
return 0;
}
outproj = SetProjection(parameterfile);
if (!outproj)
{
std::cout << "Could not create the output projection!"
<< std::endl;
return 0;
}
//check for the time file
if (timefile)
{
out.open(logname.c_str()); //open the ouput file
start = time(NULL); //get the start
out << start << std::endl; //output the start
}
if (optind == argc-1)
{
projector.setOutputFileName(std::string(argv[optind]));
}
projector.setOutputProjection(outproj);
projector.setPmeshName(pmeshname);
projector.setPmeshSize(pmeshsize);
if (!samescale)
projector.setOutputScale(newscale);
else
projector.setSameScale(true);
projector.setInputFile(filename);
projector.project(&progress);
if (timefile)
{
finish = time(NULL);
out << finish << std::endl;
out << (finish - start);
out.close();
}
return 0;
}
catch(ProjectorException & temp)
{
std::cout << temp.getExceptionMessage() << std::endl;
return 0;
}
catch(...)
{
std::cout << "An unkown exception has been thrown" << std::endl;
return 0;
}
}