Learn R Programming

fsbrain (version 1.0.0)

Managing and Visualizing Brain Surface Data

Description

Provides high-level access to neuroimaging data from standard software packages like 'FreeSurfer' on the level of subjects and groups. Load morphometry data, surfaces and brain parcellations based on atlases. Mask data using labels, load data for specific atlas regions only, and visualize data and statistical results directly in 'R'.

Copy Link

Version

Install

install.packages('fsbrain')

Monthly Downloads

475

Version

1.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Tim Schc3<a4>fer

Last Published

September 26th, 2026

Functions in fsbrain (1.0.0)

alphablend

Perform alpha blending for pairs of RGBA colors.
agg.res.long.to.wide

Reshape aggregated region data from long to wide format.
arrange.brainview.images.grid

Combine several brainview images as a grid into a new figure.
brain

Create fsbrain instance from 2 coloredmeshes.
apply.affine.to.coords

Apply a 4x4 affine matrix to vertex coordinates.
apply.transform

Apply affine transformation to input.
can.plot.colorbar.from.coloredmeshes

Determine whether colorbar can be plotted with given coloredmeshes.
check.segment.points

Check whether a matrix is a valid point matrix for coloredpaths.
cm.qual

Return the standard fsbrain qualitative colormap.
cm.heat

Return the standard fsbrain heat colormap.
arrange.brainview.images

Combine several brainview images into a new figure.
annot.outline.border.vertices

Compute the border vertices for each region in an annot.
annot.outline

Compute outline vertex colors from annotation.
apply.transform.to.tracts

Apply a 4x4 transformation matrix to tracts.
boxcoords.from.bbox

Compute the coordinates of the 8 corners of a 3D box.
bounding_sphere

Compute the bounding sphere of a set of 3D vertices.
brainview.t4

Visualize a list of colored meshes from four angles.
brainview.sd

Visualize a list of colored meshes from a single defined angle.
apply.label.to.morphdata

Load a label from file and apply it to morphometry data.
brainview.t9

Visualize a list of colored meshes from nine angles.
check.subjects.files

Report subjects missing files
collayer.from.morphlike.data

Compute surface color layer from morph-like data.
check.transform.matrix

Check a transformation matrix.
collayer.bg.atlas

Compute atlas or annotation surface color layer.
collayer.bg.meancurv

Compute binarized mean curvature surface color layer.
collayers.merge

Merge two or more color layers based on their transparency values.
clip.data

Clip data at quantiles to remove outliers.
check.subjectslist

Check whether the subjects_list looks good, warn if not.
collayer.bg

Compute binarized mean curvature surface color layer.
color_to_rgba

Convert an R color to an RGBA float vector
cm.seq

Return the standard fsbrain sequential colormap.
brainview.sr

Visualize a list of colored meshes, rotating the camera around them.
brainview.si

Visualize a list of colored meshes from a single viewpoint, interactively.
as.tract.bundle.list

Turn the various supported tract inputs into a list of bundles.
cluster.shell.alpha

Compute the alpha value of a cluster shell.
clip_fun

Get data clipping function.
apply.transform.matrix

Apply an affine transformation matrix to an object.
collayer.from.mask.data

Compute surface color layer from morph-like data.
collayer.from.annotdata

Compute surface color layer from annotation or atlas data.
coloredmesh.from.annot

Create a coloredmesh from an annotation of an atlas.
brainviews

Show one or more views of the given meshes in rgl windows.
cm.div

Return the standard fsbrain diverging colormap.
can.plot.colorbar

Determine whether colorbar can be plotted with given metadata.
collayer.from.annot

Compute surface color layer from annotation or atlas data.
cm.cbry

Get cyan blue red yellow colormap function.
collayer.bg.sulc

Compute binarized sulcal depth surface color layer.
coloredmesh.from.color

Create a coloredmesh from a mesh and pre-defined colors.
coloredmesh.from.preloaded.data

Generate coloredmesh from loaded data.
coloredmesh.from.morph.native

Create a coloredmesh from native space morphometry data.
coloredmesh.from.spheres

Create a coloredmesh that draws a set of spheres (e.g., connectome nodes).
coloredmesh.from.morphdata

Create a coloredmesh from arbitrary data.
coloredmesh.plot.colorbar.separate

Draw colorbar for coloredmeshes in separate 2D plot.
coloredmesh.from.mask

