Read vtk files (created from paraview) into Matlab
193 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Walter Roberson
le 4 Déc 2022
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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Point Cloud Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!