View source: R/nifti_extensions.R
| parse_extension | R Documentation |
Parses the raw data in a NIfTI extension based on its extension code. Provides specialized parsing for known extension types.
parse_extension(ext, ...)
ext |
A |
... |
Additional arguments passed to type-specific parsers. |
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)
parse_afni_extension for AFNI-specific parsing.
# Parse a comment extension
ext <- NiftiExtension(ecode = 6L, data = "Test comment")
parse_extension(ext) # Returns "Test comment"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.