One of the task for visulization software is to change the format of data back and force between different types. This blog includes some notes about the vtk io.
Which reader or writer should be used
Version info
The vision 5.1 is not well supported for some software such as Visit. Try to use the SetFileVersion(42) if the generated file can not be properly loaded into the software.
For the imageData, use the vtkStructurePoints reader/writer, instead of the imageDataReader or writer.
Examples
(read/write using vtkm dataset reader/writer)
//reader example |
References
All kinds of exmaples for the online example
https://kitware.github.io/vtk-examples/site/Cxx/
Check the IO section for more details
Documents for the data writer
https://vtk.org/doc/nightly/html/classvtkDataWriter.html
Some online examples I have sorted out bfore