[Paraview-developers] Re: [Paraview] ParaView 2.2 beta

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Jun 27 13:29:20 EDT 2005


Just a few more details about XML / TimeSteps support in VTK:

The idea behind was to be able to support TimeSteps using the same XML 
file format already being used. The challenge was to avoid splitting 
into multiple 'raw' files since they would not make sense on there own 
(at least not without a header). The solution was then to put all the 
data within the <DataArray> XML tag.

For example in binary mode (not appended), DataArray would look like:

<DataArray type="Float32" TimeStep="1" format="binary">
   AwAAAAAA....
</DataArray>
<DataArray type="Float32" TimeStep="4" format="binary">
   AwBBBBBB....
</DataArray>

For example in a UnstructuredGrid, you can define as many Points as you 
want, simple add another <DataArray> for each TimeStep.

Now all you need to do is define the TimeSteps above the <Piece> 
section, in the DataSet section, for instance:

<UnstructuredGrid TimeValues="0 20 40 60 80 100">

This means you have a dataset made of 6 timesteps. And the DataArray #0 
will refer to a TimeValue=0, TimeStep="1" would refer to TimeValue="20" ...

---------------------------------------------------------------------

Now let say your Points is not changing over time, there is no need to 
duplicate the DataArray. So you would just do:

<Points>
   <DataArray type="Float32" format="binary">
     AwAAAAAA....
   </DataArray>
</Points>

If you do not specify 'TimeStep' within the DataArray tag (but you did 
define a TimeValue in the DataSet section), then it make the DataArray 
valid for all timestep. As a side note this is internally stored and 
data are not being reread.

As a side this is perfectly legal to defined it as:


<Points>
   <DataArray type="Float32" TimeStep="0 1 2 3 4 5" format="binary">
     AwAAAAAA....
   </DataArray>
</Points>

---------------------------------------------------------------------

Finally this code is only a demonstration since the XML reader would be 
really slow on this type of XML file (binary, not appended). The 
recommended format (and the default in the VTK-XML Writer) is rather: 
Binary/Appended. All the remaining remarks remains true, we only need to 
introduced the 'offset' tag.

Let say that your Points is changing over time, like this:
- TimeStep 0 to 2 are the same,
- TimeStep 3 to 4 are the same,
- TimeStep 5 is the same as 0-2

You would then write in a Binary/Appended XML file:

<Points>
   <DataArray type="Float32" TimeStep="0 1 2" format="appended" offset="0"/>
   <DataArray type="Float32" TimeStep="3 4" format="appended" 
offset="129684"/>
   <DataArray type="Float32" TimeStep="5" format="appended" offset="0"/>
</Points>

Therefore when moving on to the next timestep, the appended section 
gives us an offset in the file to directly point to, making the reading 
much faster.
Note: Again another valid solution could be to write the first DataArray as:
...
<DataArray type="Float32" TimeStep="0 1 2 5" format="appended" offset="0"/>
...

---------------------------------------------------------------------
ATTENTION:
In the case of multiple PointData/CellData changing over time, you need 
to explictely specify a Name to differenciate the case.

<PointData>
   <DataArray type="Float32" TimeStep="0" format="appended" offset="0"/>
   <DataArray type="Float32" TimeStep="0" format="appended" offset="12"/>
   <DataArray type="Float32" TimeStep="1" format="appended" offset="34"/>
   ...
</PointData>

The third line could either describe the first PointData array or the 
second (there is no notion of implicit order). So you need to define a 
name to differenciate cases:


<PointData>
   <DataArray type="Float32" Name""foo" TimeStep="0" format="appended" 
offset="0"/>
   <DataArray type="Float32" Name="bar" TimeStep="0" format="appended" 
offset="12"/>
   <DataArray type="Float32" Name="bar" TimeStep="1" format="appended" 
offset="34"/>
   ...
</PointData>


Mathieu

Amy Squillacote wrote:
> Hi All,
> 
> The ParaView 2.2 beta release (version 2.2.0) is now available for 
> download from the ParaView web site: 
> http://www.paraview.org/HTML/Download.html.  It is also available 
> through CVS; the tag is ParaView-2-2-0.  If you find bugs in the 
> release, please e-mail me; preferably also send me a patch file to fix 
> the problem.  There have been several changes since the 2.0 release of 
> ParaView; they include the following.
> 
> * projected tetra unstructured grid volume rendering
> * zsweep unstructured grid volume rendering
> * choice of still render methods for unstructured grid volume rendering 
> (ray cast, zsweep, projected tetra)
> * RenderModules/Displays are now ServerManager proxies.
> * Added support to animate the Camera.
> *Enhance XML format to support Time Steps
> * allow people to write XML file through a C or Fortran interface (more 
> VTK than ParaView really).
> * Comparative visualization. First prototype for comparative 
> visualization framework.
> * Better AMR support. Made many improvements and bug fixes to the AMR 
> framework. Added several filters, including filters for extracting 
> levels, coloring by levels. This is ongoing work.
> * New SPCTH reader and new Extract CTH Part filter that work now by 
> using a vtkHierarchicalDataSet instead of a vtkCTHData.  (*Note*: now, a 
> file opened with extension .spcth will run the new reader, the exact 
> same file with extension .amrspcth will run the old reader based on 
> vtkCTHData.)
> * Xdmf reader: now it can deals with "collection" of datasets by 
> grouping them into a vtkHierarchicalDataSet.
> 
> The web site lists precompiled binaries for Windows and Linux.  We are 
> working on one for Mac OSX.
> 
> Hope you enjoy the new release.
> 
> Amy Squillacote
> Kitware, Inc.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview



More information about the Paraview-developers mailing list