mincIO.writeVolume-methods: Methods to Write a 3D Volume

Description Usage Arguments Details Value Methods Author(s) See Also Examples

Description

Given a MincVolumeIO object, write the data and meta-data to a minc volume.

Usage

1
2
## S4 method for signature 'MincVolumeIO'
mincIO.writeVolume(object, filename, clobber=FALSE)

Arguments

object

An instantiated MincVolumeIO object.

filename

The filename to be used when writing the volume. If this argument is not set, then filename will be taken from the MincVolumeIO object.

clobber

Logical argument to specify whether the output file should be overwritten.

Details

Given a valid MincVolumeIO object, the object is written to the file system. If the file already exists, then either the file will be over-written (clobber=TRUE), or an error message will be presented (clobber=FALSE).

Value

This function is run for its side-effect, so no value is returned.

Methods

object = "MincVolumeIO"

Only one method/signature.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

See Also

mincIO.makeNewVolume mincIO.readVolume MincVolumeIO

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# create an empty volume
vol1 <- mincIO.makeNewVolume("myIcbmTemplateVolume.mnc", likeTemplate="icbm152")
mincIO.writeVolume(vol1)                          # write out as "myIcbmTemplateVolume.mnc"
mincIO.writeVolume(vol1, "writeEmptyVol01.mnc")   # write out as "writeEmptyVol01.mnc"

vol2 <- vol1 +1                                   # modify the volume and overwrite
mincIO.writeVolume(vol2, "writeEmptyVol01.mnc", clobber=TRUE)

## End(Not run)

jnikelski/rmincIO documentation built on May 19, 2019, 2:58 p.m.