pysdic.PointCloud.from_vtk#
- classmethod PointCloud.from_vtk(filepath, load_properties=True)[source]#
Create a
PointCloudobject from a VTK file (only for 3D point clouds).The VTK file should contain vertex definitions. Only vertices are read; faces and other elements are ignored.
The points are extracted using
meshiolibrary.See also
to_vtk()method for saving the point cloud to a VTK file.
Warning
This method only works for 3-dimensional point clouds, as VTK format is primarily used for 3D data.
- Parameters:
- Returns:
A
PointCloudobject containing the points read from the VTK file.- Return type:
Examples
Creating a
PointCloudobject from a VTK file.1from pysdic import PointCloud 2# Create a point cloud from a VTK file 3point_cloud = PointCloud.from_vtk('path/to/point_cloud.vtk')
Now,
point_cloudis aPointCloudobject containing the points read from the specified VTK file.