PolyDataFilters#

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

An internal class to manage filters/algorithms for polydata datasets.

Inherited Attributes#

_BoundsSizeMixin.bounds_size

Return the size of each axis of the object’s bounding box.

Methods#

PolyDataFilters.append_polydata(*meshes[, ...])

Append one or more PolyData into this one.

PolyDataFilters.boolean_difference(other_mesh)

Perform a boolean difference operation between two meshes.

PolyDataFilters.boolean_intersection(other_mesh)

Perform a boolean intersection operation on two meshes.

PolyDataFilters.boolean_union(other_mesh[, ...])

Perform a boolean union operation on two meshes.

PolyDataFilters.clean([point_merging, ...])

Clean the mesh.

PolyDataFilters.clip_closed_surface([...])

Clip a closed polydata surface with a plane.

PolyDataFilters.collision(other_mesh[, ...])

Perform collision determination between two polyhedral surfaces.

PolyDataFilters.compute_arc_length([...])

Compute the arc length over the length of the probed line.

PolyDataFilters.compute_normals([...])

Compute point and/or cell normals for a mesh.

PolyDataFilters.contour_banded(n_contours[, ...])

Generate filled contours.

PolyDataFilters.curvature([curv_type, ...])

Return the point-wise curvature of a mesh.

PolyDataFilters.decimate(target_reduction[, ...])

Reduce the number of triangles in a triangular mesh using vtkQuadricDecimation.

PolyDataFilters.decimate_polyline(reduction, *)

Reduce the number of lines in a polyline mesh.

PolyDataFilters.decimate_pro(reduction[, ...])

Reduce the number of triangles in a triangular mesh.

PolyDataFilters.delaunay_2d([tol, alpha, ...])

Apply a 2D Delaunay filter along the best fitting plane.

PolyDataFilters.edge_mask(angle[, progress_bar])

Return a mask of the points of a surface mesh with a surface angle greater than angle.

PolyDataFilters.extrude(vector[, capping, ...])

Sweep polygonal data creating a "skirt" from free edges.

PolyDataFilters.extrude_rotate([resolution, ...])

Sweep polygonal data creating "skirt" from free edges/lines, and lines from vertices.

PolyDataFilters.extrude_trim(direction, ...)

Extrude polygonal data trimmed by a surface.

PolyDataFilters.fill_holes(hole_size[, ...])

Fill holes in a pyvista.PolyData or vtkPolyData object.

PolyDataFilters.flip_faces(*[, inplace, ...])

Flip the orientation of the faces.

PolyDataFilters.flip_normal_vectors(*[, ...])

Flip the direction of the mesh's point and cell normal vectors.

PolyDataFilters.flip_normals()

Flip normals of a triangular mesh by reversing the point ordering.

PolyDataFilters.geodesic(start_vertex, ...)

Calculate the geodesic path between two vertices using Dijkstra's algorithm.

PolyDataFilters.geodesic_distance(...[, ...])

Calculate the geodesic distance between two vertices using Dijkstra's algorithm.

PolyDataFilters.intersection(mesh[, ...])

Compute the intersection between two meshes.

PolyDataFilters.merge(dataset[, ...])

Merge this mesh with one or more datasets.

PolyDataFilters.multi_ray_trace(origins, ...)

Perform multiple ray trace calculations.

PolyDataFilters.plot_boundaries([...])

Plot boundaries of a mesh.

PolyDataFilters.plot_curvature([curv_type])

Plot the curvature.

PolyDataFilters.plot_normals([show_mesh, ...])

Plot the point normals of a mesh.

PolyDataFilters.project_points_to_plane([...])

Project points of this mesh to a plane.

PolyDataFilters.protein_ribbon([progress_bar])

Generate protein ribbon.

PolyDataFilters.ray_trace(origin, end_point)

Perform a single ray trace calculation.

PolyDataFilters.reconstruct_surface([...])

Reconstruct a surface from the points in this dataset.

PolyDataFilters.remove_points(remove[, ...])

Rebuild a mesh by removing points.

