[SciPy-User] Announcement: Self-contained Python module to write binary VTK files.

Paulo Herrera pauloa.herrera at gmail.com
Tue Nov 30 05:13:18 EST 2010


Hi Sebastian,

I don't think it would be very difficult to read data back from a VTK file. In fact, I implemented a similar module in Java that also allowed reading back the data. 

The best approach to parse back the data is to read the XML header and process it with some standard XML library. From the XML header, one can get the position of the beginning of data array in the file.  Then, one only need to go to the position in the file where the data is stored and read it back.

On the other hand, I'm not sure the current VTK format is the best option to store large amount of data. So far, I've been using h5py to write HDF5 files for long-term storage and I only use my module to export data for visualization when I need it. My hope is that the VTK developers will adopt HDF5 as the future basis for a new VTK binary file format. XDMF is a good starting point but it seems it still needs more time before it becomes the default storage format.

Paulo

On Nov 30, 2010, at 10:50 AM, Sebastian Haase wrote:

> Hi Paulo,
> 
> how hard would it be to read back the types of VTK files that you can write ?
> This would be not only be useful to write tests ...
> But also to - say - write some basic data filters, or just using the
> VTK format for all I / O needs...
> 
> - Sebastian Haase




More information about the SciPy-User mailing list