Get the payload of a NIFTI v2 header extension as text.
Source:R/nifti2_extensions.R
nifti2.extension.text.RdConvert the payload of a header extension to a character string. The trailing NUL bytes, which are only used to pad the extension to a multiple of 16 bytes, are removed. Note that embedded NUL bytes cannot be represented in an R string and are removed as well, so this function is only meaningful for text payloads (like the CIFTI2 XML metadata).
Arguments
- extension
a NIFTI v2 header extension, a named list with entries 'ecode' and 'content', see
nifti2.extension.
Value
character string, the payload of the extension. The string is marked as UTF-8 encoded, which is the encoding required by the NIFTI standard.
See also
Other nifti2 extensions:
nifti2.extension(),
nifti2.extension.content(),
nifti2.extension.size(),
nifti2.get.extension()