read.fs.weight: Read file in FreeSurfer weight or w format

View source: R/read_fs_weight.R

read.fs.weightR Documentation

Read file in FreeSurfer weight or w format

Description

Read morphometry data in weight format (aka 'w' files). A weight format file contains morphometry data for a set of vertices, defined by their index in a surface. This can be only a **subset** of the surface vertices.

Usage

read.fs.weight(filepath, format = "auto")

Arguments

filepath

string. Full path to the input weight file. Weight files typically have the file extension '.w', but that is not enforced.

format

one of 'auto', 'asc', or 'bin'. The format to assume. If set to 'auto' (the default), binary format will be used unless the filepath ends with '.asc'.

Value

the indices and weight data, as a named list. Entries: "vertex_indices": vector of *n* vertex indices. They are stored zero-based in the file, but are returned one-based (R-style). "value": double vector of length *n*, the morphometry data for the vertices. The data can be whatever you want.

See Also

Other morphometry functions: fs.get.morph.file.ext.for.format(), fs.get.morph.file.format.from.filename(), read.fs.curv(), read.fs.mgh(), read.fs.morph.gii(), read.fs.morph(), read.fs.volume(), write.fs.curv(), write.fs.label.gii(), write.fs.mgh(), write.fs.morph.asc(), write.fs.morph.gii(), write.fs.morph.ni1(), write.fs.morph.ni2(), write.fs.morph.smp(), write.fs.morph.txt(), write.fs.morph(), write.fs.weight.asc(), write.fs.weight()


freesurferformats documentation built on May 29, 2024, 5:29 a.m.