[Paraview] Request for reader format (x,y,x)

Robert Maynard RobertJMaynard at gmail.com
Wed Jan 23 09:05:56 EST 2008


If you are using paraview 3.2 or greater you could always write a python
programmable source, that does the reading.
If the file has a header with x/y/z this should work for you:

#!/usr/bin/env python

from paraview import vtk
import csv

output = self.GetOutput()

points = vtk.vtkPoints()
cells = vtk.vtkCellArray()

file = open("/home/rmaynard/Data/blockModel/fortuna.csv")

header = csv.reader(file).next() #get the header line
csvReader = csv.DictReader(file, header) #make a dict reader with the header
counter = 0 #need to keep track of the amount of cells
for line in csvReader:
  points.InsertNextPoint(float(line['x']), float(line['y']),
float(line['z']))   #add a point change the 'x' etc to what you have in your
header
  cells.InsertNextCell(1) #each point has its own cell
  cells.InsertCellPoint(counter)
  counter += 1

output.SetPoints(points) #need to set points
output.SetVerts(cells) #need to set cells as verts

On Jan 22, 2008 5:03 PM, Jim Dow <jdow at aerotecusa.com> wrote:

>  I am looking for a Paraview reader that will read a LIDAR point cloud in
> (x,y,z) coordinates as a space or comma separated .txt file.
>
> Does anyone know of such a reader?
>
> Thanks/Jim Dow
> (205) 428-6444
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20080123/3af2db20/attachment.htm


More information about the ParaView mailing list