备注

This section is only a reference describing the function, please see the chapter on mlab:用Python脚本进行3D绘图 for an introduction to mlab and how to interact with and assemble the functions of mlab.

Please see the section on 运行mlab脚本 for instructions on running the examples.

Filters, modules, other functions

cell_derivatives

mayavi.tools.pipeline.cell_derivatives(*args, **kwargs)

Calculate derivatives of input point/vector data and output these as cell data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

cell_to_point_data

mayavi.tools.pipeline.cell_to_point_data(*args, **kwargs)

Convert cell data to point data for the active data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

contour

mayavi.tools.pipeline.contour(*args, **kwargs)

Compute contours of the input dataset

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

contour_grid_plane

mayavi.tools.pipeline.contour_grid_plane(*args, **kwargs)
::

Applies the ContourGridPlane mayavi module to the given data

source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

contours:

Integer/list specifying number/list of contours. Specifying a list of values will only give the requested contours asked for.

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

contour_surface

mayavi.tools.pipeline.contour_surface(*args, **kwargs)

Applies the Surface mayavi module to the given data source (Mayavi source, or VTK dataset) and turns contours on.

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

contours:

Integer/list specifying number/list of contours. Specifying a list of values will only give the requested contours asked for.

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

custom_grid_plane

mayavi.tools.pipeline.custom_grid_plane(*args, **kwargs)
::

Applies the CustomGridPlane mayavi module to the given VTK data

source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

contours:

Integer/list specifying number/list of contours. Specifying a list of values will only give the requested contours asked for.

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

cut_plane

mayavi.tools.pipeline.cut_plane(*args, **kwargs)

Slice the input dataset with a cut plane

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

data_set_clipper

mayavi.tools.pipeline.data_set_clipper(*args, **kwargs)

Clip the input dataset

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

decimate_pro

mayavi.tools.pipeline.decimate_pro(*args, **kwargs)

Simpilies a mesh using the DecimatePro filter

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

delaunay2d

mayavi.tools.pipeline.delaunay2d(*args, **kwargs)

Perform a 2D Delaunay triangulation for the given data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

delaunay3d

mayavi.tools.pipeline.delaunay3d(*args, **kwargs)

Perform a 3D Delaunay triangulation for the given data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

elevation

mayavi.tools.pipeline.elevation(*args, **kwargs)

Creates scalar data from the elevation along a direction

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

elevation_filter

mayavi.tools.pipeline.elevation_filter(*args, **kwargs)

Applies the Elevation Filter mayavi filter to the given VTK object.

关键字:

figure 图像参数:

只接受Scene或者None

high_point:

The end point of the projection line

low_point:

The start point of the projection line

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

extract_edges

mayavi.tools.pipeline.extract_edges(*args, **kwargs)

Turns edges into lines.

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

extract_grid

mayavi.tools.pipeline.extract_grid(*args, **kwargs)

Extract/subsample part of any structured grid

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

extract_tensor_components

mayavi.tools.pipeline.extract_tensor_components(*args, **kwargs)

Extract tensor components from tensor data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

extract_unstructured_grid

mayavi.tools.pipeline.extract_unstructured_grid(*args, **kwargs)

Extract part of an unstructured grid

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

extract_vector_components

mayavi.tools.pipeline.extract_vector_components(*args, **kwargs)

Extract vector components from vector data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

extract_vector_norm

mayavi.tools.pipeline.extract_vector_norm(*args, **kwargs)

Compute the vector norm for the current vector data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

gaussian_splatter

mayavi.tools.pipeline.gaussian_splatter(*args, **kwargs)

Builds a structured set of points from a cloud of points, the local density defining the scalar. It is essentially equivalent to a 3D Gaussian kernel density estimate. Keyword arguments:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

glyph

mayavi.tools.pipeline.glyph(*args, **kwargs)

Applies the Glyph mayavi module to the given VTK data source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

mask_points:

If supplied, only one out of 'mask_points' data point is displayed. This option is useful to reduce the number of points displayed on large datasets Must be an integer or None.

mode:

the mode of the glyphs. Must be '2darrow' or '2dcircle' or '2dcross' or '2ddash' or '2ddiamond' or '2dhooked_arrow' or '2dsquare' or '2dthick_arrow' or '2dthick_cross' or '2dtriangle' or '2dvertex' or 'arrow' or 'axes' or 'cone' or 'cube' or 'cylinder' or 'point' or 'sphere'. Default: sphere

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

