I am using mayavi.mlab
to display 3D data extracted from images. The data is as follows:
- 3D camera parameters as
3
lines in thex, y, x
direction around the camera center, usually for about 20 cameras usingmlab.plot3d()
. - 3D coloured points in space for about
4000
points usingmlab.points3d()
.
For (1) I have a function to draw each line for each camera seperately. If I am correct, all these lines are added to the mayavi pipeline for the current scene. Upon mlab.show()
the scene takes about 10 seconds to render all these lines.
For (2) I couldn't find a way to plot all the points at once with each point a different color, so at the moment I iterate with mlab.points3d(x,y,z, color = color)
. I have newer waited for this routine to finish as it takes to long. If I plot all the points at once with the same color, it takes about 2 seconds.
I already tried to start my script with fig.scene.disable_render = True
and resetting fig.scene.disable_render = False
before displaying the scene with mlab.show()
.
How can I display my data with mayavi within a reasonable waiting time?