actors#

Module: actors.odf_slicer#

OdfSlicerActor(odfs, vertices, faces, ...[, ...])

VTK actor for visualizing slices of ODF field.

Module: actors.peak#

PeakActor(directions, indices[, values, ...])

FURY actor for visualizing DWI peaks.

OdfSlicerActor#

class fury.actors.odf_slicer.OdfSlicerActor(odfs, vertices, faces, indices, scale, norm, radial_scale, shape, global_cm, colormap, opacity, affine=None, B=None)[source]#

Bases: vtkActor

VTK actor for visualizing slices of ODF field.

Parameters:
  • odfs (ndarray) – SF or SH coefficients 2-dimensional array.

  • vertices (ndarray) – The sphere vertices used for SH to SF projection.

  • faces (ndarray) – Indices of sphere vertices forming triangles. Should be ordered clockwise (see fury.utils.fix_winding_order).

  • indices (tuple) – Indices given in tuple(x_indices, y_indices, z_indices) format for mapping 2D ODF array to 3D voxel grid.

  • scale (float) – Multiplicative factor to apply to ODF amplitudes.

  • norm (bool) – Normalize SF amplitudes so that the maximum ODF amplitude per voxel along a direction is 1.

  • radial_scale (bool) – Scale sphere points by ODF values.

  • global_cm (bool) – If True the colormap will be applied in all ODFs. If False it will be applied individually at each voxel.

  • colormap (None or str) – The name of the colormap to use. Matplotlib colormaps are supported (e.g., ‘inferno’). If None then a RGB colormap is used.

  • opacity (float) – Takes values from 0 (fully transparent) to 1 (opaque).

  • affine (array) – optional 4x4 transformation array from native coordinates to world coordinates.

  • B (ndarray (n_coeffs, n_vertices)) – Optional SH to SF matrix for projecting odfs given in SH coefficients on the sphere. If None, then the input is assumed to be expressed in SF coefficients.

__init__(odfs, vertices, faces, indices, scale, norm, radial_scale, shape, global_cm, colormap, opacity, affine=None, B=None)[source]#
display(x=None, y=None, z=None)[source]#

Display a slice along x, y, or z axis.

display_extent(x1, x2, y1, y2, z1, z2)[source]#

Set visible volume from x1 (inclusive) to x2 (inclusive), y1 (inclusive) to y2 (inclusive), z1 (inclusive) to z2 (inclusive).

set_opacity(opacity)[source]#

Set opacity value of ODFs to display.

slice_along_axis(slice_index, axis='zaxis')[source]#

Slice ODF field at given slice_index along axis in [‘xaxis’, ‘yaxis’, zaxis’].

update_sphere(vertices, faces, B)[source]#

Dynamically change the sphere used for SH to SF projection.

PeakActor#

class fury.actors.peak.PeakActor(directions, indices, values=None, affine=None, colors=None, lookup_colormap=None, linewidth=1, symmetric=True)[source]#

Bases: vtkActor

FURY actor for visualizing DWI peaks.

Parameters:
  • directions (ndarray) – Peak directions. The shape of the array should be (X, Y, Z, D, 3).

  • indices (tuple) – Indices given in tuple(x_indices, y_indices, z_indices) format for mapping 2D ODF array to 3D voxel grid.

  • values (ndarray, optional) – Peak values. The shape of the array should be (X, Y, Z, D).

  • affine (array, optional) – 4x4 transformation array from native coordinates to world coordinates.

  • colors (None or string ('rgb_standard') or tuple (3D or 4D) or) –

    array/ndarray (N, 3 or 4) or array/ndarray (K, 3 or 4) or

    array/ndarray(N, ) or array/ndarray (K, )

    If None a standard orientation colormap is used for every line. If one tuple of color is used. Then all streamlines will have the same color. If an array (N, 3 or 4) is given, where N is equal to the number of points. Then every point is colored with a different RGB(A) color. If an array (K, 3 or 4) is given, where K is equal to the number of lines. Then every line is colored with a different RGB(A) color. If an array (N, ) is given, where N is the number of points then these are considered as the values to be used by the colormap. If an array (K,) is given, where K is the number of lines then these are considered as the values to be used by the colormap.

  • lookup_colormap (vtkLookupTable, optional) – Add a default lookup table to the colormap. Default is None which calls fury.actor.colormap_lookup_table().

  • linewidth (float, optional) – Line thickness. Default is 1.

  • symmetric (bool, optional) – If True, peaks are drawn for both peaks_dirs and -peaks_dirs. Else, peaks are only drawn for directions given by peaks_dirs. Default is True.

__init__(directions, indices, values=None, affine=None, colors=None, lookup_colormap=None, linewidth=1, symmetric=True)[source]#
property cross_section#
display_cross_section(x, y, z)[source]#
display_extent(x1, x2, y1, y2, z1, z2)[source]#
property global_opacity#
property high_ranges#
property is_range#
property linewidth#
property low_ranges#
property max_centers#
property min_centers#