代码拉取完成,页面将自动刷新
#include "stdafx.h"
#include "Visualizer.h"
#include "GlobalAppState.h"
int _tmain(int argc, _TCHAR* argv[])
{
Visualizer callback;
std::string fileNameDescGlobalApp = "zParametersScan.txt";
std::string scanDir = "";
if (argc == 3) { //overwrite scanDir with command line args
std::wstring argParam = std::wstring(argv[1]);
std::wstring argScanDir = std::wstring(argv[2]);
fileNameDescGlobalApp =std::string(argParam.begin(), argParam.end());
scanDir = std::string(argScanDir.begin(), argScanDir.end());
}
std::cout << VAR_NAME(fileNameDescGlobalApp) << " = " << fileNameDescGlobalApp << std::endl;
ParameterFile parameterFileGlobalApp(fileNameDescGlobalApp);
GlobalAppState::get().readMembers(parameterFileGlobalApp);
if (!scanDir.empty()) GlobalAppState::get().s_scanDir = scanDir;
GlobalAppState::get().print();
//get image size
unsigned int colorWidth = 0, colorHeight = 0;
scanDir = GlobalAppState::get().s_scanDir;
scanDir = util::replace(scanDir, '\\', '/');
if (scanDir.back() != '/') scanDir.push_back('/');
const std::string scanName = util::split(scanDir, "/").back();
const std::string metaFile = scanDir + scanName + ".txt";
if (util::fileExists(metaFile)) {
ParameterFile pf(metaFile);
if (!pf.readParameter<unsigned int>("colorWidth", colorWidth)) {
std::cerr << "ERROR: failed to read \"colorWidth\" param from " << metaFile << std::endl;
return -1;
};
if (!pf.readParameter<unsigned int>("colorHeight", colorHeight)) {
std::cerr << "ERROR: failed to read \"colorHeight\" param from " << metaFile << std::endl;
return -1;
};
}
else {
std::cout << "ERROR: meta-file (" << metaFile << ") does not exist! " << std::endl;
return -1;
}
ApplicationWin32 app(NULL, colorWidth, colorHeight, "Project Annotations", GraphicsDeviceTypeD3D11, callback);
app.messageLoop();
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。