staple_bin_img {stapler}R Documentation

Run STAPLE on a set of nifti images

Description

Run STAPLE on a set of nifti images

Usage

staple_bin_img(x, set_orient = FALSE, verbose = TRUE, ...)

staple_multi_img(x, set_orient = FALSE, verbose = TRUE, ...)

Arguments

x

Character vector of filenames or list of arrays/images

set_orient

Should the orientation be set to the same if the images are niftiImages

verbose

print diagnostic messages

...

Additional arguments to staple_bin_mat

Value

A list similar to staple_bin_mat, but has a resulting image

Examples


n = 5
r = 1000
x = lapply(seq(n), function(i) {
   x = rbinom(n = r, size = 1, prob = 0.5)
   array(x, dim = c(10,10, 10))
 })
staple_out = staple_bin_img(x, set_orient = FALSE)

n = 5
r = 1000
x = lapply(seq(n), function(i) {
   x = rbinom(n = r, size = 5, prob = 0.5)
   array(x, dim = c(10,10, 10))
 })
staple_out = staple_multi_img(x, set_orient = FALSE)

[Package stapler version 0.7.1 Index]