How does paraview read a vtk file?

北慕城南 提交于 2019-12-25 08:47:26

问题


I have a general question as to how paraview reads a ASCII UNSTRUCTURED_GRID.

Does it sort through the cells and then points? or points then cells?


回答1:


Paraview is built on the VTK library and both of them are open source, so if you are a programmer, you should be able to get all your answers by reading the code. What I assume (but I can be wrong, check sources of paraview to be sure) paraview uses for reading ASCII unstructured grids is vtkUnstructuredGridReader, source code of which you can find here: https://github.com/Kitware/VTK/blob/master/IO/Legacy/vtkUnstructuredGridReader.cxx (and here is the parent class that implements a lot of the functionality the reader uses https://github.com/Kitware/VTK/blob/master/IO/Legacy/vtkDataReader.cxx). Look at the RequestData method, the variable "output" is the outputted unstructured data.

To briefly answer your initial question, it looks like points are read before cells.



来源:https://stackoverflow.com/questions/45020452/how-does-paraview-read-a-vtk-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!