Read vtk files (created from paraview) into Matlab
193 次查看(过去 30 天)
显示 更早的评论
Hi, I have many vtk files storing the velocity field information, which is created in Paraview. Now I want to import them into Matlab to do the proper orthogonal decomposition, so I need to convert the data into matrix. Is there any way to read the raw data files with the format of VTK into Matlab? Thanks!!
File format is unsupported for uploading, but it has the following structure:
# vtk DataFile Version 2.0
sampleSurface
ASCII
DATASET POLYDATA
POINTS 65994 double
-8.48e-09 -0.494167 2.49037e-18
-0.020125 -0.493765 -7.0605e-18
0.020125 -0.493765 -4.2448e-18
-0.0402182 -0.492564 3.31633e-18
0.0402182 -0.492564 2.02627e-18
-0.0602486 -0.490573 6.79711e-18
....
POLYGONS 130656 522624
3 62271 62194 62506
3 62398 62506 62194
3 62562 62341 62387
3 62562 62387 62506
3 62271 62387 62341
...
POINT_DATA 65994
FIELD attributes 1
vorticity 3 65994 float
-3.96689e-21 -1.08047e-19 6.97702
8.57664e-19 -2.68243e-19 7.95412
-6.37119e-19 -2.19501e-19 6.03446
-3.00809e-19 -1.42912e-19 8.96011
....
0 个评论
采纳的回答
Walter Roberson
2022-12-4
See https://www.mathworks.com/matlabcentral/fileexchange/106610-vtk-read-and-write-package or https://www.mathworks.com/matlabcentral/fileexchange/94993-vtktoolbox for an interface to the official VTK library
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!