PolyDataFilters.remove_unused_points(*[, ...])

Remove points which are not used by any cells.

PolyDataFilters.ribbon([width, scalars, ...])

Create a ribbon of the lines in this dataset.

PolyDataFilters.ruled_surface(*[, ...])

Create a ruled surface from a polyline.

PolyDataFilters.smooth([n_iter, ...])

Adjust point coordinates using Laplacian smoothing.

PolyDataFilters.smooth_taubin([n_iter, ...])

Smooth a PolyData DataSet with Taubin smoothing.

PolyDataFilters.strip([join, max_length, ...])

Strip poly data cells.

PolyDataFilters.subdivide(nsub[, subfilter, ...])

Increase the number of triangles in a single, connected triangular mesh.

PolyDataFilters.subdivide_adaptive([...])

Increase the number of triangles in a triangular mesh based on edge and/or area metrics.

PolyDataFilters.triangulate(*[, pass_verts, ...])

Return an all triangle mesh.

PolyDataFilters.triangulate_contours([...])

Triangulate and fill all 2D contours to create polygons.

PolyDataFilters.tube([radius, scalars, ...])

Generate a tube around each input line.

Filters#

DataSetFilters.align

Align a dataset to another.

DataSetFilters.align_xyz

Align a dataset to the x-y-z axes.

DataSetFilters.bounding_box

Return a bounding box for this dataset.

DataObjectFilters.cell_centers

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

DataObjectFilters.cell_data_to_point_data

Transform cell data into point data.

DataObjectFilters.cell_quality

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

DataObjectFilters.cell_validator

Check the validity of each cell in this dataset.

DataObjectFilters.clip

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

DataObjectFilters.clip_box

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

DataSetFilters.clip_scalar

Clip a dataset by a scalar.

DataObjectFilters.clip_slab

Clip a dataset by a slab of finite thickness around a plane.

DataSetFilters.clip_surface

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

DataSetFilters.color_labels

Add RGB(A) scalars to labeled data.

DataSetFilters.compute_boundary_mesh_quality

Compute metrics on the boundary faces of a mesh.

DataObjectFilters.compute_cell_sizes

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

DataSetFilters.compute_derivative

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

DataSetFilters.compute_implicit_distance

Compute the implicit distance from the points to a surface.

DataSetFilters.connectivity

Find and label connected regions.

DataSetFilters.contour

Contour an input self by an array.

DataObjectFilters.convex_hull

Compute the convex hull from this mesh’s points.

DataObjectFilters.ctp

Transform cell data into point data.

DataSetFilters.decimate_boundary

Return a decimated version of a triangulation of the boundary.

DataSetFilters.delaunay_3d

Construct a 3D Delaunay triangulation of the mesh.

DataObjectFilters.elevation

Generate scalar values on a dataset.

DataSetFilters.explode

Push each individual cell away from the center of the dataset.

DataObjectFilters.extract_all_edges

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

DataSetFilters.extract_cells

Return a subset of the grid.

DataSetFilters.extract_cells_by_type

Extract cells of a specified type.

DataSetFilters.extract_feature_edges

Extract edges from the surface of the mesh.

DataSetFilters.extract_geometry

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

DataSetFilters.extract_largest

Extract largest connected set in mesh.

DataSetFilters.extract_points

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

DataObjectFilters.extract_surface

Extract surface geometry of the mesh as PolyData.

DataSetFilters.extract_values

Return a subset of the mesh based on the values of point or cell data.

DataObjectFilters.flip_normal

Flip mesh about the normal.

DataObjectFilters.flip_x

Flip mesh about the x-axis.

DataObjectFilters.flip_y

Flip mesh about the y-axis.

DataObjectFilters.flip_z

Flip mesh about the z-axis.

DataSetFilters.gaussian_splatting

Splat points into a volume using a Gaussian distribution.

DataSetFilters.glyph

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

DataSetFilters.integrate_data

Integrate point and cell data.

DataSetFilters.interpolate

Interpolate values onto this mesh from a given dataset.

