fsimport.serialise: 'Freesurfer' Import (Serialise)

Description Usage Arguments Value Author(s) Examples

View source: R/rsurfer.R

Description

Calls fsimport() and once that data frame is created it is serialised to the file specified by serialisationLocation. However, if this file already exists when the function is run, then it will unserialise the file instead of calling fsimport(). This saves constant running of 'Freesurfer' scripts when running code thus saving execution time for code to run.

Usage

1
2
3
4
5
6
fsimport.serialise(subjectDir, serialisationLocation,
  fields = c("lh.cortical.thickness", "rh.cortical.thickness",
  "lh.cortical.volume", "rh.cortical.volume", "lh.cortical.thickness.std",
  "rh.cortical.thickness.std", "lh.cortical.area", "rh.cortical.area",
  "lh.subcortical", "rh.subcortical", "lh.hippocampal", "rh.hippocampal"),
  verbose)

Arguments

subjectDir

The directory containing the subject subdirectories

serialisationLocation

The location where the serialised file is saved to and loaded from

fields

The field groups to use, see fsimport() for more details

verbose

Whether to log the 'Freesurfer' scripts to the R console

Value

The subject data processed from 'Freesurfer'

Author(s)

Alexander Luke Spedding, alexspedding271@gmail.com

Examples

1
2
3
4
5
## Not run: 
setfshome("/Applications/freesurfer")
fsimport.serialise("~/Subjects", serialisationLocation = "~/data.rds")

## End(Not run)

rsurfer documentation built on May 2, 2019, 4:20 a.m.