write_vec {neuroim2} | R Documentation |
Write a 4d image vector to disk
Description
Write a 4d image vector to disk
Usage
write_vec(x, file_name, format, data_type, ...)
## S4 method for signature 'ROIVec,character,missing,missing'
write_vec(x, file_name)
## S4 method for signature 'NeuroVec,character,missing,missing'
write_vec(x, file_name)
## S4 method for signature 'NeuroVec,character,character,missing'
write_vec(
x,
file_name,
format,
nbit = FALSE,
compression = 5,
chunk_dim = c(10, 10, 10, dim(x)[4])
)
## S4 method for signature 'NeuroVec,character,missing,character'
write_vec(x, file_name, data_type)
## S4 method for signature 'ROIVec,character,missing,missing'
write_vec(x, file_name)
## S4 method for signature 'NeuroVec,character,missing,missing'
write_vec(x, file_name)
## S4 method for signature 'NeuroVec,character,character,missing'
write_vec(
x,
file_name,
format,
nbit = FALSE,
compression = 5,
chunk_dim = c(10, 10, 10, dim(x)[4])
)
## S4 method for signature 'NeuroVec,character,missing,character'
write_vec(x, file_name, data_type)
Arguments
x |
an image object, typically a |
file_name |
output file name. |
format |
file format string. Since "NIFTI" is the only currently supported format, this parameter can be safely ignored and omitted. |
data_type |
the numeric data type. If specified should be a |
... |
extra args |
nbit |
set nbit compression |
compression |
compression level 1 to 9 |
chunk_dim |
the dimensions of each chunk |
Value
Invisibly returns NULL
after writing the vector to disk.
Examples
bvec <- NeuroVec(array(0, c(10,10,10,10)), NeuroSpace(c(10,10,10,10), c(1,1,1)))
# Create temporary files
tmp1 <- tempfile(fileext = ".nii")
# Write vectors to temporary files
write_vec(bvec, tmp1)
# Clean up
unlink(tmp1)
[Package neuroim2 version 0.8.1 Index]