write_vec-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
13
14
15
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)

## S4 method for signature 'NeuroVec,character,missing,character'
write_vec(x, file_name,
  data_type)

Arguments

x

an image object, typically a NeuroVec instance.

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 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 <- NeuroVec(array(0, c(10,10,10,10)), NeuroSpace(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)

bbuchsbaum/neuroim2 documentation built on Oct. 15, 2019, 2:55 p.m.