MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / load_file

Method load_file

splashsurf_lib/src/io/vtk_format.rs:40–46  ·  view source on GitHub ↗

Loads a VTK file from the given path and loads all its data pieces

(file_path: P)

Source from the content-addressed store, hash-verified

38
39 /// Loads a VTK file from the given path and loads all its data pieces
40 pub fn load_file<P: AsRef<Path>>(file_path: P) -> Result<Self, anyhow::Error> {
41 let file_path = file_path.as_ref();
42 let vtk_file = read_vtk(file_path)
43 .with_context(|| anyhow!("Failed to load VTK file \"{}\"", file_path.display()))?;
44
45 Self::from_vtk(vtk_file)
46 }
47
48 /// Returns all pieces that could be loaded from the VTK file
49 pub fn into_pieces(self) -> Vec<DataPiece> {

Callers

nothing calls this directly

Calls 2

read_vtkFunction · 0.85
with_contextMethod · 0.80

Tested by

no test coverage detected