| NiftiExtension-class | R Documentation |
Represents a single NIfTI header extension block. NIfTI extensions allow additional metadata to be stored with the image file.
## S4 method for signature 'NiftiExtension'
show(object)
object |
A |
NIfTI-1.1 extensions follow this structure:
Bytes 0-3: esize (int32) - total extension size, must be multiple of 16
Bytes 4-7: ecode (int32) - extension code identifying format
Bytes 8-(esize-1): edata - the actual extension data
Extensions are chained sequentially after the NIfTI header (byte 352) until the vox_offset is reached.
ecodeAn integer extension code identifying the type of extension.
See NiftiExtensionCodes for known codes.
esizeAn integer giving the total size of the extension in bytes,
including the 8-byte header (esize + ecode). Must be a multiple of 16.
edataA raw vector containing the extension data (length = esize - 8).
NiftiExtensionCodes for registered extension codes.
NiftiExtensionList-class for a collection of extensions.
parse_extension for parsing extension data.
# Create a simple comment extension
comment_text <- "This is a test comment"
ext <- NiftiExtension(ecode = 6L, data = comment_text)
# Access the extension code
ext@ecode
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.