[vtkusers] Draw thousands of different size and color 3D rectangles several times per second

David Levy david.levy at leddartech.com
Tue Feb 28 15:29:25 EST 2017


Hello,
Im new to VTK  so I'm trying to find a good solution to my representation.

I receive from a sensor a point cloud and I would like to represent it. So far, I've been using point cloud library with Qt and it works fine.

However, now I need to draw a 3D rectangle around each point of the point cloud and the computation is slow. At the moment, the point cloud is 1024 points, but it will get bigger soon.


My current code is using PCL / QT :

Viewer->addCube (lPoint1.x , lPoint2.x, lPoint1.y, lPoint2.y, lPoint1.z, lPoint2.z,  lColor.redF(), lColor.greenF(), lColor.blueF(), "cube"+std::to_string(i), 0);

For each point, then VTKWidget->update ();


Is there a better way to draw lot of rectangles (not necessarily using PCL) ? I've found this old post : http://vtk.1045678.n5.nabble.com/display-tens-of-thousands-of-cubes-td5463661.html but from what I understand, it can only draw cubes and not rectangles.

Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170228/ec2cc975/attachment.html>


More information about the vtkusers mailing list