Advanced use of Mayavi — mayavi 4.7.1 documentation

# Advanced use of Mayavi

Section summary

This section gives details on the working principles of Mayavi. Read it to gain a better understanding, in order to use Mayavi’s full power.

- First we describe the organisation of the pipeline that defines a Mayavi visualization.

- Second we describe data structures, how they are defined and how you can build them. This information is useful for a better understanding of how to build efficient pipelines.

- Finally we describe the object-oriented structure behind Mayavi and the pipeline. This information opens the door to advanced scripting of the Mayavi application, and is especially useful if you whish to develop custom tools with Mayavi.

- Organisation of Mayavi visualizations: the pipeline
  - Anatomy of a Mayavi pipeline
    - Layout of a pipeline
    - Navigating in the pipeline
  - The link between different Mayavi entry points
  - A pipeline example examined
- Data representation in Mayavi
  - Introduction to TVTK datasets
  - The flow of data
  - Retrieving the data from Mayavi pipelines
    - Probing data at given positions
    - Inspecting the internals of the data structures
      - Extracting data points and values
      - Extracting lines
    - Headless use of Mayavi for the algorithms, without visualization
  - Dissection of the different TVTK datasets
    - ImageData
    - RectilinearGrid
    - StructuredGrid
    - PolyData
    - UnstructuredGrid
    - External references
    - Datasets creation examples
  - Inserting TVTK datasets in the Mayavi pipeline
- Objects populating the Mayavi pipeline
  - Scene
  - Source
  - Filter
  - ModuleManager: Colors and legends node
  - Module
  - Engine
  - Base class: PipelineBase
  - Class hierarchy
- Advanced Scripting with Mayavi
  - Design Overview: Mayavi as a visualization framework
    - Object-oriented construction of a visualization
    - Life-cycle of the different objects
  - Scripting the `mayavi2` application
    - Scripting from the UI
    - Scripting from IPython
    - An example
  - Using the Mayavi envisage plugins