Visualizaing functional data

This module contains low level utilities for displaying fMRI data. Check first if the classes in subject_viewer can be used for your application.

class fMRI_blender[source]

Blend an fMRI map with an structural image

get_blended_img()[source]

Get blended image

Returns:Blended vtkImageData
set_images(mri_image, fmri_image)[source]

Sets structural and fMRI images

Parameters:
Returns:

Blended vtkImageData

set_luts(mri_lut, fmri_lut)[source]

Set lookuptables for both images

Parameters:
get_fmri_lut(*args, **kwargs)[source]

Returns a standard look up table for fMRI data

If alpha is True, the opacity of the colors below the threshold will be less than one, more precisely, the opacity will be a ramp from 0 to 1 between 0 and the threshold

Parameters:
  • alpha (bool) – If True use a lookup table
  • threshold (float) – Value at which color starts to fade (lower opacity) if alpha is True minimum value shown
  • n_pts (int) – Number of points for the lookup table
Returns:

vtkLookuptable

class time_slice_viewer(orientation=0)[source]

Class for displaying a single slice of a time-moment in BOLD time series

set_input(input_data, spatial_pos=0, time=0, orientation=0)[source]

Sets the input 4D image, the position across the perpendicular axis, the time point and the orientation

Parameters:
  • input_data (vtkImageData) – bold 4d image
  • spatial_pos (int) – index of the slice along the perpendicular axis
  • time (float) – time point of interest
  • Orientation (int) – 0:x , 1:y, 2:z
set_time_point(time)[source]

Set the time point at which the time series should be sampled

Parameters:time (float) – Time in seconds of the volume of interest
set_window_level(window, level)[source]

Sets window and level for the display image

Parameters:
  • window (float) – window value
  • level (float) – level value
set_z_spacing(spacing)[source]

spacing in perpendicular axis, used to position the resulting slice in the right place

Parameters:spacing (float) – Image spacing in the perpendicular axis