Learn R Programming

freesurferformats (version 1.1.0)

cifti.validate.read.size: Check the safety limit for reading a CIFTI-2 data matrix.

Description

Check the requested allocation against the package safety limit (see validate_allocation_size) and add a CIFTI specific hint to the error message if it is exceeded: the data of a large file can be read in parts by selecting matrix columns, which is not possible in the same way for other image formats.

Usage

cifti.validate.read.size(dims, bytes_per_elem, filepath)

Value

NULL, invisibly. Stops if the limit is exceeded.

Arguments

dims

integer vector, the dimensions of the requested data matrix.

bytes_per_elem

numeric, the number of bytes per data value.

filepath

character string, the path of the file, used in the error message.