Create a coloredmesh from a mask.
coloredmesh_to_scimesh

Convert a single fs.coloredmesh to a scimesh mesh descriptor
coloredmesh.from.morph.standard

Create a coloredmesh from standard space morphometry data.
coloredmesh.from.label

Create a coloredmesh from a label.
coloredpaths.length

Get the number of segments of an fs.coloredpaths instance.
coloredpaths_to_scimesh

Convert an fs.coloredpaths instance to scimesh line layers
colors.have.transparency

Check for the given color strings whether they have transparency, i.e., an alpha channel value != fully opaque.
combine.colorbar.with.brainview.animation

Combine a colorbar and a brain animation in gif format into a new animation.
combine.colorbar.with.brainview.image.vertical

Combine a vertical colorbar and a brainview image into a new figure.
combine.colorbar.with.brainview.image

Combine a colorbar and a brainview image into a new figure.
constant.pervertexdata

Get vertex data for a single fs.surface or a hemilist of surfaces.
coloredmeshes.from.color

Create coloredmeshes for both hemis using pre-defined colors.
context.mesh.resolve.subjects.dir

Resolve the subjects dir for a context mesh.
coloredmeshes.combined.data.range

Retrieve combined data range from hemilist of coloredmeshes.
common.makecmap.range

Get cmap and colorlayer from data and makecmap_options.
colors.are.grayscale

Check for the given color strings whether they represent gray scale colors.
demographics.to.fsgd.file

Write FreeSurfer Group Descriptor (FSGD) file from demographics dataframe.
colorlist.brain.clusters

Return diverging color list
demographics.to.qdec.table.dat

Convert a dataframe containing demographics data to a qdec.table.dat file and related files.
desaturate

Perform simple desaturation or grayscale conversion of RGBA colors.
delete_all_optional_data

Delete all data in the package cache.
combine_bboxes

Combine two bounding boxes.
download_fs_LR_32_atlases

Download atlas files for the fs_LR 32k template.
compute.surface.contour.slices

Compute surface contour slice images (internal).
connectivity.matrix.from.edge.list

Convert an edge list to a connectivity matrix.
deepcopylist.long

Write deepcopy list for longitudinal subjects.
coloredmeshes.get.md

Retrieve metadata from hemilist of coloredmeshes.
deg2rad

Convert degree to radians
download_fs_LR_32_labels

Download label files for the fs_LR 32k template.
coloredmeshes_to_scimesh

Convert a hemilist of fs.coloredmeshes to a list of scimesh mesh descriptors
cube3D.tris

Return triangles for a 3D cube or cuboid.
cubes3D.tris

Vectorized version of cube3D.tris
download_fsaverage

Download the FreeSurfer v6 fsaverage subject.
draw.colorbar

Draw colorbar into background of current plot.
download_fsaverage_minimal

Download only essential FreeSurfer v6 fsaverage files for quick visualization.
download_optional_paper_data

Download extra data to reproduce the figures from the fsbrain paper.
download_fsaverage3

Download the FreeSurfer v6 low-resolution fsaverage3 subject.
demo

Show demo visualization to test whether fsbrain is setup correctly.
download_fs_LR_32_meshes

Download surface meshes for the fs_LR 32k template.
download_optional_data

Download optional data for this package if required.
draw.segments.on.image

Draw contour segments onto a magick image.
download_fsaverage6

Download the FreeSurfer v6 fsaverage6 subject.
download_fsaverage_atlases

Download atlas files for the fsaverage template subject.
ensure.fs.surface

Check whether parameter is an fs.surface instance.
eeg_coords

Internal function to get some demo EEG electrode coordinates. Will be removed from public API. Do not use this.
face.edges

Enumerate all edges of the given faces or mesh.
extract.volume.3D

Try to extract a 3D volume from the input argument.
export.coloredmesh.ply

Export a coloredmeshes with vertexcolors in PLY format.
extend_neighbors

Recursive computation of neighborhoods, see surf.sphere.dist
download_xtract_tracts

Download a white matter tract atlas (streamlines).
export

Export high-quality brainview image with a colorbar.
find.freesurferhome

Find the FREESURFER_HOME directory on disk.
ensure.tmesh3d

Ensure the mesh is a tmesh3d instance. Will convert fs.surfaces to one automatically.
filter_scene_by_view

Filter a scimesh scene to the meshes visible from a given view
find.subjectsdir.of

