PyVista provides class based readers to have more control over reading data files. These classes allows for more fine-grained control over reading datasets from files. See pyvista.get_reader() for a list of file types supported.

Also, see Load data using a Reader for a full example using reader classes.

get_reader(filename[, force_ext])

Get a reader for fine-grained control of reading data files.

Reader Classes#

AVSucdReader(*args, **kwargs)

AVSucdReader for .inp files.

BMPReader(*args, **kwargs)

BMP Reader for .bmp files.

BYUReader(*args, **kwargs)

BYU Reader for .g files.

BinaryMarchingCubesReader(*args, **kwargs)

BinaryMarchingCubes Reader for .tri files.

CGNSReader(*args, **kwargs)

CGNS Reader for .cgns files.

DEMReader(*args, **kwargs)

DEM Reader for .dem files.

DICOMReader(*args, **kwargs)

DICOM Reader for reading .dcm files.

EnSightReader(*args, **kwargs)

EnSight Reader for .case files.

FacetReader(*args, **kwargs)

Facet Reader for .facet files.

FLUENTCFFReader(*args, **kwargs)

FLUENTCFFReader for .h5 files.

FluentReader(*args, **kwargs)

FluentReader for .cas files.

GambitReader(*args, **kwargs)

GambitReader for .neu files.

GaussianCubeReader(*args, **kwargs)

GaussianCubeReader for .cube files.

GESignaReader(*args, **kwargs)

GESignaReader for .MR files.

GIFReader(*args, **kwargs)

GIFReader for .gif files.

GLTFReader(*args, **kwargs)

GLTFeader for .gltf and .glb files.

HDFReader(*args, **kwargs)

HDFReader for .hdf files.

HDRReader(*args, **kwargs)

HDRReader for .hdr files.

JPEGReader(*args, **kwargs)

JPEG Reader for .jpeg and .jpg files.

MFIXReader(*args, **kwargs)

MFIXReader for .res files.

MetaImageReader(*args, **kwargs)

Meta Image Reader for .mha and .mhd files.

MINCImageReader(*args, **kwargs)

MINCImageReader for .mnc files.

MultiBlockPlot3DReader(*args, **kwargs)

MultiBlock Plot3D Reader.

NIFTIReader(*args, **kwargs)

NIFTI Reader for .nii and .nii.gz files.

NRRDReader(*args, **kwargs)

NRRDReader for .nrrd and .nhdr files.

OBJReader(*args, **kwargs)

OBJ Reader for reading .obj files.

OpenFOAMReader(*args, **kwargs)

OpenFOAM Reader for .foam files.

ParticleReader(*args, **kwargs)

ParticleReader for .raw files.

PDBReader(*args, **kwargs)

PDBReader for .pdb files.

PLYReader(*args, **kwargs)

PLY Reader for reading .ply files.

PNGReader(*args, **kwargs)

PNGReader for .png files.

PNMReader(*args, **kwargs)

PNMReader for .pnm files.

POpenFOAMReader(*args, **kwargs)

Parallel OpenFOAM Reader for .foam files.

PTSReader(*args, **kwargs)

PTSReader for .pts files.

PVDReader(*args, **kwargs)

PVD Reader for .pvd files.

Plot3DMetaReader(*args, **kwargs)

Plot3DMeta Reader for .p3d files.

ProStarReader(*args, **kwargs)

ProStarReader for .vrt files.

SLCReader(*args, **kwargs)

SLCReader for .slc files.

STLReader(*args, **kwargs)

STL Reader for .stl files.

SegYReader(*args, **kwargs)

SegYReader for .sgy and .segy files.

TIFFReader(*args, **kwargs)

TIFFReader for .tif and .tiff files.

TecplotReader(*args, **kwargs)

Tecplot Reader for ascii .dat files.

VTKDataSetReader(*args, **kwargs)

VTK Data Set Reader for .vtk files.

VTKPDataSetReader(*args, **kwargs)

Parallel VTK Data Set Reader for .pvtk files.

XMLImageDataReader(*args, **kwargs)

XML Image Data Reader for .vti files.

XMLMultiBlockDataReader(*args, **kwargs)

XML MultiBlock Data Reader for .vtm or .vtmb files.

XMLPImageDataReader(*args, **kwargs)

Parallel XML Image Data Reader for .pvti files.

XMLPRectilinearGridReader(*args, **kwargs)

Parallel XML RectilinearGrid Reader for .pvtr files.

XMLPUnstructuredGridReader(*args, **kwargs)

Parallel XML UnstructuredGrid Reader for .pvtu files.

XMLPartitionedDataSetReader(*args, **kwargs)

XML PartitionedDataSet Reader for reading .vtpd files.

XMLPolyDataReader(*args, **kwargs)

XML PolyData Reader for .vtp files.

XMLRectilinearGridReader(*args, **kwargs)

XML RectilinearGrid Reader for .vtr files.

XMLStructuredGridReader(*args, **kwargs)

XML StructuredGrid Reader for .vts files.

XMLUnstructuredGridReader(*args, **kwargs)

XML UnstructuredGrid Reader for .vtu files.

XdmfReader(*args, **kwargs)

XdmfReader for .xdmf files.

Inherited Classes#

The pyvista.BaseReader is inherited by all sub-readers. It has the basic functionality of all readers to set filename and read the data.

The PointCellDataSelection is inherited by readers that support inspecting and setting data related to point and cell arrays.

The TimeReader is inherited by readers that support inspecting and setting time or iterations for reading.

BaseReader(*args, **kwargs)

The Base Reader class.


Mixin for readers that support data array selections.


Abstract class for readers supporting time.


Enumerations are available to simplify inputs to certain readers.