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

Moreland, Kenneth kmorel at sandia.gov
Tue Jul 6 12:23:07 EDT 2010


By default, ParaView draws cells, not points.  (You've found one exception where selected points are drawn.)  If you want to see points in general, you will need to create "vertex" cells.  One way to do that is to run your data through the glyph filter and select the "2D Glyph" and then "Vected" glyph types.  Or you can add vectex cells directly to your data as follows.

<VTKFile version="0.1" byte_order="LittleEndian" type="PolyData">
<PolyData>
<Piece NumberOfPoints="6" NumberOfVerts="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>
<Verts>
<DataArray type="Int32" Name="connectivity" format="ascii">
0 1 2 3 4 5
</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">
1 2 3 4 5 6
</DataArray>
</Verts>
<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>

-Ken


On 7/6/10 7:07 AM, "L.M. de Vries" <ManuelDeVries at GMail.com> 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




   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100706/8f245004/attachment.htm>


More information about the ParaView mailing list