[vtkusers] Example .vti file

Jack Poulson jack.poulson at gmail.com
Fri Feb 11 17:16:05 EST 2011


Nevermind. It seems the problem solved itself. The format I sketched below
is working for me, the only modification that I made was to remove the
byte_order specification since it was leftover from me trying to testing out
the binary data approach. My guess is that the problem was in needing to
clear out ParaView rather than the way I was formatting the VTK files.

Jack

On Fri, Feb 11, 2011 at 1:00 PM, Jack Poulson <jack.poulson at gmail.com>wrote:

> Okay, I have toyed around and gotten the pvti/vti files almost working, but
> when I load the pvti file and add a filter (i.e., threshold), then set it to
> color based upon my "cell_scalars" data, only one of my four process's data
> is displayed. I have been guessing as to what the appropriate WholeExtent
> and Extent choices are for each of the four processes. For completeness,
> here is a sketch of the parallel file and the four serial files (one for
> each quadrant of the square slab). I would greatly appreciate any help.
>
> slab.pvti:
> <?xml version="1.0"?>
> <VTKFile type="PImageData" version="0.1" byte_order="LittleEndian">
>  <PImageData WholeExtent="0 640 0 640 0 1" Origin="0 0 0 " Spacing = "1 1
> 1" GhostLevel="0">
>   <PCellData Scalars="cell_scalars">
>    <PDataArray type="Float64" Name="cell_scalars"/>
>   </PCellData>
>   <Piece Extent="0 320 0 320 0 1" Source="slab_0.vti"/>
>   <Piece Extent="0 320 320 640 0 1" Source="slab_1.vti"/>
>   <Piece Extent="320 640 0 320 0 1" Source="slab_2.vti"/>
>   <Piece Extent="320 640 320 640 0 1" Source="slab_3.vti"/>
>  </PImagData>
> </VTKFile>
>
> slab_0.vti:
> <?xml_version="1.0"?>
> <VTKFile type="ImageData" version="0.1" byte_order="LittleEndian">
>  <ImageData WholeExtent="0 640 0 640 0 1" Origin="0 0 0" Spacing="1 1 1">
>   <Piece Extent="0 320 0 320 0 1">
>    <CellData Scalars="cell_scalars">
>     <DataArray type="Float64" Name="cell_scalars" format="ascii">
> ...data is here...
>     </DataArray>
>    </CellData>
>   </Piece>
>  </ImageData>
> </VTKFile>
>
> slab_1.vti:
> <?xml_version="1.0"?>
> <VTKFile type="ImageData" version="0.1" byte_order="LittleEndian">
>  <ImageData WholeExtent="0 640 0 640 0 1" Origin="0 0 0" Spacing="1 1 1">
>   <Piece Extent="0 320 320 640 0 1">
>    <CellData Scalars="cell_scalars">
>     <DataArray type="Float64" Name="cell_scalars" format="ascii">
> ...data is here...
>     </DataArray>
>    </CellData>
>   </Piece>
>  </ImageData>
> </VTKFile>
>
> slab_2.vti:
> <?xml_version="1.0"?>
> <VTKFile type="ImageData" version="0.1" byte_order="LittleEndian">
>  <ImageData WholeExtent="0 640 0 640 0 1" Origin="0 0 0" Spacing="1 1 1">
>   <Piece Extent="320 640 0 320 0 1">
>    <CellData Scalars="cell_scalars">
>     <DataArray type="Float64" Name="cell_scalars" format="ascii">
> ...data is here...
>     </DataArray>
>    </CellData>
>   </Piece>
>  </ImageData>
> </VTKFile>
>
> slab_3.vti:
> <?xml_version="1.0"?>
> <VTKFile type="ImageData" version="0.1" byte_order="LittleEndian">
>  <ImageData WholeExtent="0 640 0 640 0 1" Origin="0 0 0" Spacing="1 1 1">
>   <Piece Extent="320 640 320 640 0 1">
>    <CellData Scalars="cell_scalars">
>     <DataArray type="Float64" Name="cell_scalars" format="ascii">
> ...data is here...
>     </DataArray>
>    </CellData>
>   </Piece>
>  </ImageData>
> </VTKFile>
>
> Thanks again,
> Jack
>
> On Fri, Feb 11, 2011 at 9:28 AM, Jack Poulson <jack.poulson at gmail.com>wrote:
>
>> I have been scouring the web and the VTK documentation for an example of
>> an XML vtkImageData file (and preferably a .pvti/.vti pairing), but I cannot
>> seem to find one.
>>
>> I know that you guys heavily recommend using vtkXMLPImageDataWriter, but I
>> have a parallel code that I would like to dump out .pvti and .vti files from
>> without requiring the user to link to VTK.
>>
>> Does anyone know where I can read a precise specification or find an
>> example file? Even a trivial ascii/binary/appended data version would
>> suffice.
>>
>> Thank you in advance,
>> Jack
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110211/09f81868/attachment.htm>


More information about the vtkusers mailing list