I am trying to plot 3d point data in vtk by looping through a really large array (size ~ 6e6 x 3). The array shape is (~2000 x 1) with each element containing an array roughly (~3000 x 3)
I used this link as a starting point to plot:
stackoverflow - update live pointcloud data in vtk python
I run into problems when trying looping through my array however. This is how I'm plotting the array:
#pcl is an array ~ size (2000,1) containing arrays that are ~ size (3000, 3)
# for x in range(len(pcl)): # takes a long time to render output
for x in range(0,10): # this line renders the first 10 elements
for point in pcl[x]:
pointCloud.addPoint(point[:3])
How can I go about rendering all the elements in the array in a more efficient way? Ideally it would look like a video playback.
Thank you!