pyvista.VTKDataSetReader

class VTKDataSetReader(filename)

VTK Data Set Reader for .vtk files.

Examples

>>> import pyvista
>>> from pyvista import examples
>>> filename = examples.download_brain(load=False)
>>> filename.split("/")[-1]  # omit the path
'brain.vtk'
>>> reader = pyvista.get_reader(filename)
>>> mesh = reader.read()
>>> sliced_mesh = mesh.slice('x')
>>> sliced_mesh.plot(cpos='yz', show_scalar_bar=False)
../../../_images/pyvista-VTKDataSetReader-1_00_00.png

Methods

VTKDataSetReader.read()

Read data in file.

Attributes

VTKDataSetReader.reader

Return the vtk Reader object.