Learn R Programming

freesurfer

The goal of freesurfer is a port/wrapper of Freesurfer to R.

Much of the operations of Freesurfer are incorporated. This package is very useful for structural imaging, such as MRI. Some of the fMRI functionality has not been ported or has limited capability.

Installation

You can install the released version of freesurfer from CRAN with:

install.packages("freesurfer")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("muschellij2/freesurfer")

Copy Link

Version

Install

install.packages('freesurfer')

Monthly Downloads

296

Version

1.8.1

License

GPL-3

Maintainer

John Muschelli

Last Published

May 12th, 2025

Functions in freesurfer (1.8.1)

mri_mask

Use Freesurfers MRI Mask
mri_mask.help

MRI Normalize Help
mris_convert_curv

Convert Curvature file
fs_imgext

Determine extension of image based on FSLOUTPUTTYPE
fs_lut

Freesurfer look up table (LUT)
mris_convert_annot

Convert Annotation file
fs_cmd

FS Command Wrapper
have_fs

Logical check if Freesurfer is accessible
mnc2nii

Convert MNC to NIfTI
mri_deface

MRI Deface
read_fs_label

Read Label File
get_fs

Create command declaring FREESURFER_HOME
get_fs_output

Determine Freesurfer output type
mri_segment

Use Freesurfers MRI Segmentation Algorithm
mris_euler_number

MRI Euler Number
fs_help

Wrapper for getting Freesurfer help
mri_surf2surf

Use Freesurfers mri_surf2surf function to resamples one cortical surface onto another
mri_convert.help

MRI Normalize Help
mri_surf2surf.help

Freesurfers mri_surf2surf Help
mri_segment.help

MRI Segment Help
nu_correct

Use Freesurfers Non-Uniformity Correction
freesurferdir

Get Freesurfer's Directory
freesurfer_read_surf

Read Freesurfer Surface file
mri_info

MRI information
mri_info.help

MRI information Help
mri_normalize

Use Freesurfers MRI Normalize Algorithm
mris_euler_number.help

MRI Euler Number Help
nii2mnc.help

Convert NIfTI to MNC Help
nii2mnc

Convert NIfTI to MNC
surf_convert

Convert Surface Data to ASCII
surface_to_obj

Convert Freesurfer Surface to Wavefront OBJ
read_fs_table

Read Freesurfer Table Output
mnc2nii.help

MNC to NIfTI Help
recon_con1

Reconstruction from Motion Correction to Skull Strip
reconner

Reconstruction Helper for recon from Freesurfer
trac_prep

Tract Reconstruction for Each Step
tracker

Tract Reconstruction Helper for trac-all from Freesurfer
mri_watershed

Use Freesurfers MRI Watershed Algorithm
mri_watershed.help

MRI Watershed Help
mri_synthstrip

Use Freesurfers MRI SynthStrip
mri_convert

Use Freesurfers MRI Converter
mri_synthstrip.help

MRI Normalize Help
mri_normalize.help

MRI Normalize Help
nu_correct.help

Non-Uniformity Correction Help
run_check_fs_cmd

Run and Check a Freesurfer Command
set_fs_subj_dir

Set Freesurfer Subjects Directory
mris_convert

Use Freesurfers MRIs Converter
mris_convert.help

Help file for Freesurfers MRIs Converter
mris_convert_normals

Convert Surface to Surface normals
mris_convert_vertex

Convert Surface to vertex file
readmgz

Read MGH or MGZ File
surface_to_triangles

Convert Freesurfer Surface to Triangles
readmnc

Read MNC File
trac_all

Tract Reconstruction Helper for trac-all from Freesurfer for All Steps
read_annotation

Read Freesurfer annotation file
recon_all

Reconstruction from Freesurfer for All Steps
recon

Reconstruction from Freesurfer
read_aseg_stats

Read Anatomical Segmentation Statistics
asegstats2table.help

Parcellation Stats to Table Help
check_fs_result

Check Freesurfer Result
freesurfer_read3

Freesurfer Read 3 records
aparcstats2table.help

Parcellation Stats to Table Help
convert_surface

Convert Freesurfer Surface
construct_subj_dir

Construct Subject Directory
aparcs_to_bg

Convert Freesurfer aparcs Table to brainGraph
aparcstats2table

Parcellation Stats to Table
asegstats2table

Parcellation Stats to Table
checkmnc-methods

Force object to filename with .mnc extension
freesurfer_read_curv

Read Freesufer Curv file
freesurfer_read3_con

Freesurfer Read 3 records
fs_subj_dir

Determine Freesurfer Subjects Directory
fs_version

Find Freesurfer Version