The Virtual Brain Project

Table Of Contents

Previous topic

zip_surface Package

Next topic

config Package

This Page

visualizers Package

List here all Python modules where Visualization adapters are described. Listed modules will be introspected and DB filled.

annotations_viewer

class tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsView[source]

Bases: tvb.adapters.visualizers.surface_view.ABCSurfaceDisplayer

Given a Connectivity Matrix and a Surface data the viewer will display the matrix ‘inside’ the surface data. The surface is only displayed as a shadow.

get_activation_pattern_labels()[source]
Returns:map {brco_id: list of TVB regions LABELS in which the same BRCO term is being subclass}
get_activation_patterns()[source]

Group Annotation terms by URI. :return: map {brco_id: list of TVB regions IDs in which the same term is being subclass}

get_form_class()[source]
get_required_memory_size(**kwargs)[source]
get_triangles_mapping()[source]

:return Numpy array of length triangles and for each the region corresponding to one of its vertices.

launch(annotations_index, region_mapping_index=None, **kwarg)[source]
tree_json()[source]
Returns:JSON to be rendered in a Tree of entities
class tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsViewForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

brain

class tvb.adapters.visualizers.brain.BrainViewer[source]

Bases: tvb.adapters.visualizers.surface_view.ABCSurfaceDisplayer

Interface between the 3D view of the Brain Cortical Surface and TVB framework. This viewer will build the required parameter dictionary that will be sent to the HTML / JS for further processing, having as end result a brain surface plus activity that will be displayed in 3D.

PAGE_SIZE = 500
compute_parameters(time_series, shell_surface=None)[source]

Create the required parameter dictionary for the HTML/JS viewer.

Return type:dict
Raises Exception:
 when * number of measure points exceeds the maximum allowed * a Face object cannot be found in database
generate_preview(time_series, shell_surface=None, figure_size=None)[source]

Generate the preview for the burst page

get_form_class()[source]
get_required_memory_size(time_series, shell_surface=None)[source]

Assume one page doesn’t get ‘dumped’ in time and it is highly probably that two consecutive pages will be in the same time in memory.

launch(time_series, shell_surface=None)[source]

Build visualizer’s page.

populate_surface_fields(time_series_index)[source]

To be overwritten for populating fields: one_to_one_map/connectivity/region_map/surface fields

retrieve_measure_points_prams(time_series)[source]

To be overwritten method, for retrieving the measurement points (region centers, EEG sensors).

class tvb.adapters.visualizers.brain.BrainViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.brain.DualBrainViewer[source]

Bases: tvb.adapters.visualizers.brain.BrainViewer

Visualizer merging Brain 3D display and EEG lines display.

get_form_class()[source]
launch(time_series, projection_surface=None, shell_surface=None)[source]
populate_surface_fields(time_series_index)[source]

Prepares the urls from which the client may read the data needed for drawing the surface.

retrieve_measure_points_prams(time_series)[source]
class tvb.adapters.visualizers.brain.DualBrainViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

complex_imaginary_coherence

