pyvista.DataSet

class DataSet(*args, **kwargs)

Methods in common to spatially referenced objects.

Methods

DataSet.add_field_array(scalars, name[, deep])

Add field data.

DataSet.add_field_data(array, name[, deep])

Add field data.

DataSet.cast_to_unstructured_grid()

Get a new representation of this object as a pyvista.UnstructuredGrid.

DataSet.cell_bounds(ind)

Return the bounding box of a cell.

DataSet.cell_centers([vertex, progress_bar])

Generate points at the center of the cells in this dataset.

DataSet.cell_data_to_point_data([...])

Transform cell data into point data.

DataSet.cell_n_points(ind)

Return the number of points in a cell.

DataSet.cell_points(ind)

Return the points in a cell.

DataSet.cell_type(ind)

Return the type of a cell.

DataSet.clear_arrays()

Remove all arrays from point/cell/field data.

DataSet.clear_cell_arrays()

Remove all cell data.

DataSet.clear_cell_data()

Remove all cell arrays.

DataSet.clear_data()

Remove all arrays from point/cell/field data.

DataSet.clear_field_arrays()

Remove all field data.

DataSet.clear_field_data()

Remove all field data.

DataSet.clear_point_arrays()

Remove all point data.

DataSet.clear_point_data()

Remove all point arrays.

DataSet.clear_textures()

Clear the textures from this mesh.

DataSet.clip([normal, origin, invert, ...])

Clip a dataset by a plane by specifying the origin and normal.

DataSet.clip_box([bounds, invert, factor, ...])

Clip a dataset by a bounding box defined by the bounds.

DataSet.clip_scalar([scalars, invert, ...])

Clip a dataset by a scalar.

DataSet.clip_surface(surface[, invert, ...])

Clip any mesh type using a pyvista.PolyData surface mesh.

DataSet.compute_cell_quality([...])

Compute a function of (geometric) quality for each cell of a mesh.

DataSet.compute_cell_sizes([length, area, ...])

Compute sizes for 1D (length), 2D (area) and 3D (volume) cells.

DataSet.compute_derivative([scalars, ...])

Compute derivative-based quantities of point/cell scalar field.

DataSet.compute_implicit_distance(surface[, ...])

Compute the implicit distance from the points to a surface.

DataSet.connectivity([largest, progress_bar])

Find and label connected bodies/volumes.

DataSet.contour([isosurfaces, scalars, ...])

Contour an input self by an array.

DataSet.copy([deep])

Return a copy of the object.

DataSet.copy_attributes(dataset)

Copy the data attributes of the input dataset object.

DataSet.copy_meta_from(ido)

Copy pyvista meta data onto this object from another object.

DataSet.copy_structure(dataset)

Copy the structure (geometry and topology) of the input dataset object.

DataSet.ctp([pass_cell_data, progress_bar])

Transform cell data into point data.

DataSet.decimate_boundary([...])

Return a decimated version of a triangulation of the boundary.

DataSet.deep_copy(to_copy)

Overwrite this data object with another data object as a deep copy.

DataSet.delaunay_3d([alpha, tol, offset, ...])

Construct a 3D Delaunay triangulation of the mesh.

DataSet.elevation([low_point, high_point, ...])

Generate scalar values on a dataset.

DataSet.extract_all_edges([progress_bar])

Extract all the internal/external edges of the dataset as PolyData.

DataSet.extract_cells(ind[, progress_bar])

Return a subset of the grid.

DataSet.extract_feature_edges([...])

Extract edges from the surface of the mesh.

DataSet.extract_geometry([progress_bar])

Extract the outer surface of a volume or structured grid dataset.

DataSet.extract_largest([inplace, progress_bar])

Extract largest connected set in mesh.

DataSet.extract_points(ind[, ...])

Return a subset of the grid (with cells) that contains any of the given point indices.

DataSet.extract_surface([pass_pointid, ...])

Extract surface mesh of the grid.

DataSet.find_closest_cell(point)

