MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / loadCameraParameters

Method loadCameraParameters

visualization/src/interactor_style.cpp:185–216  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

183
184//////////////////////////////////////////////////////////////////////////////////////////////
185bool
186pcl::visualization::PCLVisualizerInteractorStyle::loadCameraParameters (const std::string &file)
187{
188 std::ifstream fs;
189 std::string line;
190 std::vector<std::string> camera;
191 bool ret;
192
193 fs.open (file.c_str ());
194 if (!fs.is_open ())
195 {
196 return (false);
197 }
198 while (!fs.eof ())
199 {
200 getline (fs, line);
201 if (line.empty())
202 continue;
203
204 boost::split (camera, line, boost::is_any_of ("/"), boost::token_compress_on);
205 break;
206 }
207 fs.close ();
208
209 ret = getCameraParameters (camera);
210 if (ret)
211 {
212 camera_file_ = file;
213 }
214
215 return (ret);
216}
217
218/////////////////////////////////////////////////////////////////////////////////////////////
219void

Callers

nothing calls this directly

Calls 4

splitFunction · 0.85
openMethod · 0.45
emptyMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected