XMLPolyDataReader#

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

XML PolyData Reader for .vtp files.

Wraps vtkXMLPolyDataReader.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> from pyvista import examples
>>> from pathlib import Path
>>> filename = examples.download_cow_head(load=False)
>>> Path(filename).name
'cowHead.vtp'
>>> reader = pv.get_reader(filename)
>>> mesh = reader.read()
>>> cpos = pv.CameraPosition(
...     position=(12, 3.5, -4.5), focal_point=(4.5, 1.6, 0), viewup=(0, 1, 0.3)
... )
>>> mesh.plot(
...     cpos=cpos,
...     clim=[0, 100],
...     show_scalar_bar=False,
... )
../../../_images/pyvista-XMLPolyDataReader-bb8eccb02de26a18_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.