[Paraview] extracting line data

Stephen Wornom stephen.wornom at sophia.inria.fr
Fri Nov 6 11:24:33 EST 2009


Sven Buijssen wrote:
> Hi,
>
> I think it can be done by applying a Calculatur filter first to store the
> coordinates as an additional point dataset (named e.g. 'xyz'), then applying the
> original Plot over Line filter and finally a Programmable Filter with the
> following code:
>
> inp = self.GetInput()
> filename = "foo.csv"
>
> FILE = open(filename,"w")
> FILE.write("x,y,z, x-velocity")
> numPoints = inp.GetNumberOfPoints()
> coords = inp.GetPointData().GetArray("xyz")
> vel = inp.GetPointData().GetArray("Velocity")
> for i in xrange(0, 3*numPoints, 3):
>   FILE.write(str(coords.GetValue(i)) + "," + str(coords.GetValue(i+1)) + "," +
> str(coords.GetValue(i+2)) + "," + str(vel.GetValue(i)))
> FILE.close()
>
> (write statement is one big line, despite it being wrapped in this message)
>
>
> Sven
>
>   
I am extremely interested in your idea but have no experience in writing 
filters and loading them inthe calculator.
This set of simple data illustrates my problem
Questions:
1- What does ^@ mean?
2-What does ^A mean?
The mesh contains 61 vertices, vertices 0-4 have no meaning that I can 
tell, the same for vertices 56-60.
How can I convert this table to a simpliler table with only the values:
"Density","Pressure","Mach","K","Epsilon","LogFR","Temperature","Velocity","Velocity","Velocity","Vorticity","Vorticity","Vorticity","original_coordinates","original_coordinates","original_coordinates","arc_length"
The csv data was written on my workstation, PV 3.4.0 was executing with 
4 cpus.
Thanks,
Stephen


"X::Point","Y::Point","Z::Point","Density::PointData","Pressure::PointData","Mach::PointData","K::PointData","Epsilon::PointData","LogFR::PointData","Temperature::PointData","Velocity::PointData","Velocity::PointData","Velocity::PointData","Vorticity::PointData","Vorticity::PointData","Vorticity::PointData","vtkValidPointMask::PointData","original_coordinates::PointData","original_coordinates::PointData","original_coordinates::PointData","arc_length::PointData"
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,-0.009,0.0225,0
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,-0.0072,0.0225,0.0018
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,-0.0054,0.0225,0.0036
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,-0.0036,0.0225,0.0054
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,-0.0018,0.0225,0.0072
5,0,0,1,6054.3,0.101015,0.0043245,0.00043245,-3,21.1689,9.3,0,0,0,0,0,^A,0.45,1.73472e-18,0.0225,0.009
6,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0018,0.0225,0.0108
7,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0036,0.0225,0.0126
8,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0054,0.0225,0.0144
9,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0072,0.0225,0.0162
10,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.009,0.0225,0.018
11,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0108,0.0225,0.0198
12,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0126,0.0225,0.0216
13,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0144,0.0225,0.0234
14,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0162,0.0225,0.0252
15,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.018,0.0225,0.027
16,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0198,0.0225,0.0288
17,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0216,0.0225,0.0306
18,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0234,0.0225,0.0324
19,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0252,0.0225,0.0342
20,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.027,0.0225,0.036
21,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0288,0.0225,0.0378
22,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0306,0.0225,0.0396
23,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0324,0.0225,0.0414
24,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0342,0.0225,0.0432
25,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.036,0.0225,0.045
26,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0378,0.0225,0.0468
27,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0396,0.0225,0.0486
28,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0414,0.0225,0.0504
29,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0432,0.0225,0.0522
30,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.045,0.0225,0.054
31,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0468,0.0225,0.0558
32,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0486,0.0225,0.0576
33,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0504,0.0225,0.0594
34,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0522,0.0225,0.0612
35,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.054,0.0225,0.063
36,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0558,0.0225,0.0648
37,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0576,0.0225,0.0666
38,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0594,0.0225,0.0684
39,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0612,0.0225,0.0702
40,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.063,0.0225,0.072
41,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0648,0.0225,0.0738
42,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0666,0.0225,0.0756
43,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0684,0.0225,0.0774
44,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0702,0.0225,0.0792
45,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.072,0.0225,0.081
46,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0738,0.0225,0.0828
47,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0756,0.0225,0.0846
48,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0774,0.0225,0.0864
49,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0792,0.0225,0.0882
50,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0,21.1689,9.3,0,0,0,0,0,^A,0.45,0.081,0.0225,0.09
51,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0.191064,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0828,0.0225,0.0918
52,0,0,1,6054.3,0.101015,0.0043245,0.00043245,0.643298,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0846,0.0225,0.0936
53,0,0,1,6054.3,0.101015,0.0043245,0.00043245,1.09553,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0864,0.0225,0.0954
54,0,0,1,6054.3,0.101015,0.0043245,0.00043245,1.54777,21.1689,9.3,0,0,0,0,0,^A,0.45,0.0882,0.0225,0.0972
55,0,0,1,6054.3,0.101015,0.0043245,0.00043245,2,21.1689,9.3,0,0,0,0,0,^A,0.45,0.09,0.0225,0.099
56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,0.0918,0.0225,0.1008
57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,0.0936,0.0225,0.1026
58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,0.0954,0.0225,0.1044
59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,0.0972,0.0225,0.1062
60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,^@,0.45,0.099,0.0225,0.108

-- 
stephen.wornom at sophia.inria.fr
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX
		
Tel: 04 92 38 50 54
Fax: 04 97 15 53 51

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stephen_wornom.vcf
Type: text/x-vcard
Size: 168 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20091106/6dc30323/attachment-0001.vcf>


More information about the ParaView mailing list