Find the subject directory containing the fsaverage subject (or others) on disk.
flc

Given a list of path coordinates, create matrix containing only the first and last point of each path.
fs.surface.as.adjacencylist

Turn surface mesh into a igraph and return its adjacency list representation.
fs.surface.to.tmesh3d

Get an rgl tmesh3d instance from a brain surface mesh.
fs.surface.vertex.neighbors

Compute vertex neighborhoods or the full adjacency list for a mesh using the Rvcg or igraph library.
fs.surface.to.igraph

Create igraph undirected graph from a brain surface mesh.
fslong.subjects.finished

Find completely run FreeSurfer long subjects in a recon-all long output folder.
fs.home

Return FreeSurfer path.
fs.coloredpaths

Create fs.coloredpaths instance from 2 point matrices.
fsbrain_style_to_scimesh_options

Map an fsbrain rendering style to scimesh render options
fslong.subjects.detect

Get subject names from sub directories of FreeSurfer long directory.
fup

Transform first character of a string to uppercase.
geodesic.circles

Compute geodesic circles and ball stats for given vertices.
gen.test.volume

Generate test 3D volume of integers. The volume has an outer background area (intensity value 'bg') and an inner foreground areas (intensity value 200L).
geodesic.dists.to.vertex

Simple internal wrapper around Rvcg::vcgDijkstra with function check.
geod.patches.color.overlay

Generate color overlay from geodesic patches around several vertices.
fs.value.list.from.agg.res

Create a named value list from a dataframe.
fsaverage.path

Return path to fsaverage dir.
geod.patches.color.overlay.singlehemi

Generate color overlay from geodesic patches around several vertices for a single hemi.
geod.patches.pervertexdata

Generate per-vertex distance data from geodesic patches around several vertices.
fsbrain.set.default.figsize

Set default figure size for fsbrain visualization functions.
fs.coloredmesh

fs.coloredmesh constructor
force.to.range

Change data to ensure requested data_range.
geodesic.path

Compute geodesic path from a source vertex to one or more target vertices.
get.atlas.region.names

Determine atlas region names from a subject.
get.fsbrain.renderer.backend

Get the current fsbrain renderer backend
get.fsbrain.scimesh.aa.samples

Get the anti-aliasing factor for the scimesh backend
geodesic.ballstats

Compute geodesic ball area and perimeter at location defined by geodists for all radii.
geodesic.average.distance

Compute the average (pseudo-) geodesic distance on the mesh from each vertex to all other vertices.
geod.patches.pervertexdata.singlehemi

Generate per-vertex distance data from geodesic patches around several vertices for a single hemi.
get.rglstyle.default

Get the default visualization style parameters as a named list.
get.fsbrain.scimesh.output.dims

Get the output image dimensions for the scimesh backend
fsbrain.renderable

Check whether object can be rendered by fsbrain
geod.vert.neighborhood

Compute all vertices within given geodesic distance on the mesh.
get.rglstyle.semitransparent

Get the semi-transparent visualization style parameters as a named list.
get.rglstyle.parameters

Produce the named list of style parameters from style definition.
get.rglstyle.glass

Get the glass visualization style parameters as a named list.
get_optional_data_filepath

Access a single file from the package cache by its file name.
getIn

Retrieve values from nested named lists
get.rglstyle.glass2

Get the glass2 visualization style parameters as a named list.
get.rglstyle.edges

Get the mesh edges visualization style parameters as a named list.
group.agg.atlas.native

Aggregate native space morphometry data over brain atlas regions and subjects for a group of subjects.
group.agg.atlas.standard

Aggregate standard space morphometry data over brain atlas regions and subjects for a group of subjects.
group.annot

Load annotations for a group of subjects.
group.concat.measures.native

Concatenate native space data for a group of subjects.
get.rglstyle

Get the default visualization style parameters as a named list.
get.rglstyle.shiny

Get a shiny visualization style.
group.label

Retrieve label data for a group of subjects.
group.label.from.annot

Extract a region from an atlas annotation as a label for a group of subjects.
get.slice.indices

Compute slice indices from slice definition.
group.concat.measures.standard

Concatenate standard space data for a group of subjects.
group.data.to.array

Convert group 2D data (1 vector per subject) to 4D array format.
group.morph.native

Retrieve native space morphometry data for a group of subjects.
group.morph.agg.standard.vertex

Aggregate standard space morphometry data over subjects.
get.view.angle.names

Get list of valid view angle names.
hemilist

Create a hemilist from lh and rh data.
get.subject.class

Construct FSGD Class name from group and non-continuous covariate columns.
hasIn

Check for values in nested named lists
group.morph.standard

Retrieve standard space morphometry data for a group of subjects.
group.morph.standard.sf

Read combined data for a group from a single file.
group.morph.agg.standard

Aggregate standard space (fsaverage) morphometry data over one hemisphere for a group of subjects.
hemilist.derive.hemi

Derive 'hemi' string from the data in a hemilist
group.morph.agg.native

Aggregate native space morphometry data over one hemisphere for a group of subjects.
group.multimorph.agg.native

Aggregate native space morphometry data for multiple measures over hemispheres for a group of subjects.
hemi.lobe.labels

Compute lobe labels for a single hemi from aparc atlas.
hemilist.unwrap

Unwrap hemi data from a named hemi list.
hemilist.wrap

Wrap data into a named hemi list.
hemilist.from.prefixed.list

Create a hemilist from a named list with keys prefixed with 'lh_' and 'rh_'.
hemilist.get.combined.data

Get combined data of hemi list
hex_to_rgba

Convert hex color string to RGBA float vector
highlight.vertices.spheres

Draw small 3D spheres at given brain mesh vertices. Supports full brain (2 meshes) as well.
group.multimorph.agg.standard

Aggregate standard space (fsaverage) morphometry data for multiple measures over hemispheres for a group of subjects.
highlight.points.spheres

Draw small 3D spheres at given points.
index2ras_tkr

The affine matrix that maps 1-based R array indices to surface RAS.
groupmorph.split.hemilist

Split a per-vertex group data matrix for both hemispheres into a hemilist at given index.
hemlist.ensure.contains

title Ensure an key for a hemilist exists.
highlight_points_to_scimesh

Convert highlight points (rglactions) to scimesh sphere meshes
is.Triangles3D

Check whether object is a Triangles3D instance
handle.rglactions.highlight.points

Highlight requested points (if any), for camera-based views.
hex_colors_to_rgba_matrix

Convert a vector of hex colors to an Nx4 RGBA float matrix
is.hemilist

Check whether x is a hemilist
is.fs.coloredvoxels

Check whether object is an fs.coloredvoxels instance (S3)
highlight.vertices.on.subject

Highlight vertices given by index on a subject's meshes by coloring faces.
group.surface

Retrieve surface mesh data for a group of subjects.
highlight.vertices.on.subject.spheres

Highlight vertices given by index on a subject's meshes by coloring faces.
is.fs.coloredmesh

Check whether object is an fs.coloredmesh (S3)
images.annotate

Annotate image with text.
images.same.height

Extent all images to the height of the image with maximal height.
is.fsbrain

Check whether object is an fsbrain (S3)
is.fs.coloredpaths

Check whether object is an fs.coloredpaths instance (S3)
hull.retain.along.axis

Copy the first n foreground voxel values.
images.dimmax

Compute max width and height of magick images.
group.start.rows

Compute the first row of every group in a concatenated matrix.
label.colFn.inv

A simple colormap function for binary colors.
label.from.annotdata

Extract a region from an annotation as a label.
label.to.annot

Merge several labels into an annotation
limit_fun

Get data limiting function.
images.rescale.to.max.canvas

Rescale all images canvas to match the largest one.
labeldata.from.mask

Create labeldata from a mask.
label.border.fast

Compute border vertices of a label using Rvcg.
label.colFn

A simple colormap function for binary colors.
list_optional_data

Get file names available in package cache.
limit_fun_na

Get data limiting function to NA.
limit_fun_na_inside

Get data limiting function, setting values inside range to NA.
images.same.width

Extent all images to the width of the image with maximal width.
mesh.slice.intersection

Compute intersection of a triangular surface mesh with an axis-aligned plane.
mesh.ras2crs

Transform surface vertices from surface RAS to 0-based volume CRS space.
mesh.atlas.check.files

Check that a mesh atlas is available for a subject.
list.tract.bundle.files

List the bundle files of a tract atlas directory.
magick.grid

Arrange a multi-frame ImageMagick image into a grid.
normalize.region.names

Normalize a region name for matching.
label.border

Compute border of a label.
mesh.atlas.restrict.faces

Remove all faces that use one of the given vertices and renumber the remaining ones.
mesh.atlas.resolve.subjects.dir

