pyvista.VTKDataSetReader

Contents

pyvista.VTKDataSetReader#

class VTKDataSetReader(*args, **kwargs)[source]#

VTK Data Set Reader for .vtk files.

Notes

This reader calls ReadAllScalarsOn, ReadAllColorScalarsOn, ReadAllNormalsOn, ReadAllTCoordsOn, ReadAllVectorsOn, and ReadAllFieldsOn on the underlying vtkDataSetReader.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> filename = examples.download_brain(load=False)
>>> filename.split('/')[-1]  # omit the path
'brain.vtk'
>>> reader = pv.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

Attributes