[vtkusers] Possible Bug in vtkXMLReader when reading timeseries

Simon Praetorius Simon.Praetorius at tu-dresden.de
Fri Sep 23 12:07:13 EDT 2016


I have found an old issue in the mantis bug-tracker addressing this  
topic: #15723

The answer was: "VTK file format does not support saving several time  
steps in a file" and a reference to the file-format description was  
given. This description (version 4.2.) is definitely not complete,  
thus it can not be an indicator for a support of writing timeseries or  
not.

Although the file-format description does not show support for  
timeseries, at least in older vtk versions (before 6.3) it was  
supported. The source code of the XMLreader shows all the necessary  
parts to read the time-series, all the corresponding attributes are  
interpreted. The only problem is a change in the handling of duplicate  
names. This was done about a year ago in merge request !488. Since  
there is no test that reads back the files generated by  
`IO/XML/Testing/Cxx/TestXMLCInterface.c` no error could be detected.  
The corresponding test to create the file was removed in June 2016.

Thus, the questions are:
- Is this feature quietly removed from VTK, or removed by accident  
since only few people use it?
- Is the documentation of the file-format incomplete or the  
implementation simply not cleaned up?
- Should the test for duplicate array names be rewritten in order to  
allow timeseries again?
- There should be at least a comment in the file-format description  
that duplicate array names are not allowed!

Maybe this issue could be forwarded to the developer mailing list.

Simon


Zitat von Simon Praetorius <Simon.Praetorius at tu-dresden.de>:

> Hi,
>
> When reading a VTK XML-file that includes timesteps, the  
> `vtkXMLDataReader:282` throws an error that multiple arrays with the  
> same name are present in the file. In general this is a valid test  
> and the error is correct, except for the case that multiple  
> timesteps are written in the file. An example file can be created by  
> the test `IO/XML/Testing/Cxx/TestXMLCInterface.c`:
>
> ```xml
> <Piece NumberOfPoints="8" NumberOfCells="1">
>   <PointData Scalars="example data">
>     <DataArray type="Float32" Name="example data" TimeStep="0"  
> format="appended" RangeMin="0" RangeMax="0" offset="0" />
>     <DataArray type="Float32" Name="example data" TimeStep="1"  
> format="appended" RangeMin="1" RangeMax="1" offset="240" />
>     <!-- ... -->
>   </PointData>
> </Piece>
> ```
> Here all DataArrays refer to the same dataset at different timesteps.
>
> Reading back this file, using a `VTLXMLUnstructuredGridReader` (e.g.  
> `Examples/IO/Cxx/DumpXMLFile.cxx`), produced the error above:
>
> ```
> vtkXMLDataReader.cxx, line 282: Duplicate array names.
> ```
>
> Writing TimeSteps seems to be supported by the XMLReader and the  
> XMLWriter. Maybe the `vtkXMLWriterC` is not valid/compatible any  
> more? Is the structure of the vtk format changed when writing  
> timeseries, compared to the xml-code shown above?
> (I'm referring to the VTK version 7.0.0, when naming line-numbers.)
>
>
> This issue refers to an old ParaView issue #5542  
> (http://www.paraview.org/Bug/view.php?id=5542). The file was  
> readable with at least vtk-5.2 and paraview-3.6.2.
>
> Simon
>
> -- 
> Dr. Simon Praetorius
> Institut für Wissenschaftliches Rechnen
> Fachrichtung Mathematik
> Technische Universität Dresden
> Tel.: TUD-42377
> Mail: simon.praetorius at tu-dresden.de
> Web: www.math.tu-dresden.de/~spraetor



-- 
Dr. Simon Praetorius
Institut für Wissenschaftliches Rechnen
Fachrichtung Mathematik
Technische Universität Dresden
Tel.: TUD-42377
Mail: simon.praetorius at tu-dresden.de
Web: www.math.tu-dresden.de/~spraetor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5733 bytes
Desc: S/MIME-Signatur
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160923/4d4099fa/attachment.bin>


More information about the vtkusers mailing list