staple_bin_img: Run STAPLE on a set of nifti images

Description Usage Arguments Value Examples

View source: R/staple_binimg.R

Description

Run STAPLE on a set of nifti images

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

stapler documentation built on Jan. 10, 2020, 1:06 a.m.