powered by
Converts probability images from SPM segmentation to a hard, choose-one segmentation
spm_probs_to_seg(img, ties.method = c("first", "last", "random"))
list of images for probabilities for each class
a character string specifying how ties are handled. See max.col. Note, order of ties is different than max.col.
max.col
Object of class nifti
# NOT RUN { spm_seg = spm12_segment(image)$outfiles seg = spm_probs_to_seg(spm_seg) # }
Run the code above in your browser using DataLab