spkit.io
.read_vtk¶
- spkit.io.read_vtk(file_name, V_name='POINTS', F_name='POLYGONS', Nv_idx=1, Nf_idx=1)¶
Read VTK File
Generated by Imaging tools, contains vertices and faces of a geometry
- Parameters:
- file_namestr,
file name with full accessible path
- V_namestr,
key for vertices, default=’POINTS’
- F_namestr,
key for faces, default=’POLYGONS’
- Nv_idxint,
index to find the number of vertices
- Nf_idxint
index to find the number of faces
- Returns:
- V: 2d-array
Vertices
- F: 2d-array
Faces
Examples
>>> import spkit as sp >>> file_name = 'full_accessible_path/to_vtk_file.vtk' >>> V, F = sp.io.read_vtk(file_name)