class tvb.adapters.visualizers.complex_imaginary_coherence.ImaginaryCoherenceDisplay[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

This viewer takes as inputs a result from complex coherence analysis, and returns required parameters for a MatplotLib representation.

generate_preview(input_data, **kwargs)[source]
get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return the required memory to run this algorithm.

launch(input_data, **kwargs)[source]

Draw interactive display.

class tvb.adapters.visualizers.complex_imaginary_coherence.ImaginaryCoherenceDisplayForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

connectivity

class tvb.adapters.visualizers.connectivity.Connectivity2DViewer[source]

Bases: builtins.object

Having as inputs a Connectivity matrix(required) and two arrays that represent the colors and shapes of the nodes from the matrix(optional) the viewer will build the required parameter dictionary that will be sent to the HTML/JS 2D representation of the connectivity matrix.

DEFAULT_COLOR = '#d73027'
MAX_RAY = 40
MAX_WEIGHT_VALUE = 0.6
MIN_RAY = 4
MIN_WEIGHT_VALUE = 0.0
OTHER_COLOR = '#1a9850'
compute_parameters(input_data, colors=None, rays=None, step=None)[source]

Build the required HTML response to be displayed.

Raises LaunchException:
 when number of regions in input_data is less than 3
compute_preview_parameters(input_data, width, height, colors=None, rays=None, step=None)[source]

Build the required HTML response to be displayed in the BURST preview iFrame.

point2json(node_lbl, x_coord, y_coord, adjacencies, angle, shape_dimension, shape_color)[source]

Method used for creating a valid JSON for a certain point.

class tvb.adapters.visualizers.connectivity.Connectivity3DViewer[source]

Bases: builtins.object

Behavior for the HTML/JS 3D representation of the connectivity matrix.

static compute_parameters(input_data, colors=None, rays=None)[source]

Having as inputs a Connectivity matrix(required) and two arrays that represent the rays and colors of the nodes from the matrix(optional) this method will build the required parameter dictionary that will be sent to the HTML/JS 3D representation of the connectivity matrix.

class tvb.adapters.visualizers.connectivity.ConnectivityViewer[source]

Bases: tvb.adapters.visualizers.time_series.ABCSpaceDisplayer

Given a Connectivity Matrix and a Surface data the viewer will display the matrix ‘inside’ the surface data. The surface is only displayed as a shadow.

generate_preview(input_data, figure_size=None, surface_data=None, colors=None, rays=None, step=None, **kwargs)[source]

Generate the preview for the BURST cockpit.

see launch_

static get_connectivity_parameters(input_connectivity, conn_path)[source]

Returns a dictionary which contains all the needed data for drawing a connectivity.

get_form_class()[source]
get_required_memory_size(input_data, surface_data, **kwargs)[source]

Return the required memory to run this algorithm.

launch(input_data, surface_data=None, colors=None, rays=None, step=None)[source]

Given the input connectivity data and the surface data, build the HTML response to be displayed.

Parameters:
  • input_data (ConnectivityIndex) – index towards the Connectivity object which will be displayed
  • surface_data (SurfaceIndex) – if provided, it is displayed as a shadow to give an idea of the connectivity position relative to the full brain cortical surface
  • colors (ConnectivityMeasureIndex) – used to establish a colormap for the nodes displayed in 2D Connectivity viewers
  • rays (ConnectivityMeasureIndex) – used to establish the size of the spheres representing each node in 3D Nodes viewer
  • step (float) – a threshold applied to the 2D Connectivity Viewers to differentiate 2 types of nodes the ones with a value greater that this will be displayed as red discs, instead of yellow
class tvb.adapters.visualizers.connectivity.ConnectivityViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

connectivity_edge_bundle

A Javascript displayer for connectivity, using hierarchical edge bundle diagrams from d3.js.

class tvb.adapters.visualizers.connectivity_edge_bundle.ConnectivityEdgeBundle[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return required memory.

launch(connectivity)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.connectivity_edge_bundle.ConnectivityEdgeBundleForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

covariance

A displayer for covariance.

class tvb.adapters.visualizers.covariance.CovarianceVisualizer[source]

Bases: tvb.adapters.visualizers.matrix_viewer.MappedArrayVisualizer

get_form_class()[source]
launch(datatype)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.covariance.CovarianceVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

cross_coherence

A displayer for the cross coherence of a time series.

class tvb.adapters.visualizers.cross_coherence.CrossCoherenceVisualizer[source]

Bases: tvb.adapters.visualizers.matrix_viewer.MappedArraySVGVisualizerMixin

get_form_class()[source]
launch(datatype)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.cross_coherence.CrossCoherenceVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

cross_correlation

A displayer for cross correlation.

class tvb.adapters.visualizers.cross_correlation.CrossCorrelationVisualizer[source]

Bases: tvb.adapters.visualizers.matrix_viewer.MappedArraySVGVisualizerMixin

get_form_class()[source]
launch(datatype)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.cross_correlation.CrossCorrelationVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

eeg_monitor

class tvb.adapters.visualizers.eeg_monitor.EegMonitor[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

This viewer takes as inputs at least one ArrayWrapper and at most 3 ArrayWrappers, and returns the needed parameters for a 2D representation of the values from these arrays, in EEG form. So far arrays of at most 3 dimensions are supported.

compute_parameters(input_data, data_2=None, data_3=None, is_preview=False, is_extended_view=False, selected_dimensions=None)[source]

Start the JS visualizer, similar to EEG-lab

Parameters:
  • is_preview – Boolean True wne shown on Burst page
  • selected_dimensions – from GUI int
  • is_extended_view – Boolean when to display as dual-viewer
  • input_data (TimeSeriesEEG) – Time series to display
  • data_2 – additional input data
  • data_3 – additional input data
Returns:

the needed parameters for a 2D representation

Return type:

dict

Raises LaunchException:
 

when at least two input data parameters are provided and they sample periods differ

compute_required_info(list_of_timeseries)[source]

Compute average difference between Max and Min.

current_page = 0
generate_preview(input_data, data_2=None, data_3=None, figure_size=None)[source]
get_form_class()[source]
get_required_memory_size(time_series)[source]

Return the required memory to run this algorithm.

has_nan = False
launch(input_data, data_2=None, data_3=None)[source]

Compute visualizer’s page

page_size = 4000
preview_page_size = 250
class tvb.adapters.visualizers.eeg_monitor.EegMonitorForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

fourier_spectrum

class tvb.adapters.visualizers.fourier_spectrum.FourierSpectrumDisplay[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

This viewer takes as inputs a result form FFT analysis, and returns required parameters for a MatplotLib representation.

generate_preview(**kwargs)[source]
get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return the required memory to run this algorithm.

launch(input_data, **kwargs)[source]
class tvb.adapters.visualizers.fourier_spectrum.FourierSpectrumForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
get_traited_datatype()[source]

histogram

class tvb.adapters.visualizers.histogram.HistogramViewer[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

The viewer takes as input a result DataType as computed by BCT analyzers.

generate_preview(input_data, figure_size)[source]

The preview for the burst page.

get_form_class()[source]
get_required_memory_size(input_data, figure_size)[source]

Return the required memory to run this algorithm.

launch(input_data)[source]

Prepare input data for display.

Parameters:input_data (ConnectivityMeasureIndex) – A BCT computed measure for a Connectivity
prepare_parameters(input_data)[source]

Prepare all required parameters for a launch.

class tvb.adapters.visualizers.histogram.HistogramViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

ica

A matrix displayer for the Independent Component Analysis. It displays the mixing matrix of siae n_features x n_components

class tvb.adapters.visualizers.ica.ICA[source]

Bases: tvb.adapters.visualizers.matrix_viewer.MappedArraySVGVisualizerMixin

get_form_class()[source]
launch(datatype, i_svar=0, i_mode=0)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.ica.ICAForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

local_connectivity_view

class tvb.adapters.visualizers.local_connectivity_view.LocalConnectivityViewer[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

Local connectivity visualizer

get_form_class()[source]
get_required_memory_size()[source]
launch(local_conn)[source]
class tvb.adapters.visualizers.local_connectivity_view.LocalConnectivityViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

matrix_viewer

class tvb.adapters.visualizers.matrix_viewer.MappedArraySVGVisualizerMixin[source]

Bases: tvb.adapters.visualizers.time_series.ABCSpaceDisplayer

To be mixed in a ABCDisplayer

compute_params(matrix, viewer_title, given_slice=None, labels=None)[source]

Prepare a 2d matrix to display :param labels: optional labels for the matrix :param viewer_title: title for the matrix display :param matrix: input matrix :param given_slice: a string representation of a slice. This slice should cut a 2d view from matrix If the matrix is not 2d and the slice will not make it 2d then a default slice is used

static compute_raw_matrix_params(matrix)[source]

Serializes matrix data, shape and stride metadata to json

generate_preview(datatype, **kwargs)[source]
get_required_memory_size(datatype)[source]
class tvb.adapters.visualizers.matrix_viewer.MappedArrayVisualizer[source]

Bases: tvb.adapters.visualizers.matrix_viewer.MappedArraySVGVisualizerMixin

get_form_class()[source]
launch(datatype, slice='')[source]
class tvb.adapters.visualizers.matrix_viewer.MatrixVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
tvb.adapters.visualizers.matrix_viewer.compute_2d_view(matrix, slice_s)[source]

Create a 2d view of the matrix using the suggested slice If the given slice is invalid or fails to produce a 2d array the default is used which selects the first 2 dimensions. If the matrix is complex the real part is shown :param matrix: main input. It can have more then 2D :param slice_s: a string representation of a slice :return: (a 2d array, the slice used to make it, is_default_returned)

pca

A displayer for the principal components analysis.

class tvb.adapters.visualizers.pca.PCA[source]

Bases: tvb.adapters.visualizers.time_series.ABCSpaceDisplayer

generate_preview(pca, figure_size=None)[source]
get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return required memory. Here, it’s unknown/insignificant.

launch(pca)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.pca.PCAForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

pearson_cross_correlation

class tvb.adapters.visualizers.pearson_cross_correlation.PearsonCorrelationCoefficientVisualizer[source]

Bases: tvb.adapters.visualizers.matrix_viewer.MappedArrayVisualizer

Viewer for Pearson CorrelationCoefficients. Very similar to the CrossCorrelationVisualizer - this one done with Matplotlib

get_form_class()[source]
get_required_memory_size(datatype)[source]

Return required memory.

launch(datatype)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.pearson_cross_correlation.PearsonCorrelationCoefficientVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

pearson_edge_bundle

class tvb.adapters.visualizers.pearson_edge_bundle.PearsonEdgeBundle[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

Viewer for Pearson CorrelationCoefficients. Very similar to the CrossCorrelationVisualizer - this one done with Matplotlib

get_form_class()[source]
get_required_memory_size(datatype)[source]

Return required memory.

launch(datatype)[source]

Construct data for visualization and launch it.

phase_plane_interactive

class tvb.adapters.visualizers.phase_plane_interactive.PhaseLineD3(model, integrator)[source]

Bases: tvb.adapters.visualizers.phase_plane_interactive._PhaseSpace

compute_phase_plane()[source]
update_axis(mode, svx, x_range)[source]
class tvb.adapters.visualizers.phase_plane_interactive.PhasePlane(model, integrator)[source]

Bases: tvb.adapters.visualizers.phase_plane_interactive._PhaseSpace

Responsible with computing phase space slices and trajectories. A collection of math-y utilities it is view independent (holds no state related to views).

class tvb.adapters.visualizers.phase_plane_interactive.PhasePlaneD3(model, integrator)[source]

Bases: tvb.adapters.visualizers.phase_plane_interactive.PhasePlane

Provides data for a d3 client

compute_phase_plane()[source]
Returns:A json representation of the phase plane.
trajectories(starting_points, n_steps=512)[source]
Parameters:starting_points – A list of starting points represented as dicts of state_var_name to value
Returns:a tuple of trajectories and signals
update_axis(mode, svx, svy, x_range, y_range, state_vars)[source]
update_integrator_clamping()[source]
tvb.adapters.visualizers.phase_plane_interactive.nullcline(x, y, z)[source]
tvb.adapters.visualizers.phase_plane_interactive.phase_space_d3(model, integrator)[source]
Returns:A phase plane or a phase line depending on the dimensionality of the model

pse_discrete

class tvb.adapters.visualizers.pse_discrete.DiscretePSEAdapter[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

Visualization adapter for Parameter Space Exploration. Will be used as a generic visualizer, accessible when input entity is DataTypeGroup. Will also be used in Burst as a supplementary navigation layer.

get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return the required memory to run this algorithm.

static get_value_on_axe(op_range, only_numbers, range_param_name, fake_numbers)[source]
launch(datatype_group)[source]

Launch the visualizer.

static prepare_parameters(datatype_group_gid, back_page, color_metric=None, size_metric=None)[source]

We suppose that there are max 2 ranges and from each operation results exactly one dataType.

Parameters:
  • datatype_group_gid – the group id for the DataType to be visualised
  • back_page – Page where back button will direct
  • color_metric – String referring to metric to apply on colors
  • size_metric – String referring to metric to apply on sizes
Returns:

ContextDiscretePSE

Raises Exception:
 

when datatype_group_id is invalid (not in database)

static prepare_range_labels(operation_group, range_json)[source]

Prepare Range labels for display in UI. When the current range_json is empty, returns None, [RANGE_MISSING_STRING], [RANGE_MISSING_STRING]

Parameters:
  • operation_group – model.OperationGroup instance
  • range_json – Stored JSON for for a given range
Returns:

String with current range label, Array of ranged numbers, Array of labels for current range

class tvb.adapters.visualizers.pse_discrete.DiscretePSEAdapterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

pse_isocline

class tvb.adapters.visualizers.pse_isocline.IsoclinePSEAdapter[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

Visualization adapter for Parameter Space Exploration. Will be used as a generic visualizer, accessible when input entity is DataTypeGroup. Will also be used in Burst as a supplementary navigation layer.

burst_preview(datatype_group_gid)[source]

Generate the preview for the burst page.

get_form_class()[source]
get_metric_matrix(datatype_group, selected_metric=None)[source]
get_required_memory_size(**kwargs)[source]

Return the required memory to run this algorithm.

launch(datatype_group, **kwargs)[source]
static prepare_node_data(datatype_group)[source]
class tvb.adapters.visualizers.pse_isocline.IsoclinePSEAdapterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.pse_isocline.PseIsoModel(range1, range2, apriori_data, metrics, datatype_gids)[source]

Bases: builtins.object

classmethod from_db(operation_group_id)[source]

Collects from db the information about the operation group that is required by the isocline view.

static pse_filter()[source]

region_volume_mapping

Backend-side for Visualizers that display measures on regions in the brain volume.

class tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

class tvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizer[source]

Bases: tvb.adapters.visualizers.region_volume_mapping._MappedArrayVolumeBase

get_form_class()[source]
launch(connectivity_measure, region_mapping_volume=None, background=None)[source]
class tvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.region_volume_mapping.MappedArrayVolumeVisualizer[source]

Bases: tvb.adapters.visualizers.region_volume_mapping._MappedArrayVolumeBase

This is a generic mapped array visualizer on a region volume. To view a multidimensional array one has to give this viewer a slice.

get_form_class()[source]
launch(measure, region_mapping_volume=None, data_slice='', background=None)[source]
class tvb.adapters.visualizers.region_volume_mapping.MriVolumeVisualizer[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

get_form_class()[source]
get_required_memory_size(**kwargs)[source]
launch(background=None)[source]
class tvb.adapters.visualizers.region_volume_mapping.MriVolumeVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiser[source]

Bases: tvb.adapters.visualizers.region_volume_mapping._MappedArrayVolumeBase

get_form_class()[source]
launch(region_mapping_volume, connectivity_measure=None, background=None)[source]
class tvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiserForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.region_volume_mapping.VolumeVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

sensors

class tvb.adapters.visualizers.sensors.SensorsViewer[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

Sensor visualizer - for visual inspecting of TVB Sensors DataTypes.

get_form_class()[source]
get_required_memory_size()[source]
launch(sensors, projection_surface=None, shell_surface=None)[source]

Prepare visualizer parameters.

We support viewing all sensor types through a single viewer, so that a user doesn’t need to go back to the data-page, for loading a different type of sensor.

sensors_to_surface(sensors_gid, surface_to_map_gid)[source]

Map EEG sensors onto the head surface (skin-air).

EEG sensor locations are typically only given on a unit sphere, that is, they are effectively only identified by their orientation with respect to a coordinate system. This method is used to map these unit vector sensor “locations” to a specific location on the surface of the skin.

Assumes coordinate systems are aligned, i.e. common x,y,z and origin.

class tvb.adapters.visualizers.sensors.SensorsViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
tvb.adapters.visualizers.sensors.prepare_mapped_sensors_as_measure_points_params(sensors, eeg_cap=None, adapter_id=None)[source]

Compute sensors positions by mapping them to the eeg_cap surface If eeg_cap is not specified the mapping will use a default EEGCal DataType in current project. If no default EEGCap is found, return sensors as they are (not projected)

Returns:dictionary to be used in Viewers for rendering measure_points
Return type:dict
tvb.adapters.visualizers.sensors.prepare_sensors_as_measure_points_params(sensors)[source]

Returns urls from where to fetch the measure points and their labels

surface_view

class tvb.adapters.visualizers.surface_view.ABCSurfaceDisplayer[source]

Bases: tvb.adapters.visualizers.time_series.ABCSpaceDisplayer

generate_region_boundaries(surface_gid, region_mapping_gid)[source]

Return the full region boundaries, including: vertices, normals and lines indices.

class tvb.adapters.visualizers.surface_view.BaseSurfaceViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
class tvb.adapters.visualizers.surface_view.ConnectivityMeasureOnSurfaceViewer[source]

Bases: tvb.adapters.visualizers.surface_view.SurfaceViewer

This displays a connectivity measure on a surface via a RegionMapping It reuses almost everything from SurfaceViewer, but it make required another input param.

get_form_class()[source]
launch(connectivity_measure, region_map=None, shell_surface=None)[source]
class tvb.adapters.visualizers.surface_view.ConnectivityMeasureOnSurfaceViewerForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.visualizers.surface_view.BaseSurfaceViewerForm

static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.surface_view.RegionMappingViewer[source]

Bases: tvb.adapters.visualizers.surface_view.SurfaceViewer

This is a viewer for RegionMapping DataTypes. It reuses almost everything from SurfaceViewer, but it make required another input param.

get_form_class()[source]
launch(region_map, connectivity_measure=None, shell_surface=None)[source]
class tvb.adapters.visualizers.surface_view.RegionMappingViewerForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.visualizers.surface_view.BaseSurfaceViewerForm

static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.surface_view.SurfaceURLGenerator[source]

Bases: tvb.core.adapters.abcdisplayer.URLGenerator

static get_url_for_region_boundaries(surface_h5, region_mapping_gid, adapter_id)[source]
static get_urls_for_pick_rendering(surface_h5)[source]

Compose URLS for the JS code to retrieve a surface for picking.

static get_urls_for_rendering(surface_h5, region_mapping_gid=None)[source]

Compose URLs for the JS code to retrieve a surface from the UI for rendering.

class tvb.adapters.visualizers.surface_view.SurfaceViewer[source]

Bases: tvb.adapters.visualizers.surface_view.ABCSurfaceDisplayer

Static SurfaceData visualizer - for visual inspecting imported surfaces in TVB. Optionally it can display associated RegionMapping entities.

get_form_class()[source]
get_required_memory_size()[source]
launch(surface, region_map=None, connectivity_measure=None, shell_surface=None, title='Surface Visualizer')[source]
class tvb.adapters.visualizers.surface_view.SurfaceViewerForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.visualizers.surface_view.BaseSurfaceViewerForm

static get_input_name()[source]
static get_required_datatype()[source]
tvb.adapters.visualizers.surface_view.ensure_shell_surface(project_id, shell_surface=None, preferred_type='Face Surface')[source]

time_series

A Javascript displayer for time series, using SVG.

class tvb.adapters.visualizers.time_series.ABCSpaceDisplayer[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

build_params_for_selectable_connectivity(connectivity)[source]
build_params_for_subselectable_ts(ts_h5)[source]

creates a template dict with the initial selection to be displayed in a time series viewer

get_space_labels(ts_h5)[source]
Returns:An array of strings with the connectivity node labels.
class tvb.adapters.visualizers.time_series.TimeSeries[source]

Bases: tvb.adapters.visualizers.time_series.ABCSpaceDisplayer

MAX_PREVIEW_DATA_LENGTH = 200
generate_preview(time_series, figure_size)[source]
get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return required memory.

launch(time_series, preview=False, figsize=None)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.time_series.TimeSeriesForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

time_series_volume

Backend-side for TS Visualizer of TS Volume DataTypes.

class tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiser[source]

Bases: tvb.adapters.visualizers.region_volume_mapping._MappedArrayVolumeBase

ensure_background(background_index)[source]
get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return required memory.

get_voxel_time_series(entity_gid, **kwargs)[source]

Retrieve for a given voxel (x,y,z) the entire timeline.

Parameters:
  • x – int coordinate
  • y – int coordinate
  • z – int coordinate
Returns:

A complex dictionary with information about current voxel. The main part will be a vector with all the values over time from the x,y,z coordinates.

launch(time_series, background=None)[source]
class tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiserForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

topographic

class tvb.adapters.visualizers.topographic.TopographicViewer[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

Interface between TVB Framework and web display of a topography viewer.

generate_preview(data_0, data_1=None, data_2=None, figure_size=None)[source]
get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return the required memory to run this algorithm.

launch(data_0, data_1=None, data_2=None)[source]
class tvb.adapters.visualizers.topographic.TopographicViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
class tvb.adapters.visualizers.topographic.TopographyCalculations[source]

Bases: builtins.object

static compute_topography_data(topography, sensor_locations)[source]

Trim data, to make sure everything is inside the head contour.

static normalize_sensors(points_positions)[source]

Centers the brain.

tract

A tracts visualizer .. moduleauthor:: Mihai Andrei <mihai.andrei@codemart.ro>

class tvb.adapters.visualizers.tract.TractViewer[source]

Bases: tvb.adapters.visualizers.time_series.ABCSpaceDisplayer

Tract visualizer

get_form_class()[source]
get_required_memory_size()[source]
launch(tracts, shell_surface=None)[source]
class tvb.adapters.visualizers.tract.TractViewerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]

wavelet_spectrogram

Plot the power of a WaveletCoefficients object

class tvb.adapters.visualizers.wavelet_spectrogram.WaveletSpectrogramVisualizer[source]

Bases: tvb.core.adapters.abcdisplayer.ABCDisplayer

Plot the power of a WaveletCoefficients object using SVG an D3.

generate_preview(input_data, **kwargs)[source]
get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return the required memory to run this algorithm.

launch(input_data, **kwarg)[source]
class tvb.adapters.visualizers.wavelet_spectrogram.WaveletSpectrogramVisualizerForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]