[Paraview] XML UnstructuredGrid With Multiple Parts

Brad King brad.king at kitware.com
Tue Nov 9 07:10:43 EST 2004


RAVINDRANATH LANKA wrote:
> I want to write Unstructured Grid/Field data in XML format with multiple 
> parts.

Use vtkXMLPUnstructuredGridWriter (note the "P" stands for partitioned) 
to create a sample file.  It can be used to refer to the other parts. 
The restriction is that all parts have to have the same arrays because 
the format is meant for multiple piece processing of the same data set.

Alternatively save a data set from ParaView using the "pvd" format. 
This format is a collection that can be used to reference arbitrary 
other files, but it cannot store any of its own data in the file.

> I would also like to use the base64 encoding with the Appended element 
> tag containing all the data. I have a few questions with regards to this.
> 
> i. Does paraview read the part names from the part tags.

To what "Part" tag do you refer?  I'm not aware of any ParaView or VTK 
format that uses "Part" as an element name.

> ii. Is there any XML schema that I can refer to understand the usage of 
> appended data section. (file_format.pdf doesn't explain it all)

Unfortunately not.  The layout of the section is implemented in 
ParaView/VTK/IO/vtkXMLWriter.cxx and the corresponding subclasses.  It 
is somewhat complicated to allow random access despite base64 encoding 
and optional compression with zlib.

> iii. Further, Can we have an appended section that is a child of 
> collection object that each of the parts could refer to.

No.  That is why it is called the "Appended" data section.  Its whole 
purpose is to be at the end so that the file can be read by parsing the 
XML in the beginning and then using random access seeks to get to the 
data.  You can however use the inline binary mode which requires base64 
encoding.  In this mode the data for each <DataArray> element are inline 
inside the element.

-Brad


More information about the ParaView mailing list