Find index of closest cell in this mesh to the given point.

DataSet.find_closest_point(point[, n])

Find index of closest point in this mesh to the given point.

DataSet.flip_normal(normal[, point, ...])

Flip mesh about the normal.

DataSet.flip_x([point, ...])

Flip mesh about the x-axis.

DataSet.flip_y([point, ...])

Flip mesh about the y-axis.

DataSet.flip_z([point, ...])

Flip mesh about the z-axis.

DataSet.get_array(name[, preference])

Search both point, cell and field data for an array.

DataSet.get_array_association(name[, preference])

Get the association of an array.

DataSet.get_data_range([arr_var, preference])

Get the non-NaN min and max of a named array.

DataSet.glyph([orient, scale, factor, geom, ...])

Copy a geometric representation (called a glyph) to the input dataset.

DataSet.head([display, html])

Return the header stats of this dataset.

DataSet.interpolate(target[, sharpness, ...])

Interpolate values onto this mesh from a given dataset.

DataSet.merge([grid, merge_points, inplace, ...])

Join one or many other grids to this grid.

DataSet.outline([generate_faces, progress_bar])

Produce an outline of the full extent for the input dataset.

DataSet.outline_corners([factor, progress_bar])

Produce an outline of the corners for the input dataset.

DataSet.overwrite(mesh)

Overwrite this dataset inplace with the new dataset's geometries and data.

DataSet.plot([off_screen, full_screen, ...])

Plot a vtk or numpy object.

DataSet.plot_over_circular_arc(pointa, ...)

Sample a dataset along a circular arc and plot it.

DataSet.plot_over_circular_arc_normal(center)

Sample a dataset along a resolution circular arc defined by a normal and polar vector and plot it.

DataSet.plot_over_line(pointa, pointb[, ...])

Sample a dataset along a high resolution line and plot.

DataSet.point_data_to_cell_data([...])

Transform point data into cell data.

DataSet.points_to_double()

Convert the points datatype to double precision.

DataSet.probe(points[, tolerance, ...])

Sample data values at specified point locations.

DataSet.ptc([pass_point_data, progress_bar])

Transform point data into cell data.

DataSet.reconstruct_surface([nbr_sz, ...])

Reconstruct a surface from the points in this dataset.

DataSet.reflect(normal[, point, inplace, ...])

Reflect a dataset across a plane.

DataSet.rename_array(old_name, new_name[, ...])

Change array name by searching for the array then renaming it.

DataSet.rotate_vector(vector, angle[, ...])

Rotate mesh about a vector.

DataSet.rotate_x(angle[, point, ...])

Rotate mesh about the x-axis.

DataSet.rotate_y(angle[, point, ...])

Rotate mesh about the y-axis.

DataSet.rotate_z(angle[, point, ...])

Rotate mesh about the z-axis.

DataSet.sample(target[, tolerance, ...])

Resample array data from a passed mesh onto this mesh.

DataSet.sample_over_circular_arc(pointa, ...)

Sample a dataset over a circular arc.

DataSet.sample_over_circular_arc_normal(center)

Sample a dataset over a circular arc defined by a normal and polar vector and plot it.

DataSet.sample_over_line(pointa, pointb[, ...])

Sample a dataset onto a line.

DataSet.save(filename[, binary, texture])

Save this vtk object to file.

DataSet.scale(xyz)

Scale the mesh.

DataSet.select_enclosed_points(surface[, ...])

Mark points as to whether they are inside a closed surface.

DataSet.set_active_scalars(name[, preference])

Find the scalars by name and appropriately sets it as active.

DataSet.set_active_tensors(name[, preference])

Find the tensors by name and appropriately sets it as active.

DataSet.set_active_vectors(name[, preference])

Find the vectors by name and appropriately sets it as active.

DataSet.shallow_copy(to_copy)

Shallow copy the given mesh to this mesh.

DataSet.shrink([shrink_factor, progress_bar])

Shrink the individual faces of a mesh.

DataSet.slice([normal, origin, ...])