resolution:

The resolution of the glyph created. For spheres, for instance, this is the number of divisions along theta and phi. Must be an integer. Default: 8

scale_factor:

the scaling applied to the glyphs. The size of the glyph is by default in drawing units. Must be a float. Default: 1.0

scale_mode:

the scaling mode for the glyphs ('vector', 'scalar', or 'none').

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

greedy_terrain_decimation

mayavi.tools.pipeline.greedy_terrain_decimation(*args, **kwargs)

Simplifies image data and performs a triangulation

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

grid_plane

mayavi.tools.pipeline.grid_plane(*args, **kwargs)

Shows a grid plane for the given input

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

hyper_streamline

mayavi.tools.pipeline.hyper_streamline(*args, **kwargs)

Shows hyper streamlines for tensor data

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

image_actor

mayavi.tools.pipeline.image_actor(*args, **kwargs)

Applies the ImageActor mayavi module to the given VTK data object.

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

interpolate:

if the pixels in the image are to be interpolated or not. Must be a boolean. Default: True

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

the opacity of the image. Must be a legal value. Default: 1.0

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

image_change_information

mayavi.tools.pipeline.image_change_information(*args, **kwargs)

Change the origin, spacing and extents of an image dataset

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

image_data_probe

mayavi.tools.pipeline.image_data_probe(*args, **kwargs)

Samples arbitrary datasets onto an image dataset (cube of data)

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

image_plane_widget

mayavi.tools.pipeline.image_plane_widget(*args, **kwargs)
::

Applies the ImagePlaneWidget mayavi module to the given data

source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

plane_opacity:

the opacity of the plane actor. Must be a legal value. Default: 1.0

plane_orientation:

the orientation of the plane Must be a legal value. Default: x_axes

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

slice_index:

The index along with the image is sliced.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

iso_surface

mayavi.tools.pipeline.iso_surface(*args, **kwargs)

Applies the IsoSurface mayavi module to the given data source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

contours:

Integer/list specifying number/list of contours. Specifying a list of values will only give the requested contours asked for.

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

labels

mayavi.tools.pipeline.labels(*args, **kwargs)

Display labels for active dataset or active module

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

mask_points

mayavi.tools.pipeline.mask_points(*args, **kwargs)

Mask the input points in the data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

outline

mayavi.tools.pipeline.outline(*args, **kwargs)

Draw an outline for given input

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

point_to_cell_data

mayavi.tools.pipeline.point_to_cell_data(*args, **kwargs)

Convert point data to cell data for the active data

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

poly_data_normals

mayavi.tools.pipeline.poly_data_normals(*args, **kwargs)

Compute normals and smooth the appearance

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

quadric_decimation

mayavi.tools.pipeline.quadric_decimation(*args, **kwargs)

Simplifies a triangular mesh

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

scalar_cut_plane

mayavi.tools.pipeline.scalar_cut_plane(*args, **kwargs)
::

Applies the ScalarCutPlane mayavi module to the given data

source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

plane_orientation:

the orientation of the plane Must be a legal value. Default: x_axes

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

view_controls:

Whether or not the controls of the cut plane are shown. Must be a boolean. Default: True

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

select_output

mayavi.tools.pipeline.select_output(*args, **kwargs)

Choose the output of the source that should be used

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

set_active_attribute

mayavi.tools.pipeline.set_active_attribute(*args, **kwargs)
::

Applies the SetActiveAttribute Filter mayavi filter to the given

VTK object.

关键字:

cell_scalars:

The name of the active cell scalars

cell_tensors:

The name of the active cell tensors

cell_vectors:

The name of the active cell vectors

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

point_scalars:

The name of the active point scalars

point_tensors:

The name of the active point tensors

point_vectors:

The name of the active point vectors

slice_unstructured_grid

mayavi.tools.pipeline.slice_unstructured_grid(*args, **kwargs)

Slice an unstructured grid to show cells

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

streamline

mayavi.tools.pipeline.streamline(*args, **kwargs)

Applies the Streamline mayavi module to the given VTK data object.

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

integration_direction:

The direction of the integration. Must be 'forward' or 'backward' or 'both'. Default: forward

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

linetype:

the type of line-like object used to display the streamline. Must be 'line' or 'ribbon' or 'tube'. Default: line

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

seed_resolution:

The resolution of the seed. Determines the number of seed points Must be an integer or None.

seed_scale:

Scales the seed around its default center Must be a float. Default: 1.0

seed_visible:

Control the visibility of the seed. Must be a boolean. Default: True

seedtype:

the widget used as a seed for the streamlines. Must be 'line' or 'plane' or 'point' or 'sphere'. Default: sphere

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

stripper

mayavi.tools.pipeline.stripper(*args, **kwargs)

Regularizes surfaces by creating triangle strips

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

structured_grid_outline

mayavi.tools.pipeline.structured_grid_outline(*args, **kwargs)

Draw a grid-conforming outline for structured grids

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

surface

mayavi.tools.pipeline.surface(*args, **kwargs)

Applies the Surface mayavi module to the given data source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

representation:

the representation type used for the surface. Must be 'surface' or 'wireframe' or 'points'. Default: surface

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

tensor_glyph

mayavi.tools.pipeline.tensor_glyph(*args, **kwargs)

Displays glyphs scaled and oriented as per tensor data

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

text3d

mayavi.tools.pipeline.text3d(*args, **kwargs)

Displays user-specified text at a 3D location in the scene

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

threshold

mayavi.tools.pipeline.threshold(*args, **kwargs)

Applies the Threshold mayavi filter to the given VTK object.

关键字:

figure 图像参数:

只接受Scene或者None

filter_type:

If threshold is put on cells or points

low:

The lower threshold

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

up:

The upper threshold

transform_data

mayavi.tools.pipeline.transform_data(*args, **kwargs)

Transform (rotate/translate/scale) non ImageData datasets

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

triangle_filter

mayavi.tools.pipeline.triangle_filter(*args, **kwargs)

Convert input polygons and triangle strips to triangles

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

tube

mayavi.tools.pipeline.tube(*args, **kwargs)

Applies the Tube mayavi filter to the given VTK object.

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

tube_radius:

radius of the tubes used to represent the lines. Must be a float. Default: 0.05

tube_sides:

number of sides of the tubes used to represent the lines. Must be an integer. Default: 6

user_defined

mayavi.tools.pipeline.user_defined(*args, **kwargs)

Applies the UserDefined mayavi filter to the given TVTK object.

关键字:

figure 图像参数:

只接受Scene或者None

filter:

the tvtk filter to adapt. Thisbe either an instance of the filter, or thename of this filter.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

vector_cut_plane

mayavi.tools.pipeline.vector_cut_plane(*args, **kwargs)
::

Applies the VectorCutPlane mayavi module to the given data

source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

mask_points:

If supplied, only one out of 'mask_points' data point is displayed. This option is useful to reduce the number of points displayed on large datasets Must be an integer or None.

mode:

the mode of the glyphs. Must be '2darrow' or '2dcircle' or '2dcross' or '2ddash' or '2ddiamond' or '2dhooked_arrow' or '2dsquare' or '2dthick_arrow' or '2dthick_cross' or '2dtriangle' or '2dvertex' or 'arrow' or 'axes' or 'cone' or 'cube' or 'cylinder' or 'point' or 'sphere'. Default: 2darrow

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

plane_orientation:

the orientation of the plane Must be a legal value. Default: x_axes

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

resolution:

The resolution of the glyph created. For spheres, for instance, this is the number of divisions along theta and phi. Must be an integer. Default: 8

scale_factor:

the scaling applied to the glyphs. The size of the glyph is by default in drawing units. Must be a float. Default: 1.0

scale_mode:

the scaling mode for the glyphs ('vector', 'scalar', or 'none').

transparent:

make the opacity of the actor depend on the scalar.

view_controls:

Whether or not the controls of the cut plane are shown. Must be a boolean. Default: True

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

vectors

mayavi.tools.pipeline.vectors(*args, **kwargs)

Applies the Vectors mayavi module to the given data object source (Mayavi source, or VTK dataset).

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

mask_points:

If supplied, only one out of 'mask_points' data point is displayed. This option is useful to reduce the number of points displayed on large datasets Must be an integer or None.

