fmridisplay methods, organized by area

May 7, 2026 · View on GitHub

The fmridisplay class is a CANlab display container for anatomical underlays plus one or more activation maps rendered as montages, surfaces, and / or SPM orthviews. Unlike fmri_data / atlas, it is not a subclass of image_vector — it is a standalone class whose job is to hold the graphics state of a multi-panel brain figure and to expose methods for adding, removing, and styling blobs and points on it. The default underlay is fmriprep20_template.nii.gz (MNI152NLin2009cAsym); other underlays can be supplied via the 'overlay' constructor argument (e.g., the legacy SPM8 single-subject T1, or the Keuken 2014 enhanced underlay used prior to 2024).

A typical workflow is o2 = fmridisplay; o2 = montage(o2, ...); o2 = addblobs(o2, region_obj, ...); then legend(o2). All methods listed below are defined on the fmridisplay class itself — there is no inheritance. Use methods(fmridisplay) in MATLAB for the live list, and help fmridisplay.montage / help fmridisplay.render_blobs for the full list of slice-display and rendering options.

Properties

PropertyDescription
overlayFilename of the anatomical underlay image used for slice montages
SPACESampling-space struct returned by define_sampling_space(spm_vol(overlay))
activation_mapsCell array of activation-map structs added by addblobs (graphics handles, color info, etc.)
montageCell array of montage structs, one per registered montage, each with axis_handles, slice info, etc.
surfaceCell array of registered surface plot structs (handles + metadata)
orthviewsCell array of registered SPM-orthviews plot structs
historyCell array: names of methods applied to this object, in order
history_descripDescription string for the history field (legacy / introspection)
additional_infoFree-form struct for attaching arbitrary metadata (legacy / extension slot)

Display and visualization

Adding, removing, and styling brain panels and overlays. Most of these require a graphics environment (won't fully work in headless matlab -batch).

MethodFromOne-liner
montagefmridisplayCreate a slice montage (axial / saggital / coronal) and register it on the object
surfacefmridisplayAdd cortical surface(s) to the figure and register them on the object
addblobsfmridisplayRender a region/cluster object as blobs on every registered montage and surface
addthreshblobsfmridisplayAdd blobs from a statistic_image at multiple thresholds (single color)
addpointsfmridisplayPlot point coordinates (with optional text/markers) on registered montages
removeblobsfmridisplayRemove all rendered blobs (and their legends) from the object
removepointsfmridisplayDelete plotted point handles from every montage
legendfmridisplayBuild a colorbar legend for the object's activation maps
title_montagefmridisplayAdd a title to a registered montage (by montage index)
transparency_changefmridisplayScale the transparency (AlphaData) of all rendered blobs
zoom_in_on_regionsfmridisplayZoom each per-region axis in a montage onto its cluster
activate_figuresfmridisplayBring the object's figures (or a montage subset) to the front