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

Method fillFields

io/PcdReader.cpp:129–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129bool PcdReader::fillFields()
130{
131 while (true)
132 {
133 if (!m_istreamPtr->good())
134 return false;
135
136 std::string buf;
137
138 std::getline(*m_istreamPtr, buf);
139 m_line++;
140 if (buf.empty())
141 continue;
142
143 Utils::trim(buf);
144 m_fields = Utils::split(buf, [](char c) { return c == '\t' || c == '\r' || c == ' '; });
145 if (m_fields.size() != m_dims.size())
146 {
147 log()->get(LogLevel::Error)
148 << "Line " << m_line << " in '" << m_filename << "' contains "
149 << m_fields.size() << " fields when " << m_dims.size()
150 << " were expected. "
151 "Ignoring."
152 << std::endl;
153 continue;
154 }
155 return true;
156 }
157}
158
159bool PcdReader::processOne(PointRef& point)
160{

Callers

nothing calls this directly

Calls 6

trimFunction · 0.85
splitFunction · 0.85
logFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected