Learn R Programming

spm12r (version 2.0)

spm_probs_to_seg: SPM Probability to Hard Segmentation

Description

Converts probability images from SPM segmentation to a hard, choose-one segmentation

Usage

spm_probs_to_seg(img, ties.method = c("first", "last", "random"))

Arguments

img
list of images for probabilities for each class
ties.method
a character string specifying how ties are handled. See max.col. Note, order of ties is different than max.col.

Value

Object of class nifti

Examples

Run this code
## Not run: 
# spm_seg = spm12_segment(image)
# seg = spm_probs_to_seg(spm_seg)
# ## End(Not run)

Run the code above in your browser using DataLab