问题
I have a simulation in C++ which generates huge amount of data. Right now I am using MATLAB libraries to save the results as a .mat file, but eventually I will be needing an open source binary format. I don't want to implement my own binary format and ASCII is not an option. I heard that VTK provides .vtk binary file format for saving 3d data structures, which is exactly what I need. Is there a good C/C++ library for reading/writing VTK files?
回答1:
Yes, there is a good library providing .vtk files I/O, and it is called... wait for it... VTK! :)
http://www.vtk.org/doc/release/4.2/html/classvtkUnstructuredGridWriter.html
http://www.vtk.org/doc/release/4.2/html/classvtkUnstructuredGridReader.html
(There are many other readers/writers to suit your data type).
来源:https://stackoverflow.com/questions/2063606/c-c-library-for-vtk-io