Skip to contents

Reads meta information from image files based on their format (NIFTI or AFNI).

Usage

read_meta_info(x, file_name)

# S4 method for class 'NIFTIFormat'
read_meta_info(x, file_name)

# S4 method for class 'AFNIFormat'
read_meta_info(x, file_name)

Arguments

x

A FileFormat object (either NIFTIFormat or AFNIFormat)

file_name

A character string specifying the file name to read meta information from

Value

An object of class NIFTIMetaInfo or AFNIMetaInfo, depending on the input format

Details

These methods use format-specific functions to read the header information and create the appropriate meta information object. The `.read_meta_info` helper function is used internally to streamline the process for both formats.

Examples

if (FALSE) { # \dontrun{
# For NIFTI format
nifti_format <- new("NIFTIFormat")
nifti_meta <- read_meta_info(nifti_format, "brain_scan.nii")

# For AFNI format
afni_format <- new("AFNIFormat")
afni_meta <- read_meta_info(afni_format, "brain_scan+orig.HEAD")
} # }