Slice a dataset by a plane at the specified origin and normal vector orientation.

DataSet.slice_along_axis([n, axis, ...])

Create many slices of the input dataset along a specified axis.

DataSet.slice_along_line(line[, ...])

Slice a dataset using a polyline/spline as the path.

DataSet.slice_orthogonal([x, y, z, ...])

Create three orthogonal slices through the dataset on the three cartesian planes.

DataSet.split_bodies([label, progress_bar])

Find, label, and split connected bodies/volumes.

DataSet.streamlines([vectors, ...])

Integrate a vector field to generate streamlines.

DataSet.streamlines_evenly_spaced_2D([...])

Generate evenly spaced streamlines on a 2D dataset.

DataSet.streamlines_from_source(source[, ...])

Generate streamlines of vectors from the points of a source mesh.

DataSet.surface_indices([progress_bar])

Return the surface indices of a grid.

DataSet.texture_map_to_plane([origin, ...])

Texture map this dataset to a user defined plane.

DataSet.texture_map_to_sphere([center, ...])

Texture map this dataset to a user defined sphere.

DataSet.threshold([value, scalars, invert, ...])

Apply a vtkThreshold filter to the input dataset.

DataSet.threshold_percent([percent, ...])

Threshold the dataset by a percentage of its range on the active scalars array.

DataSet.transform(trans[, ...])

Transform this mesh with a 4x4 transform.

DataSet.translate(xyz)

Translate the mesh.

DataSet.triangulate([inplace, progress_bar])

Return an all triangle mesh.

DataSet.warp_by_scalar([scalars, factor, ...])

Warp the dataset's points by a point data scalars array's values.

DataSet.warp_by_vector([vectors, factor, ...])

Warp the dataset's points by a point data vectors array's values.

Attributes

DataSet.active_normals

Return the active normals as an array.

DataSet.active_scalars

Return the active scalars as an array.

DataSet.active_scalars_info

Return the active scalar's association and name.

DataSet.active_scalars_name

Return the name of the active scalars.

DataSet.active_t_coords

Return or set the active texture coordinates on the points.

DataSet.active_tensors

Return the active tensors array.

DataSet.active_tensors_info

Return the active tensor's field and name: [field, name].

DataSet.active_tensors_name

Return the name of the active tensor array.

DataSet.active_vectors

Return the active vectors array.

DataSet.active_vectors_info

Return the active vector's association and name.

DataSet.active_vectors_name

Return the name of the active vectors array.

DataSet.actual_memory_size

Return the actual size of the dataset object.

DataSet.array_names

Return a list of array names for the dataset.

DataSet.arrows

Return a glyph representation of the active vector data as arrows.

DataSet.bounds

Return the bounding box of this dataset.

DataSet.cell_arrays

Return vtkCellData as DataSetAttributes.

DataSet.cell_data

Return vtkCellData as DataSetAttributes.

DataSet.center

Return the center of the bounding box.

DataSet.extent

Return the range of the bounding box.

DataSet.field_arrays

Return vtkFieldData as DataSetAttributes.

DataSet.field_data

Return FieldData as DataSetAttributes.

DataSet.length

Return the length of the diagonal of the bounding box.

DataSet.memory_address

Get address of the underlying VTK C++ object.

DataSet.n_arrays

Return the number of arrays present in the dataset.

DataSet.n_cells

Return the number of cells in the entire dataset.

DataSet.n_points

Return the number of points in the entire dataset.

DataSet.number_of_cells

Return the number of cells.

DataSet.number_of_points

Return the number of points.

DataSet.point_arrays

Return vtkPointData as DataSetAttributes.

DataSet.point_data

Return vtkPointData as DataSetAttributes.

DataSet.points

Return a reference to the points as a numpy object.

DataSet.t_coords

Return the active texture coordinates on the points.

DataSet.textures

Return a dictionary to hold compatible vtk.vtkTexture objects.

DataSet.vectors

Return active vectors.

DataSet.volume

Return the mesh volume.