[Paraview] pvtr file format

Brad King brad.king at kitware.com
Tue Mar 29 10:49:53 EST 2005


Felix Wolfheimer wrote:
> I'm trying to use the .pvtr file format to visualize a vector field 
> associated to a rectilinear grid. Unfortunately I get not the expected 
> result. I have two .vtr files which are connected via a .pvtr file. I'm 
> trying to visualize the datasets using only one instance of ParaView. 
> Maybe this is a problem? It seems to me, that the data from the second 
> vtr file is read and displayed incorrect. I will provide you a short 
> example to reproduce the problem. The dataset consists of  a vectorfield 
> distributed on two vtr files. The values in the first file contains a 
> field pointing only in x-direction and the second file contains field 
> values pointing only in y-direction.
[snip]
> <VTKFile type="PRectilinearGrid">
> <PRectilinearGrid WholeExtent="1 4 1 2 1 2" GhostLevel="0">
> <PPointData>
>  <PDataArray type="Float32" Name="Field" NumberOfComponents="3"/>
> </PPointData>
> <PCellData></PCellData>
> <PCoordinates>
>  <PDataArray type="Float32" Name="X_COORDINATES" NumberOfComponents="1"/>
>  <PDataArray type="Float32" Name="Y_COORDINATES" NumberOfComponents="1"/>
>  <PDataArray type="Float32" Name="Z_COORDINATES" NumberOfComponents="1"/>
> </PCoordinates>
> <Piece Extent="1 2 1 2 1 2" Source="test0.vtr"/>
> <Piece Extent="3 4 1 2 1 2" Source="test1.vtr"/>

When using multiple pieces like this they must have well-defined 
boundaries.  The X extent "1 2" means there are two points with a cell 
between them.  The X extent "3 4" means this also, but shifted over 2 
units.  Defining the two pieces this way leaves a missing cell between 
points 2 and 3.  The reader should produce an error message to indicate 
this.  You need the extents to overlap by one point such as "1 2" and "2 3".

-Brad


More information about the ParaView mailing list