[Paraview] Question about showing a few nodes/points using vtk xml

L.M. de Vries ManuelDeVries at GMail.com
Mon Jul 12 08:44:22 EDT 2010


  Hi,

That indeed solved my problem. Thanks!

Luis Manuel

On 06/07/2010 18:16, Eric E. Monson wrote:
> Hey Luis,
>
> You need to specify not only points, but some types of cells (with connectivity information) in your VTP file. If you want just disconnected vertices, here is an example:
>
> <VTKFile type="PolyData" version="0.1" byte_order="LittleEndian">
>    <PolyData>
>      <Piece NumberOfPoints="6" NumberOfVerts="6">
>        <PointData Scalars="Elevation">
>          <DataArray type="Float32" Name="Elevation" format="ascii" RangeMin="0.08345169574" RangeMax="0.6968934536">
>            0.58468127251 0.08345169574 0.18121850491 0.42782235146 0.63408386707 0.6968934536
>          </DataArray>
>        </PointData>
>        <CellData>
>        </CellData>
>        <Points>
>          <DataArray type="Float32" Name="Points" NumberOfComponents="3" format="ascii" RangeMin="0.57506519638" RangeMax="1.9611330035">
>            -0.20559799671 0.2926761806 1.837474823 -0.13291372359 -0.59396106005 -0.53818535805
>            -0.54464870691 -0.11054357141 0.14777646959 -0.59555768967 0.78732067347 1.0635436773
>            0.6602383852 -0.33984100819 1.6050319672 1.8132208586 0.72800821066 0.16815713048
>          </DataArray>
>        </Points>
>        <Verts>
>          <DataArray type="Int32" Name="connectivity" format="ascii" RangeMin="0" RangeMax="5">
>            0 1 2 3 4 5
>          </DataArray>
>          <DataArray type="Int32" Name="offsets" format="ascii" RangeMin="1" RangeMax="6">
>            1 2 3 4 5 6
>          </DataArray>
>        </Verts>
>      </Piece>
>    </PolyData>
> </VTKFile>
>
> A good way to test the file formats is to create the type of data you want with ParaView Sources and then Save As the data format you want to use. (Here I created a Point Source, followed by the Tetrahedralize filter to create an Unstructured Grid with each point being its own cell, and then an Extract Surface filter to turn it back into PolyData. I just ran the Elevation filter to create a scalar attribute.)
>
> Talk to you later,
> -Eric
>
> ------------------------------------------------------
> Eric E Monson
> Duke Visualization Technology Group
>
>
> On Jul 6, 2010, at 9:07 AM, L.M. de Vries wrote:
>
>> Hi,
>>
>> I am trying to show a few points (not a mesh) with their values in Paraview using an XML VTK input-file
>> Here are the contents of my .vpt file:
>>
>> <VTKFile version="0.1" byte_order="LittleEndian" type="PolyData">
>> <PolyData>
>> <Piece NumberOfPoints="6">
>> <Points>
>> <DataArray NumberOfComponents="3" format="ascii" type="Float32">
>> 0 0 0.0
>> 0 0.5 0.0
>> 5 9.5 0.0
>> 5 10 0.0
>> 14 9.5 0.0
>> 14 10 0.0
>> </DataArray>
>> </Points>
>> <PointData>
>> <DataArray format="ascii" type="Float32" Name="myValue">
>> 1.0
>> 4.0
>> 9.0
>> 15.0
>> 80.4
>> 100.3
>> </DataArray>
>> </PointData>
>> </Piece>
>> </PolyData>
>> </VTKFile>
>>
>>
>> After opening this file in Paraview, it show the points (when I use "select points through").
>> If I show the legend, the max and min values are correct.
>> If I show the values as labels, they are correct.
>> What I would like to know is how I can get the points to show the right color.
>>
>> BTW, Paraview crashes if I change the file to only use 2 components.....
>>
>> Thanks in advance for your help,
>>
>> Luis Manuel
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview



More information about the ParaView mailing list