pyvista.PNMReader#

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

PNMReader for .pnm files.

Examples

>>> import pyvista
>>> from pyvista import examples
>>> filename = examples.download_gourds_pnm(load=False)
>>> filename.split("/")[-1]  # omit the path
'Gourds.pnm'
>>> reader = pyvista.get_reader(filename)
>>> mesh = reader.read()
>>> mesh.plot()
../../../_images/pyvista-PNMReader-1_00_00.png

Methods

PNMReader.hide_progress()

Hide the progress bar when loading the file.

PNMReader.read()

Read data in file.

PNMReader.show_progress([msg])

Show a progress bar when loading the file.

Attributes

PNMReader.path

Return or set the filename or directory of the reader.

PNMReader.reader

Return the vtk Reader object.