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

Method initializeBuffers

plugins/e57/io/E57Reader.cpp:68–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void E57Reader::initializeBuffers()
69{
70 m_doubleBuffers.clear();
71 m_destBuffers.clear();
72 m_e57PointPrototype.reset(new StructureNode(m_scan->getPointPrototype()));
73
74 // Initialize for supported dimensions.
75 auto supportedFields = e57plugin::supportedE57Types();
76 for (auto& dimension : supportedFields)
77 {
78 if (m_e57PointPrototype->isDefined(dimension))
79 {
80 m_doubleBuffers[dimension] =
81 std::vector<double>(m_defaultChunkSize, 0);
82 }
83 }
84
85 // Initialize for extra dimensions.
86 for (auto i = m_extraDims->begin(); i != m_extraDims->end(); ++i)
87 {
88 if (m_e57PointPrototype->isDefined(i->m_name))
89 {
90 m_doubleBuffers[i->m_name] =
91 std::vector<double>(m_defaultChunkSize, 0);
92 }
93 }
94
95 // Link to destination buffers.
96 for (auto& keyValue : m_doubleBuffers)
97 {
98 m_destBuffers.emplace_back(
99 *m_imf, keyValue.first, keyValue.second.data(), m_defaultChunkSize,
100 true,
101 (m_e57PointPrototype->get(keyValue.first).type() ==
102 e57::E57_SCALED_INTEGER));
103 }
104}
105
106void E57Reader::addDimensions(PointLayoutPtr layout)
107{

Callers

nothing calls this directly

Calls 10

supportedE57TypesFunction · 0.85
getPointPrototypeMethod · 0.80
clearMethod · 0.45
resetMethod · 0.45
isDefinedMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
dataMethod · 0.45
typeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected