surf_qcplot

Plotting subject surface boundaries on top of matching volume

This function function will plot all surfaces generated with vol2surf() for a given subject (normally stored in “sub_surfaces/sub-[id]/”) and plot their boundaries on top of a selected .nii volume Because the surfaces are based on a volume rigidly coregistered to a template, the surfaces will match a volume generated with subseg_getvol(), i.e. “sub_volumes/sub-[id]/ants_coreg/T1_[template]_rigid_coreg.nii.gz” (or any volume likewise coregistered).

Note that as per subseg_getvol(), individual regions-of-interest (ROIs) will have been inflated and smoothed by default to minimise graphical artefacts, which will naturally be reflected in the plot: regions will appear with slightly wider boundaries than their original anatomy. Another logical result is that ROI boundaries will appear overlapping, but since the surfaces are processed by SubCortexMesh entirely separately, this has no effect on the metrics values (ROIs overlapping here cannot be mixed up in their calculation by mesh_metrics() or merge_all()).

param volpath:

The path to the volume to be plotted in the background (e.g., the T1 volume coregistered to fsaverage or fslfirst templates as part of subseg_getvol() in sub_volume/sub-[id]/ants_coreg/).

type volpath:

str, Path

param surfdir:

The path to the directory where subcortical .vtk meshes have been saved (normally, “sub_surfaces/sub-[id]”.

type surfdir:

str, Path

param vol_color_map:

Name of the color map to be assigned to the background volume, as listed in matplotlib’s colormaps. Default is “gray”.

type vol_color_map:

str

param outline_color_map:

Name of the color map to be assigned (in alphabetical order) to the subcortical surface outlines, as listed in matplotlib’s colormaps. Default is “tab20”.

type outline_color_map:

str

param roilabel:

The name(s) of the region(s)-of-interest to be included in the plot. Default is all subcortices across all segmentation templates: ‘left-cerebellum-cortex’, ‘right-cerebellum-cortex’, ‘left-pallidum’, ‘right-pallidum’, ‘left-putamen’, ‘right-putamen’, ‘left-thalamus’, ‘right-thalamus’,’left-amygdala’, ‘right-amygdala’, ‘left-hippocampus’, ‘right-hippocampus’, ‘left-accumbens-area’,’right-accumbens-area’,’left-caudate’, ‘right-caudate’, ‘left-ventraldc’, ‘right-ventraldc’, and ‘brain-stem’. Users can also omit the hemispheres to include both sides of a given ROI.

type roilabel:

str, Sequence

param default_mesh:

The index number corresponding to the region-of-interest to by plotted by default. 5 (left-hippocampus, for fsaverage) is the default.

type default_mesh:

int