Uses WhiteStripe indices to create image mask

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

# \donttest{
lib.loc = tempdir()
if (download_img_data(lib.loc = lib.loc)){
  t1 = oro.nifti::readNIfTI(system.file("T1Strip.nii.gz",
                                        package="WhiteStripe",
                                        lib.loc = lib.loc))
  t2 = oro.nifti::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)
  oro.nifti::orthographic(mask)
}
#> Making Image VOI
#> Using all slices of the image as slices not defined! Use stripped = TRUE if using skull-stripped images.
#> Making T1 Histogram
#> Getting T1 Modes
#> Smoothing Histogram
#> Smoothing Derivative
#> Quantile T1 VOI
#> Making Image VOI
#> Using all slices of the image as slices not defined! Use stripped = TRUE if using skull-stripped images.
#> Making T2 Histogram
#> Getting T2 Modes
#> Smoothing Histogram
#> Smoothing Derivative
#> Quantile T2 VOI

# }