Find a subjects dir that contains a mesh atlas for a subject.
mesh.atlas.file.paths

Get the file paths of a mesh atlas for a subject.
mesh.atlas.hide.nan.vertices

Hide the vertices that carry NaN data in a coloredmesh.
mkco.seq

Return recommended 'makecmap_options' for sequential data.
normalize

Normalize data.
mkco.cluster

Return recommended 'makecmap_options' for diverging cluster data.
mesh.atlas.context.layer

Compute the context layer of a mesh atlas visualization.
mesh.weld

Weld the vertices of a mesh and remove degenerate faces.
mask.from.labeldata.for.hemi

Create a binary mask from labels.
mesh.vertex.neighbors

Compute neighborhood of a vertex
mergehemi.annots

Merge the annotations from two hemispheres into one annot.
mesh.atlas.all.regions.hidden

Check whether all regions of a mesh atlas visualization are hidden.
match.bundle.values

Match per-bundle values to the bundles.
numverts.rh

Determine vertex count of right hemi from hemilist of surfaces or the count itself.
pervertexdata.smoothnn

Perform iterative nearest-neighbor smoothing of per-vertex data.
pervertexdata.smoothgaussian

Perform Gaussian smoothing
path.colors.from.orientation

Compute path color from its orientation.
qc.from.regionwise.df

Perform data quality check based on a dataframe containing aggregated region-wise data.
pervertexdata.smoothnn.compute.fwhm

Compute expected FWHM from given number of neighborhood smoothing iterations.
qc.for.group

Perform data quality check based on computed region stats.
numverts.lh

Determine vertex count of left hemi from hemilist of surfaces or the count itself.
pervertexdata.smoothnn.compute.numiter

Compute number of neighborhood smoothing iterations to reach requested fwhm.
perform.na.mapping

Perform NA mapping for transparency
path.slopes

Compute slopes of paths relative to axes.
mesh.vertex.included.faces

Return all faces which are made up completely of the listed vertices.
perform.rglactions

Perform rglactions, like taking screenshots.
read.md.subjects

Read subjects file
read.md.demographics

Read demographics file
principal.curvatures

Computes principal curvatures according to 2 definitions from raw k1 and k2 values.
mkco.heat

Return recommended 'makecmap_options' for sequential data with heatmap style.
per.hemi.vertex.indices

Transform surfaces indices which go over two surfaces to per-hemi indices.
pp.named.list

Pretty-print a named list or vector.
mkco.div

Return recommended 'makecmap_options' for diverging data.
qc.from.segstats.tables

Perform data quality check based on a segstats table.
qc.from.segstats.table

Perform data quality check based on a segstats table.
qdec.table.skeleton

Generate skeleton dataframe for FreeSurfer QDEC long file from subjects list.
regions.to.ignore

Give suggestions for regions to ignore for an atlas.
recycle

Recycle parameters or whatever.
print.fs.coloredvoxels

Print description of fs.coloredvoxels (S3).
print.fsbrain

Print description of an fsbrain (S3).
rad2deg

Convert raduians to degree
ras2vox_tkr

The FreeSurfer default ras2vox_tkr matrix.
read.colorcsv

Read colors from CSV file.
qc.vis.failcount.by.region

Visualize the number of outlier subjects per region in your dataset.
qdec.table.filter

Filter QDEC long table for subjects.
rglactions

Create rglactions list, suitable to be passed as parameter to vis functions.
read.md.subjects.from.fsgd

Read subjects list from an FSGD file.
print.fs.coloredmesh

Print description of a brain coloredmesh (S3).
rglactions.has.key

Check for a key in names of rglactions.
qc.fslong.checkidenticaldata

Check whether subjects for FS longitudinal pipeline contain data that is identical between time points.
scale01

Scale given values to range 0..1.
shell.cut.away

Cut away part of a mesh.
safe.image.trim

Safe wrapper around magick::image_trim that handles blank images.
shift.hemis.apart

Shift hemispheres apart.
renderables_to_line_layers

Collect the scimesh line layers of all fs.coloredpaths instances in a renderable list
qc.report.html

Create visual quality check report from QC result.
rglot

Get rgloptions for testing.
rglvoxels

Draw 3D boxes at locations using rgl.
resolve.template.subjects.dir

Resolve the subjects dir which contains a template subject.
shell.extract.mesh

Extract the iso-surface mesh of a volume at one level.
report.on.demographics

