Writes ROI values to nifti
labels2nii(label.vals, labeledNifti, prefix, datatype = "auto",
verbose = TRUE)
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.
String: Path to the labeled file whose labels corresponds to the values in
label.vals
String: Prefix of the output file. ".nii.gz" will be added automatically
Integer or "auto": Defines the datatype of the output. Options: 2: uint8, 4: int16, 8: int32, 16: float (Default), 64: double. Default = "auto"
Logical: If TRUE, print messages to output