powered by
Parses the raw data in a NIfTI extension based on its extension code. Provides specialized parsing for known extension types.
parse_extension(ext, ...)
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)
A NiftiExtension-class object.
NiftiExtension-class
Additional arguments passed to type-specific parsers.
parse_afni_extension for AFNI-specific parsing.
parse_afni_extension
# 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