Print a demographics report
rglo

Get rgloptions and consider global options.
shell.volume.data

Extract the 3D data array of a volume.
rglactions.transform

Apply data transformation rglactions.
rgl.coord.lines

Plot x, y and z axes in R,G,B.
spread.values.over.subject

Spread the values in the region_value_list and return them for one hemisphere.
shell.backend

Determine the backend used for iso-surface extraction.
shell.coloredmeshes

Create the coloredmeshes of the shells.
spread.values.over.hemi

Spread the values in the region_value_list and return them for one hemisphere.
shape.descriptor.names

Get all shape descriptor names.
print.fs.coloredpaths

Print description of an fs.coloredpaths instance (S3).
spread.values.over.annot

Spread a single value for a region to all region vertices.
shape.descriptors

Computes geometric curvature-based descriptors.
sjd.demo

Download optional demo data if needed and return its path.
streamlines.to.segments

Compute the line segments of streamlines.
segment_bbox

Compute the bounding box of line segments.
segment.orientation.colors

Color line segments by their direction.
read.tract.bundles

Read tract (streamline) files into named bundles.
shell.levels

Compute the iso-levels of the shells.
rotation.matrix

Build a 4x4 rotation matrix (Rodrigues formula).
rotation.matrix.for.axis.rot

Get rotation matrix for a 3D rotation around an axis.
subject.annot.border

Compute annot border vertices.
subject.annot

Load an annotation for a subject.
subdivide.triangles

Subdivide all triangles of a mesh (one subdivision step).
sortcoloredmeshes.by.hemi

Sort coloredmeshes into 2 lists by their 'hemi' property.
streamlines.to.tracts

Turn a list of streamlines into an fs.tracts instance.
shift.hemis.rglactions

Shift hemis apart if indicated in rglactions
sjld

Get subjects list from subjects.txt file in dir.
subject.atlas.agg

Aggregate morphometry data over brain atlas regions for a subject.
sph2fs

Transform spherical coordinates to FreeSurfer surface space to plot things around a brain.
subject.filepath.morph.native

Construct filepath of native space morphometry data file.
subject.filepath.morph.standard

Construct filepath of standard space morphometry data file.
subject.descriptor.geodesic.average.distance

Compute mean geodesic distance descriptor for a subject.
subject.label

Retrieve label data for a single subject.
subject.label.from.annot

Extract a region from an atlas annotation as a label for a subject.
shell.palette

Compute the colors and alpha values of the shells.
subject.morph.standard

Retrieve standard space morphometry data for a single subject.
subject.morph.native

Retrieve native space morphometry data for a single subject.
subject.filepath.any

Construct filepath of any freesurfer file.
subject.dir.has.core.files

Check whether a subject directory contains the essential files of a subject.
subject.region.centroids

Compute the centroid of every region of an atlas on a surface.
subject.num.verts

Get subjects vertex count.
subject.report.html

Create visual quality check report from QC result.
spheres.mesh

Compute the mesh of a set of spheres.
subject.mask

Compute a mask for a subject.
subject.lobes

Load labels representing brain lobes.
subject.surface

Load a surface for a subject.
subject.volume

Read a brain volume.
submesh.vertex

Create a submesh including only the given vertices.
surf.center.fsaverage

Get pre-computed center for fsaverage white surface.
surf.sphere.gaussianweights

Compute Gaussian weights
subject.vol2surf

Project a volume onto the cortical surface of a subject using its own (native) space.
surf.avg.vertexradius

Compute average distance from the origin to each vertex.
surf.sphere.dist

Compute vertex neighborhoods on a sphere based on the given max distance along the sphere.
surf.metric.properties

Compute metric surface properties.
surf.sphere.spatialfilter

Apply spatial filter to surface data.
surf.radius.fsaverage

Get pre-computed radius for fsaverage white surface.
surface.interpolate.frac

Compute the vertex positions at a given fraction between two surfaces.
take.screenshot

Take screenshot of rgl scene, with fallback for systems without X11.
tmesh3d.to.fs.surface

Get an fs.surface brain mesh from an rgl tmesh3d instance.
test.numerical.meandiff.unpaired

Perform tests for group differences on unpaired data for two groups.
vdata.split.by.hemi

Split morph data vector at hemisphere boundary.
surface.curvatures

Compute the k1 and k2 principal curvatures of a mesh.
values.to.colorlayer

