writeNifti: Write a NIfTI-1 format file

Description Usage Arguments Author(s) References See Also Examples

View source: R/nifti.R

Description

This function writes an image to NIfTI-1 format, using the standard NIfTI-1 C library.

Usage

1
writeNifti(image, file, template = NULL, datatype = "auto")

Arguments

image

An image, in any acceptable form (see retrieveNifti).

file

A character string containing a file name.

template

An optional template object to derive NIfTI-1 properties from. Passed to updateNifti if image is an array.

datatype

The NIfTI datatype to use when writing the data out. The default, "auto" uses the R type or, for internal images, the original datatype. Other possibilities are "float", "int16", etc., which may be preferred to reduce file size. However, no checks are done to ensure that the coercion maintains precision.

Author(s)

Jon Clayden <code@clayden.org>

References

The NIfTI-1 standard (http://nifti.nimh.nih.gov/nifti-1).

See Also

readNifti, updateNifti

Examples

1
## Not run: writeNifti(im, "image.nii.gz", datatype="float")


RNifti documentation built on May 19, 2017, 7:59 a.m.
Search within the RNifti package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.