<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I decided to follow your advice and installed paraview 5.0.1 from
source. The code seemed to work, but I don't see any point in the
screen. I can see in the information tab that all points were
loaded, but the vtkPolyData has zero cells. How can I add the the
points to cells? Specifically, I would like to have one point per
cell. <br>
<br>
Ellon<br>
<br>
<div class="moz-cite-prefix">On 04/22/2016 04:15 PM, Favre Jean
wrote:<br>
</div>
<blockquote
cite="mid:0EB9B6375711A04B820E6B6F5CCA9F68435E36E4@MBX211.d.ethz.ch"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;"><br>
my suggestion would be to use some more numpy-oriented features.
Your "points" array is already a numpy array, you can feed it to
the vtkPolyData with a simple reshaping. Same for your
reflectance array. No need for a for-loop<br>
<div><br>
I'd replace your code with this:<br>
<br>
filename = "worked.bin"<br>
<br>
points = load_velodyne_points(filename)<br>
N=points.shape[1]<br>
# use "output" as the pre-defined vtkPolyData object<br>
output.Points = points[0:3,].reshape(N, 3)<br>
output.PointData.append(points[3,], "reflectance")<br>
<div class="BodyFragment"><font size="2"><span
style="font-size:10pt;">
<div class="PlainText"><br>
I usually skip building up cells, because I use a
PointGaussian representation mode. But your needs
might differ. Anyway, with the changes above, I can
read all 3 files without any problem.<br>
<br>
-----------------<br>
Jean<br>
</div>
</span></font></div>
</div>
</div>
</blockquote>
<br>
</body>
</html>