Map values to a color layer and the matching colorbar metadata.
track.length

Compute the total length of a path given by the coordinates of its points.
surfs.props

Compute simple version of center and radius of 2 meshes.
test.numerical.meandiff

Perform tests for group differences on paired or unpaired data for two groups.
vertex.hemis

Return the proper hemi string ('lh' or 'rh') for each vertex.
vertex.coords

Return coordinates for vertices, supporting entire brain via hemilist.
symmrange

Given data, compute symmetric range around zero.
test.numerical.meandiff.paired

Perform tests for group differences on paired data (repeated measurements) for two conditions or time points.
template.vol2surf

Project a volume onto a template surface like fsaverage or fs_LR_32.
translation.matrix

Create a 4x4 translation matrix.
tract.bundle.name.from.file

Compute the bundle name for a tract file.
view.angle.to.hemi.filter

Get the hemisphere filter for a view angle
unit.icosphere

Compute the vertices and faces of a unit icosphere (subdivision surface of the icosahedron).
values.to.range

Scale values into a given range.
view_angle_to_scimesh_camera

Map an fsbrain view angle to a scimesh camera
vis.connectome

Visualize a connectivity matrix as a connectome on a brain surface.
vis.color.on.subject

Visualize pre-defined vertex colors on a subject.
vis.colortable.legend

Create a separate legend plot for a colortable or an annotation.
vis.data.on.fsaverage

Visualize arbitrary data on the fsaverage template subject, if available.
vis.coloredmeshes.rotating

Visualize a list of colored meshes in a single scene and rotate them, movie-style.
vis.coloredmeshes

Visualize a list of colored meshes in a single scene.
vis.coloredpaths

Draw the segments of an fs.coloredpaths instance with rgl.
vis.coloredmesh

Draw a coloredmesh using a style.
view_label3d

Draw a view label at a position, compensating for the camera rotation.
vis.data.on.group.standard

Visualize standard space data for a group on template.
vis.group.coloredmeshes

Plot coloredmeshes for a group of subjects.
vis.fs.surface

Visualize fs.surface mesh
vis.export.from.coloredmeshes

Export high-quality brainview image with a colorbar.
vis.group.annot

Plot atlas annotations for a group of subjects.
vis.group.morph.standard

Plot standard space morphometry data for a group of subjects.
vis.dti.trk

Visualize DTI tracks from Diffusion Toolkit/TrackVis TRK format file.
vis.group.morph.native

Plot native space morphometry data for a group of subjects.
vis.data.on.subject

Visualize arbitrary data on the surface of any subject.
vis.data.on.group.native

Visualize native space data on a group of subjects.
vis.rglwidget

Visualize coloredmeshes as an interactive rgl WebGL widget for use in R Shiny apps and RMarkdown documents.
vis.labeldata.on.subject

Visualize a label on the surface of a subject.
vis.paths

Visualize many paths.
vis.renderable

Visualize a renderable object
vis.path.along.verts

Draw a 3D line from vertex to vertex
vis.mask.on.subject

Visualize a vertex mask on the surface of a subject.
vis.seg.legend

Plot legend for a brain volume segmentation based on colorLUT.
vis.region.values.on.subject

Visualize arbitrary data, one value per atlas region, on the surface of any subject (including template subjects).
vis.paths.along.verts

Visualize several paths in different colors.
vis.rotated.coloredmeshes

Rotate and visualize coloredmeshes, applying a style.
vis.subject.annot

Visualize an annotation for a subject.
vis.symmetric.data.on.subject

Visualize clusters or activation data on the surface of any subject.
vis.volume.clusters

Visualize clusters of a volume inside a translucent anatomical mesh.
vis.subject.morph.native

Visualize native space morphometry data for a subject.
vis.subject.morph.standard

Visualize native space morphometry data for a subject or a group.
vis.view

Render renderables for a static view and orient the camera (camera-based).
vis.tracts

Visualize white matter tracts (streamlines) on the cortical surface.
vis.subcortical.region.values

Visualize one value per region of the subcortical atlas of a subject.
vis.subject.label

Visualize a binary label for a subject.
vis.subject.pre

Visualize pre-loaded data.
vol.boundary.box

Compute 3D bounding box of a volume.
vol.boundary.mask

Compute foreground pixels over the whole 3D imagestack.
vis.volume.on.surface

Visualize a brain volume overlaid on a cortical surface in 3D.
vol.boundary.box.apply

