Modules and Filters¶
For each Mayavi module or filter, there is a corresponding mlab.pipeline factory function that takes as an input argument, the source on which the new module or filter will be added, and returns the created module object. The name of the function corresponds to the name of the module, but with words separated by underscores _, rather than alternating capitals.
The input object, if it is a data source (Mayavi data source or VTK dataset), does not need to be already present in the figure, it will be automatically added if necessary.
Factory functions take keyword arguments controlling some properties of the object added to the pipeline.
For instance, the ScalarCutPlane module can be added with the following function:
- mayavi.tools.modules.scalar_cut_plane(*args, **kwargs)¶
Applies the ScalarCutPlane mayavi module to the given data source (Mayavi source, or VTK dataset).
the color of the vtk object. Overides the colormap, if any, when specified. This is specified as a triplet of float ranging from 0 to 1, eg (1, 1, 1) for white.
type of colormap to use.
[xmin, xmax, ymin, ymax, zmin, zmax] Default is the x, y, z arrays extent. Use this to change the extent of the object created.
Must be a Scene or None.
The width of the lines, if any used. Must be a float. Default: 2.0
the name of the vtk object created.
The overall opacity of the vtk object. Must be a float. Default: 1.0
the orientation of the plane Must be a legal value. Default: x_axes
Reset the zoom to accomodate the data newly added to the scene. Defaults to True.
make the opacity of the actor depend on the scalar.
Whether or not the controls of the cut plane are shown. Must be a boolean. Default: True
vmax is used to scale the colormap. If None, the max of the data will be used
vmin is used to scale the colormap. If None, the min of the data will be used
As the list is long, we shall not enumerate here all the factory function for adding modules or filters. You are invited to refer to their docstring for information on the keyword arguments they accept.