Search code examples
paraview

Paraview: open pcd file


I would like to know if paraview can manage pcd file and how. I saw here https://www.paraview.org/Wiki/ParaView/PCL_Plugin that paraview has a pluggin in order to be able to use some functionalities of pcl but I did not see anything related to manage pcd file. And when I tried to open the pcd file with paraview the file format is not recognized.


Solution

  • Sadly, the PCL plugin is outdated and not integrated into the release of ParaView. Is should be upgraded and added into the paraview default plugin. MRs are welcome on our gitlab.

    In the meantime, you can either:

    before loading it in ParaView.

    Edit : Some PointCloud tools can sometimes generate a dataset without any cells, wich is not supported by ParaView and your point cloud will be invisible.

    If fixing the file generation is not possible, then the easiest way is to add a cell manually in ParaView.

    • Open Your .ply file, check that there is no Cells in the information tab
    • Add a Python Programmable Filter
    • Set the script to the following

    Script:

    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)
    
    • And Apply, your point cloud should appear