writeVolume {neuroim} | R Documentation |
Generic function to write a 3D image volume to disk
Description
Generic function to write a 3D image volume to disk
Usage
writeVolume(x, fileName, format, dataType)
## S4 method for signature 'BrainVolume,character,missing,missing'
writeVolume(x, fileName)
## S4 method for signature 'ClusteredBrainVolume,character,missing,missing'
writeVolume(x,
fileName)
## S4 method for signature 'BrainVolume,character,character,missing'
writeVolume(x, fileName,
format)
## S4 method for signature 'BrainVolume,character,missing,character'
writeVolume(x, fileName,
dataType)
Arguments
x |
an image object, typically a |
fileName |
output file name |
format |
file format string. Since "NIFTI" is the only currently supported format, this parameter can be safely ignored and omitted. |
dataType |
output data type, If specified should be a |
Details
The output format will be inferred from file extension.
The output format will be inferred from file extension.
writeVolume(x, "out.nii")
outputs a NIFTI file.
writeVolume(x, "out.nii.gz")
outputs a gzipped NIFTI file.
No other file output formats are currently supported.
Examples
bvol <- BrainVolume(array(0, c(10,10,10)), BrainSpace(c(10,10,10), c(1,1,1)))
## Not run:
writeVolume(bvol, "out.nii")
writeVolume(bvol, "out.nii.gz")
## End(Not run)
[Package neuroim version 0.0.6 Index]