MCPcopy Create free account
hub / github.com/PDAL/PDAL / initialize

Method initialize

io/PcdReader.cpp:292–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292void PcdReader::initialize()
293{
294 if (m_filename.empty())
295 throwError("Can't read PCD file without filename.");
296
297 m_istreamPtr = Utils::openFile(m_filename, true);
298 if (!m_istreamPtr)
299 throwError("Can't open file '" + m_filename + "'.");
300 try
301 {
302 m_header.clear();
303 *m_istreamPtr >> m_header;
304 }
305 catch( ... )
306 {
307 Utils::closeFile(m_istreamPtr);
308 m_istreamPtr = nullptr;
309 throw;
310 }
311 m_line = m_header.m_numLines;
312
313 Utils::closeFile(m_istreamPtr);
314}
315
316void PcdReader::done(PointTableRef table)
317{

Callers

nothing calls this directly

Calls 4

openFileFunction · 0.50
closeFileFunction · 0.50
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected