ParticleReader#

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

Reader for the VTK Particle format (.raw).

Wraps vtkParticleReader.

Added in version 0.44.0.

Warning

If the byte order is not set correctly, the reader will fail to read the file.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> from pyvista import examples
>>> from pathlib import Path
>>> filename = examples.download_particles(load=False)
>>> reader = pv.get_reader(filename)
>>> reader.endian = 'BigEndian'
>>> Path(filename).name
'Particles.raw'
>>> mesh = reader.read()
>>> mesh.plot()
../../../_images/pyvista-ParticleReader-48366b2736584726_00_00.png

Inheritance#

Inherited members are documented on BaseReader, _FileIOBase.

See them all under Inherited Attributes and Inherited Methods.

Attributes#

ParticleReader.endian

Return or set the byte order of the data, 'BigEndian' or 'LittleEndian'.

Inherited Attributes#

_FileIOBase.extension_patterns

Return mapping from regex pattern matching associated with this class.

_FileIOBase.extensions

Return the file extensions associated with this class.

_FileIOBase.format_description

Return the human-readable description of the file format.

BaseReader.path

Return or set the filename or directory of the reader.

BaseReader.reader

Return the vtk Reader object.

Inherited Methods#

BaseReader.hide_progress

Hide the progress bar when loading the file.

BaseReader.read

Read data in file.

BaseReader.show_progress

Show a progress bar when loading the file.