writeVolume: 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)
"writeVolume"(x, fileName)
"writeVolume"(x, fileName)
"writeVolume"(x, fileName, format)
"writeVolume"(x, fileName, dataType)
Arguments
x
an image object, typically a BrainVolume instance.
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 character vector of: "BINARY", "UBYTE", "SHORT", "INT", "FLOAT", "DOUBLE".
Otherwise output format will be inferred from R the datatype of the image.
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.