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

Method initialize

plugins/e57/io/E57Reader.cpp:175–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void E57Reader::initialize()
176{
177 try
178 {
179 arbiter::Arbiter arb;
180 arbiter::LocalHandle fileHandle = arb.getLocalHandle(m_filename);
181 m_imf.reset(new ImageFile(fileHandle.localPath(), "r"));
182 StructureNode root = m_imf->root();
183
184 if (!root.isDefined("/data3D"))
185 {
186 throwError("File doesn't contain 3D data");
187 }
188
189 const e57::ustring normalsExtension(
190 "http://www.libe57.org/E57_NOR_surface_normals.txt");
191 e57::ustring _normalsExtension;
192
193 // the extension may already be registered
194 if (!m_imf->extensionsLookupPrefix("nor", _normalsExtension))
195 m_imf->extensionsAdd("nor", normalsExtension);
196
197 m_data3D.reset(new VectorNode(root.get("/data3D")));
198
199 }
200 catch (E57Exception& e)
201 {
202 throwError(std::to_string(e.errorCode()) + " : " + e.context());
203 }
204 catch (std::exception& e)
205 {
206 throwError(e.what());
207 }
208}
209
210void E57Reader::ready(PointTableRef& ref)
211{

Callers

nothing calls this directly

Calls 9

getLocalHandleMethod · 0.80
errorCodeMethod · 0.80
resetMethod · 0.45
rootMethod · 0.45
isDefinedMethod · 0.45
extensionsAddMethod · 0.45
getMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected