[Paraview] Read a custom point stored in ply file

Albert Mosella-Montoro albert.mosella at upc.edu
Wed Apr 25 04:39:38 EDT 2018


Hi All,

The intention of this e-mail is to continue the discussion that I have with
Mathieu Westphal in stackoverflow.

The starting point of the problem was I wanted to process a .plc file in
paraview. Matthew told me that at this moment this was not possible and I
needed to convert my plc, file to ply. When I done the conversion, paraview
was not able to understand my file due to PLC that it generated a ply file
without cells.

To solve that Andrew proposes to me to use the following python
programmable filter:

pdi = self.GetPolyDataInput()
pdo =  self.GetPolyDataOutput()
pdo.ShallowCopy(pdi)
numPts = pdo.GetNumberOfPoints()
ids=vtk.vtkIdList()
ids.SetNumberOfIds(numPts)
for i in range(0, numPts):
  ids.SetId(i, i)
pdo.Allocate(1)
pdo.InsertNextCell(2, ids)

That solves my issue and I was able to saw my  rgb point cloud. Now the
problem that I have is the following.

I have stored in a ply file the following information: X Y Z VX VY VZ and I
would like to use vx, vy and vz to display some arrows.

The thing is when paraview reads this new ply file with a custom point the
vx, vy and vz is not recognized.

Thanks,

Albert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180425/69bd1109/attachment.html>


More information about the ParaView mailing list