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.
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.
(read/write using vtkm dataset reader/writer)
All kinds of exmaples for the online example
Check the IO section for more details
Documents for the data writer
Some online examples I have sorted out bfore