read_meta_info-methods: Generic function to read image meta info given a file and a...

read_meta_infoR Documentation

Generic function to read image meta info given a file and a FileFormat instance.

Description

These methods read meta information from image files based on their format (NIFTI or AFNI).

Usage

read_meta_info(x, file_name)

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

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

Arguments

x

A FileFormat object (either NIFTIFormat or AFNIFormat).

file_name

A character string representing the file name to read meta information from.

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.

Value

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

See Also

FileFormat-class, NIFTIFormat-class, AFNIFormat-class, NIFTIMetaInfo-class, AFNIMetaInfo-class

Examples

## Not run: 
# 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")

## End(Not run)


bbuchsbaum/neuroim2 documentation built on Nov. 3, 2024, 9:31 a.m.