[Paraview] vtk collection

Karl König kkoenig11 at web.de
Thu Jul 26 04:41:32 EDT 2012


Matthias,

VTR is the file extension for XML based rectilinear grid files, see e.g.
http://markmail.org/message/kewmge6o4ygh2wpr for two example files.

If you have to manually specify "Legacy VTK" as input format, chances
are you are actually trying to load a VTK file, not VTR. If your file
looks like

# vtk DataFile Version 2.0
Field
ASCII
DATASET STRUCTURED_GRID
DIMENSIONS 3 6 3
POINTS 54 float
1.000000 0.000000 1.000000
2.000000 0.000000 1.000000
3.000000 0.000000 1.000000
....

then you have the file extension wrong as this is VTK legacy format, not
VTR. If not, you probably have found a bug.

If, however, you do indeed have legacy VTK files, there is no way to add
time information to them. Especially not with a PVD collection file,
because PVD files can not point to the legacy VTK files, they can only
point to the newer XML based vt? (vtu/vtp/vti etc) files, see
http://markmail.org/message/cbndehqm2dycezce. You need to switch to
either a XML based format to in order to be able to use a PVD collection
file or switch to a completely different file format like ExodusII,
Ensight, XDMF etc.

Karl


Zenker, Dr. Matthias wrote, On 26.07.2012 10:20:
> Hi,
>  
> I want to write a VTK xml file for a time collection. So far, I have
> used the following syntax, as found in this document:
>  
>  
> <VTKFile type="Collection" version="0.1"
> byte_order="LittleEndian"><Collection>
> <DataSet timestep="   0.200E+00" group="" part="0" file="./step_1.vtu"/>
> <DataSet timestep="   0.400E+00" group="" part="0" file="./step_2.vtu"/>
>   </Collection></VTKFile>
>  
> This works well for binary vtu files. Now I want to use ASCII vtr files.
> With the syntax shown above, Paraview (3.12.0-RC2) throws me the
> following errors:
>  
> snip -------------------------------------------------------
>  
> ERROR: In ..\..\..\..\source\VTK\IO\vtkXMLParser.cxx, line 483
> vtkXMLDataParser (10FD4B80): Error parsing XML in stream at line 1,
> column 1, byte index 1: not well-formed (invalid token)
>  
> ERROR: In ..\..\..\..\source\VTK\IO\vtkXMLReader.cxx, line 362
> vtkXMLRectilinearGridReader (1118D898): Error parsing input file. 
> ReadXMLInformation aborting.
>  
> ERROR: In ..\..\..\..\source\VTK\Filtering\vtkExecutive.cxx, line 756
> vtkCompositeDataPipeline (10D5BF48): Algorithm
> vtkXMLRectilinearGridReader(1118D898) returned failure for request:
> vtkInformation (11186FD0)
>   Debug: Off
>   Modified Time: 79093
>   Reference Count: 1
>   Registered Events: (none)
>   Request: REQUEST_INFORMATION
>   FORWARD_DIRECTION: 0
>   ALGORITHM_AFTER_FORWARD: 1
>  
> ERROR: In ..\..\..\..\source\VTK\IO\vtkXMLParser.cxx, line 483
> vtkXMLDataParser (1119A038): Error parsing XML in stream at line 1,
> column 1, byte index 1: not well-formed (invalid token)
>  
>  
> ERROR: In ..\..\..\..\source\VTK\IO\vtkXMLReader.cxx, line 362
> vtkXMLRectilinearGridReader (111F5180): Error parsing input file. 
> ReadXMLInformation aborting.
>  
> ERROR: In ..\..\..\..\source\VTK\Filtering\vtkExecutive.cxx, line 756
> vtkCompositeDataPipeline (1109B840): Algorithm
> vtkXMLRectilinearGridReader(111F5180) returned failure for request:
> vtkInformation (111F0F18)
>   Debug: Off
>   Modified Time: 134363
>   Reference Count: 1
>   Registered Events: (none)
>   Request: REQUEST_INFORMATION
>   FORWARD_DIRECTION: 0
>   ALGORITHM_AFTER_FORWARD: 1
>  
> ERROR: In ..\..\..\..\source\VTK\IO\vtkXMLParser.cxx, line 483
> vtkXMLDataParser (13E849D0): Error parsing XML in stream at line 1,
> column 1, byte index 1: not well-formed (invalid token)
>  
> ERROR: In ..\..\..\..\source\VTK\IO\vtkXMLReader.cxx, line 362
> vtkXMLRectilinearGridReader (13E8D8D8): Error parsing input file. 
> ReadXMLInformation aborting.
>  
> ERROR: In ..\..\..\..\source\VTK\Filtering\vtkExecutive.cxx, line 756
> vtkCompositeDataPipeline (0FDA54B0): Algorithm
> vtkXMLRectilinearGridReader(13E8D8D8) returned failure for request:
> vtkInformation (13E85830)
>   Debug: Off
>   Modified Time: 189309
>   Reference Count: 1
>   Registered Events: (none)
>   Request: REQUEST_INFORMATION
>   FORWARD_DIRECTION: 0
>   ALGORITHM_AFTER_FORWARD: 1
>  
> snap -------------------------------------------
>  
> Opening the vtr files directly works without problems (except that
> ParaView doesn’t seem to recognize the extension .vtr by itself, I have
> to manually specify “Legacy vtk” as input format).
>  
> Questions:
>  
> 
>  1. What do I have to change in the pvd file syntax?
>  2. Is there a vtk syntax reference where I can learn more about the vtk
>     collections?
> 
>  
> Thank you,
>  
> Matthias
>  
> 
> 
> _____________________________________________________________________
> ERBE Elektromedizin GmbH
> Firmensitz: 72072 Tuebingen
> Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
> Registergericht: Stuttgart HRB 380137



More information about the ParaView mailing list