Learn R Programming

neuroim2 (version 0.8.5)

parse_extension: Parse NIfTI Extension Data

Description

Parses the raw data in a NIfTI extension based on its extension code. Provides specialized parsing for known extension types.

Usage

parse_extension(ext, ...)

Value

Parsed data in an appropriate format:

  • ecode 4 (AFNI): An XML document (if xml2 available) or character string

  • ecode 6 (comment): Character string

  • Other codes: Raw vector (unchanged)

Arguments

ext

A NiftiExtension-class object.

...

Additional arguments passed to type-specific parsers.

See Also

parse_afni_extension for AFNI-specific parsing.

Examples

Run this code
# Parse a comment extension
ext <- NiftiExtension(ecode = 6L, data = "Test comment")
parse_extension(ext)  # Returns "Test comment"

Run the code above in your browser using DataLab