osl_dynamics.utils.workbench#

Functions to use Connectome Workbench.

Attributes#

Functions#

setup(path)

Sets up workbench.

render(img[, save_dir, interptype, gui, inflation, ...])

Render map in workbench.

create_scene(cifti_left, cifti_right, inflation, ...)

visualise(cifti_left, cifti_right[, inflation, temp_scene])

image(cifti_left, cifti_right, file_name[, inflation, ...])

volume_to_surface(nii, surf, output[, interptype])

dense_timeseries(cifti, output, left_or_right)

Module Contents#

osl_dynamics.utils.workbench.surfs[source]#
osl_dynamics.utils.workbench.setup(path)[source]#

Sets up workbench.

Adds workbench to the PATH environmental variable.

Parameters:

path (str) – Path to workbench installation.

Return type:

None

osl_dynamics.utils.workbench.render(img, save_dir=None, interptype='trilinear', gui=True, inflation=0, image_name=None, input_is_cifti=False)[source]#

Render map in workbench.

Parameters:
  • img (str) – Path to image file.

  • save_dir (str, optional) – Path to save rendered surface plots.

  • interptype (str, optional) – Interpolation type. Default is 'trilinear'.

  • gui (bool, optional) – Should we display the rendered plots in workbench? Default is True.

  • image_name (str, optional) – Filename of image to save.

  • input_is_cifti (bool) – Whether the input file is a CIFTI file.

  • inflation (int)

Return type:

None

osl_dynamics.utils.workbench.create_scene(cifti_left, cifti_right, inflation, temp_scene)[source]#
Parameters:
  • cifti_left (pathlib.Path)

  • cifti_right (pathlib.Path)

  • inflation (int)

  • temp_scene (str)

Return type:

None

osl_dynamics.utils.workbench.visualise(cifti_left, cifti_right, inflation=0, temp_scene=None)[source]#
Parameters:
  • cifti_left (pathlib.Path)

  • cifti_right (pathlib.Path)

  • inflation (int)

  • temp_scene (Optional[str])

Return type:

None

osl_dynamics.utils.workbench.image(cifti_left, cifti_right, file_name, inflation=0, temp_scene=None)[source]#
Parameters:
  • cifti_left (pathlib.Path)

  • cifti_right (pathlib.Path)

  • file_name (str)

  • inflation (int)

  • temp_scene (Optional[str])

Return type:

None

osl_dynamics.utils.workbench.volume_to_surface(nii, surf, output, interptype='trilinear')[source]#
Parameters:
  • nii (pathlib.Path)

  • surf (str)

  • output (pathlib.Path)

  • interptype (str)

Return type:

None

osl_dynamics.utils.workbench.dense_timeseries(cifti, output, left_or_right)[source]#
Parameters:
  • cifti (pathlib.Path)

  • output (pathlib.Path)

  • left_or_right (str)

Return type:

None