I would like to voxelize non-uniformly gridded points. This is the code I have written so far:
ERROR: In C:\VPP\standalone-build\VTK-source\Filters\Python\vtkPythonAlgorithm.cxx, line 191
vtkPythonAlgorithm (0000026171FAEB30): Failure when calling method: "ProcessRequest":
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Continuum\anaconda3\lib\site-packages\vtk\util\vtkAlgorithm.py", line 151, in ProcessRequest
return vtkself.ProcessRequest(request, inInfo, outInfo)
File "C:\Users\User\AppData\Local\Continuum\anaconda3\lib\site-packages\vtk\util\vtkAlgorithm.py", line 197, in ProcessRequest
return self.RequestData(request, inInfo, outInfo)
File "C:\Users\User\AppData\Local\Continuum\anaconda3\lib\site-packages\PVGeo\filters\voxelize.py", line 204, in RequestData
self.__dx, self.__dy, self.__dz, grid=pdo)
File "C:\Users\User\AppData\Local\Continuum\anaconda3\lib\site-packages\PVGeo\filters\voxelize.py", line 110, in points_to_grid
x,y,z = self.estimate_uniform_spacing(xo, yo, zo)
File "C:\Users\User\AppData\Local\Continuum\anaconda3\lib\site-packages\PVGeo\filters\voxelize.py", line 88, in estimate_uniform_spacing
xr, yr, zr, dx, dy, angle = r.estimate_and_rotate(x, y, z)
File "C:\Users\User\AppData\Local\Continuum\anaconda3\lib\site-packages\PVGeo\filters\xyz.py", line 572, in estimate_and_rotate
angle, dx, dy = self._estimate_angle_and_spacing(pts)
File "C:\Users\User\AppData\Local\Continuum\anaconda3\lib\site-packages\PVGeo\filters\xyz.py", line 533, in _estimate_angle_and_spacing
distall, ptsiall = tree.query(pts, k=2)
File "sklearn\neighbors\binary_tree.pxi", line 1309, in sklearn.neighbors.kd_tree.BinaryTree.query
ValueError: k must be less than or equal to the number of training points