Apply a boundary box to a volume, returning the inner volume part
vislayout.from.coloredmeshes

Visualize coloredmeshes from several angles and combine the images into a new figure.
vol.frac.vertices

Compute the vertex coordinates of a (possibly interpolated) surface for one hemisphere.
vol.find.file

Compute the filepath of a volume file.
vol.check.surface.frac

Check and normalize the surface_frac parameters.
vol.apply.cortex.mask

Apply the cortex mask to projected data.
vol.check.interpolation

Check and normalize the interpolation parameter.
vol.planes

Translate names and indices of planes.
vol.plane.axes

Get indices of the axes defining the given plane.
vol.intensity.to.color

Convert integer intensity image to RGB color string form.
vol.imagestack

Turn volume into an ImageMagick image stack.
vol.merge

Merge background volume and overlay to new colors.
vol.mask.from.segmentation

Extract subset from a volume by value.
vol.hull

Retain only the outer hull voxels of the foreground.
vol.overlay.colors.from.colortable

Compute voxel colors based on colortable.
vol.overlay.colors.from.activation

Generate colors for a 3D volume, based on the activation data and a colormap.
vol.load

Load a volume (from file or memory) and return the data along with the affine transformation.
vol.sample.nearest

Sample a 3D volume at the given voxel coordinates using nearest neighbor interpolation.
vol.vox.from.crs

Compute R voxel index for FreeSurfer CRS voxel index.
vol.slice

Extract a slice of a 3D image stack.
vol.sample.at.coords

Sample a 3D volume at world coordinates.
vol.tkreg.affine

Transform a volume affine matrix into the FreeSurfer tkregister convention.
vol.sample.trilinear

Sample a 3D volume at the given voxel coordinates using trilinear interpolation.
vol.warn.outside

Warn about surface vertices which are outside the volume.
vol.select.frame

Select a single frame (3D volume) from a volume array.
vol.vol2surf.hemilist

Project a volume onto the vertices of the given surfaces (internal workhorse).
vol.read.file.with.affine

Load a volume file and return the data along with the affine transformation.
volume.boxblur

Smooth a volume with a 3x3x3 box blur.
volvis.lb

Show continuous 3D voxel/volume data as a lightbox, optionally with a background brain volume and colormap.
volvis.contour

Visualize contour of a volume.
volume.cluster.threshold

Compute the cluster threshold of a volume.
volume.subsample.matrix

Compute the transform between the voxel space of a subsampled volume and the original voxel space.
volume.cluster.levels

Compute the iso-levels of the cluster shells.
volume.clusters.colormap

Compute the shared colormap of the cluster shells.
volume.boxblur.axis

Apply a 1D 3-element box blur along one axis of a 3D array.
volume.subsample

Subsample a volume.
volume.cluster.extremes

Compute the highest iso-level per sign.
vox2ras_tkr

The FreeSurfer default vox2ras_tkr matrix.
wrapped.image.append

Wrapper around magick::image_append that allows specifying the background color when working with images of different width/height.
write.group.morph.standard.sf

Reshape and write combined per-vertex data for a group to a single MGH file.
volvis.voxels

Voxel-based visualization of volume mask at surface RAS positions.
write.group.morph.standard

Write standard space group data to a standard FreeSurfer directory stucture.
volvis.lb.with.surface

Visualize volume slices with surface mesh contours overlaid in lightbox view.
volvis.lightbox

Draw a lightbox view from volume slices.
write.group.morph.standard.mf

Write per-vertex standard space data for a group of subjects to given file names.
volvis.slices.with.surface

Export individual volume slices with surface contours to image files.
volvis.shells

Visualize a volume as nested, semi-transparent iso-surface shells.
write.region.values.fsaverage

Write one value per atlas region for a template subject.
write.region.values

Write one value per atlas region for a subject.
write.group.morph.standard.singlehemi

Write single hemi per-vertex data for a group of subjects to given file names.
write.region.aggregated

Write data aggregated over regions to morphometry file for group.
FSBRAIN_SCIMESH_DEFAULT_AA

The default anti-aliasing factor of the scimesh backend
Triangles3D.to.coloredmesh

Convert a misc3d Triangles3D iso-surface to a coloredmesh.
apply.labeldata.to.morphdata

Apply a label to morphometry data.
apply.style.alpha

Extract the alpha value from resolved style parameters