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

View source: R/read_cifti.R

cifti.validate.read.sizeR Documentation

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)

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.

Value

NULL, invisibly. Stops if the limit is exceeded.


freesurferformats documentation built on Sept. 25, 2026, 1:07 a.m.