| 26 | { |
| 27 | |
| 28 | Viewer::Viewer(System* pSystem, FrameDrawer *pFrameDrawer, MapDrawer *pMapDrawer, Tracking *pTracking, const string &strSettingPath, Settings* settings): |
| 29 | both(false), mpSystem(pSystem), mpFrameDrawer(pFrameDrawer),mpMapDrawer(pMapDrawer), mpTracker(pTracking), |
| 30 | mbFinishRequested(false), mbFinished(true), mbStopped(true), mbStopRequested(false) |
| 31 | { |
| 32 | if(settings){ |
| 33 | newParameterLoader(settings); |
| 34 | } |
| 35 | else{ |
| 36 | |
| 37 | cv::FileStorage fSettings(strSettingPath, cv::FileStorage::READ); |
| 38 | |
| 39 | bool is_correct = ParseViewerParamFile(fSettings); |
| 40 | |
| 41 | if(!is_correct) |
| 42 | { |
| 43 | std::cerr << "**ERROR in the config file, the format is not correct**" << std::endl; |
| 44 | try |
| 45 | { |
| 46 | throw -1; |
| 47 | } |
| 48 | catch(exception &e) |
| 49 | { |
| 50 | |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | mbStopTrack = false; |
| 56 | } |
| 57 | |
| 58 | void Viewer::newParameterLoader(Settings *settings) { |
| 59 | mImageViewerScale = 1.f; |
nothing calls this directly
no outgoing calls
no test coverage detected