capytaine.ui.vtk.helpers module¶
Tools for 3D displays with VTK.
- capytaine.ui.vtk.helpers.compute_node_data(mesh: Union[Mesh, CollectionOfMeshes], face_data)[source]¶
Transform data defined at the center of the faces to data defined at the nodes of the mesh by a simple averaging of the values of the neighboring faces.
- Parameters:
mesh (Mesh or CollectionOfMeshes) – the mesh on which the face face_data are defined
face_data (numpy array of shape (mesh.nb_faces, …)) – the data defined on the center of the faces of the mesh
- Returns:
node_data – the same data averaged on the nodes
- Return type:
numpy array of shape (mesh.nb_vertices, …)
- capytaine.ui.vtk.helpers.compute_vtk_polydata(mesh: Union[Mesh, CollectionOfMeshes])[source]¶
Transform a mesh into vtkPolydata.