コアAPI#
Kitware によって開発された Visualization Toolkit (VTK) には,PyVistaがラップする多くのメッシュデータ型があります.この章では,これらの異なるメッシュタイプと,VTKでこれらのメッシュタイプをラップして実装する方法について説明します.また,すべてのPyVistaタイプが共通のVTKフィルタ( フィルタ を参照)に直接アクセスする方法についても説明します.
すべてのPyVistaメッシュは,DataSet型( データセット を参照)から継承されます.PyVistaには次のメッシュタイプがあります.
pyvista.PointSetis used to represent a set of points. This is to provide an interface for datasets that explicitly use "point" arrays to represent geometry. Thepyvista.PointSetclass is an extension of vtkPointSet.pyvista.PolyDataconsists of any 1D or 2D geometries to construct vertices, lines, polygons, and triangles. We generally usepyvista.PolyDatato construct scattered points and closed/open surfaces (non-volumetric datasets). Thepyvista.PolyDataclass is an extension of vtkPolyData.A
pyvista.UnstructuredGridis the most general dataset type that can hold any 1D, 2D, or 3D cell geometries. You can think of this as a 3D extension ofpyvista.PolyDatathat allows volumetric cells to be present. It's fairly uncommon to explicitly make unstructured grids but they are often the result of different processing routines that might extract subsets of larger datasets. Thepyvista.UnstructuredGridclass is an extension of vtkUnstructuredGrid.A
pyvista.StructuredGridis a regular lattice of points aligned with internal coordinate axes such that the connectivity can be defined by a grid ordering. These are commonly made fromnumpy.meshgrid(). The cell types of structured grids must be 2D quads or 3D hexahedra. Thepyvista.StructuredGridclass is an extension of vtkStructuredGrid.A
pyvista.RectilinearGriddefines meshes with implicit geometries along the axis directions that are rectangular and regular. Thepyvista.RectilinearGridclass is an extension of vtkRectilinearGrid.Image data, commonly referred to as uniform grids, and defined by the
pyvista.ImageDataclass are meshes with implicit geometries where cell sizes are uniformly assigned along each axis and the spatial reference is built out from an origin point. Thepyvista.ImageDataclass is an extension of vtkImageData.pyvista.MultiBlockデータセットは,複数のVTKデータセットを1つのアクセス可能かつ空間的に参照されるオブジェクトに保持するためのコンテナです.pyvista.MultiBlockクラスは vtkMultiBlockDataSet の拡張です.pyvista.PartitionedDataSetdatasets are composite dataset to encapsulates a dataset consisting of partitions. Thepyvista.PartitionedDataSetclass is an extension of vtkPartitionedDataSet.