(fwVtkIO): speed-up mesh conversion to VTK
Description
Mesh conversion is very slow. It may not be possible to improve the full conversion (with the cell organization), but the methods to update vertex, colors and normals should be improved. It is necessary to display the point clouds generated by the RGBD cameras.
The method InsertNextTypedTuple
is used to set the color/normal values, but it is slow, it checks the memory and reallocate the buffer if necessary.
Proposal
Replace the use of InsertNextTypedTuple()
for each point/cell by a global SetArray()
. It is possible to share the same buffer with VTK for the colors and normals, but it is safer to duplicate it (to ensure that the array is locked before to update it).