read_legacy#

read_legacy(filename, progress_bar=False)[source]#

Use VTK’s legacy reader to read a file.

Deprecated since version 0.35.0: This function is deprecated. Use pyvsista.read() instead.

This uses vtk.vtkDataSetReader to read the data.

Parameters:
filenamestr

The string path to the file to read.

progress_barbool, default: False

Optionally show a progress bar.

Returns:
pyvista.DataSet

Wrapped pyvista mesh.

Examples

Load an example mesh using the legacy reader.

>>> import pyvista
>>> from pyvista import examples
>>> mesh = pyvista.read_legacy(examples.uniformfile)