ciftiTools (version 0.1.6.0)

is.surf: Validate a surface (vertices + faces)

Description

Check if object is valid for xifti$surf$cortex_left or xifti$surf$cortex_right, where xifti is a "xifti" object.

Usage

is.surf(x)

Arguments

x

The putative surface.

Value

Logical. Is x a valid surface?

Details

This is a helper function for is.xifti.

Requirements: the surface must be a list of three components: "vertices", "faces", and "hemisphere". The first two should each be a numeric matrix with three columns. The values in "vertices" represent spatial coordinates whereas the values in "faces" represent vertex indices defining the face. Thus, values in "faces" should be integers between 1 and the number of vertices. The last list entry, "hemisphere", should be "left", "right", or NULL indicating the brain hemisphere which the surface represents.