writeVector {neuroim}R Documentation

Generic function to write a 4D image vector to disk

Description

Generic function to write a 4D image vector to disk

Usage

writeVector(x, fileName, format, dataType)

## S4 method for signature 'BrainVector,character,missing,missing'
writeVector(x, fileName)

## S4 method for signature 'BrainVector,character,character,missing'
writeVector(x, fileName,
  format)

## S4 method for signature 'BrainVector,character,missing,character'
writeVector(x, fileName,
  dataType)

Arguments

x

an image object, typically a BrainVector 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

the numeric 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.

Examples


bvec <- BrainVector(array(0, c(10,10,10,10)), BrainSpace(c(10,10,10,10), c(1,1,1)))
## Not run: 
writeVector(bvol, "out.nii")
writeVector(bvol, "out.nii.gz")
writeVector(bvec, "out.nii")
writeVector(bvec, "out.nii.gz")

## End(Not run)

[Package neuroim version 0.0.6 Index]