XMLUnstructuredGridReader#

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

XML UnstructuredGrid Reader for .vtu files.

Wraps vtkXMLUnstructuredGridReader.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> from pyvista import examples
>>> from pathlib import Path
>>> filename = examples.download_notch_displacement(load=False)
>>> Path(filename).name
'notch_disp.vtu'
>>> reader = pv.get_reader(filename)
>>> mesh = reader.read()
>>> mesh.plot(
...     scalars='Nodal Displacement',
...     component=0,
...     cpos='xy',
...     show_scalar_bar=False,
... )
../../../_images/pyvista-XMLUnstructuredGridReader-d4b4ceb988b2bdcf_00_00.png

Inheritance#

Inherited members are documented on BaseReader, _FileIOBase, PointCellDataSelection.

See them all under Inherited Attributes and Inherited Methods.

Inherited Attributes#

PointCellDataSelection.all_cell_arrays_status

Return the status of all cell arrays.

PointCellDataSelection.all_point_arrays_status

Return the status of all point arrays.

PointCellDataSelection.cell_array_names

Return the list of all cell array names.

_FileIOBase.extension_patterns

Return mapping from regex pattern matching associated with this class.

_FileIOBase.extensions

Return the file extensions associated with this class.

PointCellDataSelection.number_cell_arrays

Return the number of cell arrays.

PointCellDataSelection.number_point_arrays

Return the number of point arrays.

BaseReader.path

Return or set the filename or directory of the reader.

PointCellDataSelection.point_array_names

Return the list of all point array names.

BaseReader.reader

Return the vtk Reader object.

Inherited Methods#

PointCellDataSelection.cell_array_status

Get status of cell array with name.

PointCellDataSelection.disable_all_cell_arrays

Disable all cell arrays.

PointCellDataSelection.disable_all_point_arrays

Disable all point arrays.

PointCellDataSelection.disable_cell_array

Disable cell array with name.

PointCellDataSelection.disable_point_array

Disable point array with name.

PointCellDataSelection.enable_all_cell_arrays

Enable all cell arrays.

PointCellDataSelection.enable_all_point_arrays

Enable all point arrays.

PointCellDataSelection.enable_cell_array

Enable cell array with name.

PointCellDataSelection.enable_point_array

Enable point array with name.

BaseReader.hide_progress

Hide the progress bar when loading the file.

PointCellDataSelection.point_array_status

Get status of point array with name.

BaseReader.read

Read data in file.

BaseReader.show_progress

Show a progress bar when loading the file.