/////////////////////////////////////////////////////////////////////////////////////////
| 183 | |
| 184 | ////////////////////////////////////////////////////////////////////////////////////////////// |
| 185 | bool |
| 186 | pcl::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 | ///////////////////////////////////////////////////////////////////////////////////////////// |
| 219 | void |