ParticleReader#

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

ParticleReader for .raw files.

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

Attributes#

ParticleReader.endian

Get the byte order of the data.

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.

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.