Tries to read the given VTK file
(filename: P)
| 210 | |
| 211 | /// Tries to read the given VTK file |
| 212 | pub fn read_vtk<P: AsRef<Path>>(filename: P) -> Result<Vtk, anyhow::Error> { |
| 213 | let filename = filename.as_ref(); |
| 214 | let mut vtk_file = Vtk::import(filename)?; |
| 215 | vtk_file.load_all_pieces()?; |
| 216 | Ok(vtk_file) |
| 217 | } |
| 218 | |
| 219 | /// Loads all supported pieces of the given VTK file |
| 220 | fn load_pieces(vtk_file: Vtk) -> Result<Vec<DataPiece>, anyhow::Error> { |