writeVector-methods: Generic function to write a 4D image vector to disk

Description Usage Arguments Examples

Description

Generic function to write a 4D image vector to disk

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

1
2
3
4
5
6
7
8
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)

neuroim documentation built on May 2, 2019, 1:04 p.m.