code: def removeOutliers(points, radius):
      
      isactor = False
      if isinstance(points, vtk.vtkActor):
          isactor = True
          poly = points.GetMapper().GetInput()
      else:
          src = vtk.vtkPointSource()
          src.SetNumberOfPoints(len(points))
          src.Update()
          vpts = src.GetOutput().GetPoints()
          for i, p in enumerate(points):
              vpts.SetPoint(i, p)
          poly = src.GetOutput()
  
      removal = vtk.vtkRadiusOutlierRemoval()
      removal.SetInputData(poly)
      removal.SetRadius(radius)
      removal.SetNumberOfNeighbors(5)
      removal.GenerateOutliersOff()
      removal.Update()
      rpoly = removal.GetOutput()
      print("# of removed outlier points: ",
            removal.GetNumberOfPointsRemoved(), '/', poly.GetNumberOfPoints())
      outpts = []
      for i in range(rpoly.GetNumberOfPoints()):
          outpts.append(list(rpoly.GetPoint(i)))
      outpts = np.array(outpts)
      if not isactor:
          return outpts
  
      actor = vs.Points(outpts)
      return actor
docs: Remove outliers from a cloud of points within the specified `radius` search.
  
      .. hint:: |clustering| |clustering.py|_