mode:

the mode of the glyphs. Must be '2darrow' or '2dcircle' or '2dcross' or '2ddash' or '2ddiamond' or '2dhooked_arrow' or '2dsquare' or '2dthick_arrow' or '2dthick_cross' or '2dtriangle' or '2dvertex' or 'arrow' or 'axes' or 'cone' or 'cube' or 'cylinder' or 'point' or 'sphere'. Default: 2darrow

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

resolution:

The resolution of the glyph created. For spheres, for instance, this is the number of divisions along theta and phi. Must be an integer. Default: 8

scale_factor:

the scaling applied to the glyphs. The size of the glyph is by default in drawing units. Must be a float. Default: 1.0

scale_mode:

the scaling mode for the glyphs ('vector', 'scalar', or 'none').

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。

volume

mayavi.tools.pipeline.volume(*args, **kwargs)
::

Applies the Volume mayavi module to the given VTK data

source (Mayavi source, or VTK dataset).

Note

The range of the colormap can be changed simply using the vmin/vmax parameters (see below). For more complex modifications of the colormap, here is some pseudo code to change the ctf (color transfer function), or the otf (opacity transfer function):

vol = mlab.pipeline.volume(src)

# Changing the ctf:
from tvtk.util.ctf import ColorTransferFunction
ctf = ColorTransferFunction()
ctf.add_rgb_point(value, r, g, b)  # r, g, and b are float
                                   # between 0 and 1
ctf.add_hsv_point(value, h, s, v)
# ...
vol._volume_property.set_color(ctf)
vol._ctf = ctf
vol.update_ctf = True

# Changing the otf:
from tvtk.util.ctf import PiecewiseFunction
otf = PiecewiseFunction()
otf.add_point(value, opacity)
vol._otf = otf
vol._volume_property.set_scalar_opacity(otf)

Also, it might be useful to change the range of the ctf:

ctf.range = [0, 1]

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

vmax 可视化范围(上界):

vmax is used to scale the transparency gradient. If None, the max of the data will be used

vmin 可视化范围,下界设置:

vmin is used to scale the transparency gradient. If None, the min of the data will be used

vorticity

mayavi.tools.pipeline.vorticity(*args, **kwargs)

Calculate the vorticity (curl) of input vector field

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

warp_scalar

mayavi.tools.pipeline.warp_scalar(*args, **kwargs)

Applies the WarpScalar mayavi filter to the given VTK object.

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

warp_scale:

scale of the warp scalar

warp_vector

mayavi.tools.pipeline.warp_vector(*args, **kwargs)

Move points of data along the vector data at point

关键字:

figure 图像参数:

只接受Scene或者None

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

warp_vector_cut_plane

mayavi.tools.pipeline.warp_vector_cut_plane(*args, **kwargs)

Warp cut plane along scaled input vectors

关键字:

color 颜色:

用于设置vtk对象的颜色。当您指定颜色后,它将覆盖原来的颜色。它接受一个元组形式的范围0到1浮点数,比如(1,1,1)表示白色。

colormap 配色表:

设定配色方案。

extent 可视化范围:

接受一个列表的形式,形式为[xmin, xmax, ymin, ymax, zmin, zmax]。其默认是x, y, z数组的值域范围。使用extent关键词可以改变对象的可视化范围。

figure 图像参数:

只接受Scene或者None

line_width 线宽设置:

调整线条的粗细。接受浮点数,默认为2.0.

name 对象命名:

对创建的vtk对象进行重命名。 译者注:vtk对象都有默认的名,即其层级名。

opacity 透明度设置:

设定vtk对象的透明度,接受浮点数,默认值:1.0 译者注:1.0为不透明。可对同属一个filter不同的module可视化模块采用不同的透明度。

reset_zoom:

Reset the zoom to accomodate the data newly added to the scene. Defaults to True.

transparent:

make the opacity of the actor depend on the scalar.

vmax 可视化范围(上界):

vmax将设定图像的配色区间,将图像对应vmax值的部分设定成配色表中的上界颜色。

vmin 可视化范围,下界设置:

vmin将设定图像的配色区间,将图像对应vmin值的部分设定成配色表中的下界颜色。如果不设置,默认使用数据中值域下界作为vmin。