DataSetFilters.merge_points

Merge duplicate points in this mesh.

DataSetFilters.oriented_bounding_box

Return an oriented bounding box (OBB) for this dataset.

DataSetFilters.outline

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

DataSetFilters.outline_corners

Produce an outline of the corners for the input dataset.

DataSetFilters.pack_labels

Renumber labeled data such that labels are contiguous.

DataSetFilters.partition

Break down input dataset into a requested number of partitions.

DataSetFilters.plot_over_circular_arc

Sample a dataset along a circular arc and plot it.

DataSetFilters.plot_over_circular_arc_normal

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

DataSetFilters.plot_over_line

Sample a dataset along a high resolution line and plot.

DataObjectFilters.point_data_to_cell_data

Transform point data into cell data.

DataObjectFilters.ptc

Transform point data into cell data.

DataObjectFilters.reflect

Reflect a dataset across a plane.

DataSetFilters.remove_nan_cells

Remove cells whose scalar values are NaN.

DataObjectFilters.resize

Resize the dataset’s bounds.

DataObjectFilters.rotate

Rotate mesh about a point with a rotation matrix or Rotation object.

DataObjectFilters.rotate_vector

Rotate mesh about a vector.

DataObjectFilters.rotate_x

Rotate mesh about the x-axis.

DataObjectFilters.rotate_y

Rotate mesh about the y-axis.

DataObjectFilters.rotate_z

Rotate mesh about the z-axis.

DataObjectFilters.sample

Resample array data from a passed mesh onto this mesh.

DataSetFilters.sample_over_circular_arc

Sample a dataset over a circular arc.

DataSetFilters.sample_over_circular_arc_normal

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

DataSetFilters.sample_over_line

Sample a dataset onto a line.

DataSetFilters.sample_over_multiple_lines

Sample a dataset onto a multiple lines.

DataObjectFilters.scale

Scale the mesh.

DataSetFilters.select_enclosed_points

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

DataSetFilters.select_interior_points

Mark points from this mesh as inside or outside relative to a closed surface.

DataSetFilters.separate_cells

Return a copy of the dataset with separated cells with no shared points.

DataSetFilters.shrink

Shrink the individual faces of a mesh.

DataObjectFilters.slice

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

DataObjectFilters.slice_along_axis

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

DataObjectFilters.slice_along_line

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

DataObjectFilters.slice_implicit

Slice a dataset by a VTK implicit function.

DataObjectFilters.slice_orthogonal

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

DataSetFilters.sort_labels

Sort labeled data by number of points or cells.

DataSetFilters.split_bodies

Find, label, and split connected bodies/volumes.

DataSetFilters.split_values

Split mesh into separate sub-meshes using point or cell data.

DataSetFilters.streamlines

Integrate a vector field to generate streamlines.

DataSetFilters.streamlines_evenly_spaced_2D

Generate evenly spaced streamlines on a 2D dataset.

DataSetFilters.streamlines_from_source

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

DataSetFilters.surface_indices

Return the surface indices of a grid.

DataSetFilters.tessellate

Tessellate a mesh.

DataSetFilters.texture_map_to_plane

Texture map this dataset to a user defined plane.

DataSetFilters.texture_map_to_sphere

Texture map this dataset to a user defined sphere.

DataSetFilters.threshold

Apply a vtkThreshold filter to the input dataset.

DataSetFilters.threshold_percent

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

DataObjectFilters.transform

Transform this mesh with a 4x4 transform.

DataObjectFilters.translate

Translate the mesh.

DataObjectFilters.validate_mesh

Validate this mesh’s array data, points, and cells.

DataSetFilters.voxelize

Voxelize mesh to UnstructuredGrid.

DataSetFilters.voxelize_binary_mask

Voxelize mesh as a binary ImageData mask.

DataSetFilters.voxelize_rectilinear

Voxelize mesh to create a RectilinearGrid voxel volume.

DataSetFilters.warp_by_scalar

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

DataSetFilters.warp_by_vector

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