View source: R/nifti_extensions.R
| parse_afni_extension | R Documentation |
Parses an AFNI extension (ecode = 4) containing XML-formatted attributes.
parse_afni_extension(ext, as_xml = TRUE)
ext |
A |
as_xml |
Logical; if TRUE (default) and xml2 is available, returns an xml_document object. Otherwise returns the raw XML string. |
AFNI stores dataset attributes in an XML format within the NIfTI extension. The XML contains elements like HISTORY_NOTE, volume labels, tagged points, and other AFNI-specific metadata.
If as_xml = TRUE and xml2 is available, returns an xml_document.
Otherwise returns a character string containing the XML.
get_afni_attribute for extracting specific AFNI attributes.
## Not run:
# Read a NIfTI file with AFNI extension
hdr <- read_nifti_header("afni_file.nii")
afni_ext <- hdr$extensions[[1]]
parsed <- parse_afni_extension(afni_ext)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.