Learn R Programming

rtemis (version 0.79)

labels2nii: Write Data to a Nifti File

Description

Writes ROI values to nifti

Usage

labels2nii(label.vals, labeledNifti, prefix, datatype = "auto",
  verbose = TRUE)

Arguments

label.vals

Vector: The index of this vector should correspond to label numbers. Its values will replace the corresponding label numbers to form the new nifti file.

labeledNifti

String: Path to the labeled file whose labels corresponds to the values in label.vals

prefix

String: Prefix of the output file. ".nii.gz" will be added automatically

datatype

Integer or "auto": Defines the datatype of the output. Options: 2: uint8, 4: int16, 8: int32, 16: float (Default), 64: double. Default = "auto"

verbose

Logical: If TRUE, print messages to output