<div>In view of this being such a common request, I have entered it into the Mantis Bug Tracker as a feature request that vtkparticleReader be incorporated into the current list of default readers. Hopefully this can be easily done.
</div>
<div> </div>
<div> </div>
<div>Andrew</div>
<div> </div>
<div><br><br> </div>
<div class="gmail_quote">On Jan 24, 2008 4:21 AM, Jed Frechette <<a href="mailto:jedfrechette@gmail.com">jedfrechette@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d"><br>On Tue, 22 Jan 2008 16:03:00 -0600, Jim Dow wrote:<br>> I am looking for a Paraview reader that will read a LIDAR point<br>> cloud in<br>> (x,y,z) coordinates as a space or comma separated .txt file.
<br>><br>> Does anyone know of such a reader?<br><br><br></div>I use the standalone Python script given below to convert unsorted xyz<br>point clouds to VTK data files, then load those in Paraview. I haven't<br>
bothered trying to implement this directly in Paraview but I can't<br>imagine it would be to difficult.<br><br>Best,<br><br>--<br>Jed Frechette<br><br>University of New Mexico Lidar Lab<br><a href="http://www.unm.edu/~lidar" target="_blank">
www.unm.edu/~lidar</a><br><br><br>#!/usr/bin/env python<br>"""Convert a csv file containing particles to a VTK XML PolyData file.<br><br>The format of the comma separated file is: x, y, z, scalar. Additional
<br>columns will be ignored as will missing scalars.<br><br>The results are saved to an output file with the same base name as the<br>input<br>file and the extension vtp."""<br><br>__author__ = "Jed Frechette <
<a href="mailto:jdfrech@unm.edu">jdfrech@unm.edu</a>>"<br>__date__ = "27 September 2007"<br>__version__ = "0.1"<br>__license__ = "BSD <<a href="http://opensource.org/licenses/bsd-license.php" target="_blank">
http://opensource.org/licenses/bsd-license.php</a>>"<br><br>from glob import glob<br>from optparse import OptionParser<br>from os import name, path<br>from vtk import vtkParticleReader, vtkXMLPolyDataWriter<br><br>
def get_filenames():<br> """Return a list of filenames to process."""<br> parser = OptionParser(usage='%prog INPUT_FILES',<br> description=' '.join(__doc__.split()),
<br> version=__version__)<br> (opts, args) = parser.parse_args()<br> if name == 'nt':<br> args = glob(args[0])<br> return args<br><br>if __name__ == '__main__':<br>
for in_filename in get_filenames:<br> out_filename = '.'.join([path.splitext(path.split(in_filename)<br>[-1])[0],<br> 'vtp'])<br> reader = vtkParticleReader()
<br> reader.SetFileName(in_filename)<br><br> writer = vtkXMLPolyDataWriter()<br> writer.SetFileName(out_filename)<br> writer.SetInputConnection(reader.GetOutputPort())<br> writer.Write()
<br> print "Saved file: %s" % out_filename<br>
<div>
<div></div>
<div class="Wj3C7c">_______________________________________________<br>ParaView mailing list<br><a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a><br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">
http://www.paraview.org/mailman/listinfo/paraview</a><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>___________________________________________<br>Andrew J. P. Maclean<br>Centre for Autonomous Systems<br>
The Rose Street Building J04<br>The University of Sydney 2006 NSW<br>AUSTRALIA<br>Ph: +61 2 9351 3283<br>Fax: +61 2 9351 7474<br>URL: <a href="http://www.acfr.usyd.edu.au/">http://www.acfr.usyd.edu.au/</a><br>___________________________________________