whitestripe_ind_to_mask: WhiteStripe Indices to Mask

Description Usage Arguments Value See Also Examples

View source: R/whitestripe_ind.R

Description

Uses WhiteStripe indices to create image mask

Usage

1
whitestripe_ind_to_mask(img, indices, writeimg = FALSE, ...)

Arguments

img

Array or class nifti that is corresponds to dimensions of the images the indices were generated from

indices

indices from whitestripe

writeimg

logical to write image or not

...

arguments to passed to writeNIfTI for writing image

Value

Class of array or nifti depending on img input

See Also

whitestripe, whitestripe_hybrid

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
lib.loc = tempdir()

if (download_img_data(lib.loc = lib.loc)){
t1 = readNIfTI(system.file("T1Strip.nii.gz", package="WhiteStripe",
lib.loc = lib.loc))
t2 = readNIfTI(system.file("T2Strip.nii.gz", package="WhiteStripe",
lib.loc = lib.loc))
ind = whitestripe_hybrid(t1, t2)
mask = whitestripe_ind_to_mask(t1, ind$whitestripe.ind)
orthographic(mask)
}

## End(Not run)

Example output

Warning messages:
1: In download.file(url, urlfile, quiet = TRUE) :
  URL http://muschellij2.github.io/WhiteStripe/T1Strip.nii.gz: cannot open destfile '/T1Strip.nii.gz', reason 'Permission denied'
2: In download.file(url, urlfile, quiet = TRUE) :
  download had nonzero exit status
3: In download.file(url, urlfile, quiet = TRUE) :
  URL http://muschellij2.github.io/WhiteStripe/T2Strip.nii.gz: cannot open destfile '/T2Strip.nii.gz', reason 'Permission denied'
4: In download.file(url, urlfile, quiet = TRUE) :
  download had nonzero exit status

WhiteStripe documentation built on April 19, 2018, 1:04 a.m.