pysdic.PointCloud.to_vtk_file#

PointCloud.to_vtk_file(file_path, *, make_dirs=False, binary=False, only_finite=False, save_properties=True, use_module='meshio')[source]#

Save the point cloud to a legacy VTK file (.vtk, only for 3D point clouds).

The points are saved as vertex cells, and the properties as point data.

Warning

VTK cannot handle NaN or infinite coordinates: use only_finite=True to skip these points. Some property shapes may also not be supported by VTK.

Parameters:
  • file_path (Union[str, os.PathLike]) – The path to the output file, with the extension .vtk.

  • make_dirs (bool, optional (default: False)) – If True, the missing parent directories are created.

  • binary (bool, optional (default: False)) – If True, the file is written in binary format.

  • only_finite (bool, optional (default: False)) – If True, the points with non-finite coordinates are skipped. Otherwise, a ValueError is raised if such points exist.

  • save_properties (bool, optional (default: True)) – If False, the properties are not saved.

  • use_module (str, optional (default: "meshio")) – The package used to write the file: "meshio", "pyvista" or "vtk" (see to_meshio(), to_pyvista() and to_vtk()).

Return type:

None