checkAntsInput: Determine type of variable passed by user

Description Usage Arguments Value Author(s) Examples

View source: R/checkAntsInput.R

Description

Function to check a variable whether is composed of an antsImage, list of antsImages, or simply filenames. If none of the above, an error is returned.

Usage

1
checkAntsInput(input, checkHeaders = FALSE)

Arguments

input

the variable to be checked

checkHeaders

make sure all images have the same headers

Value

Type of variable (antsImage, antsImageList, antsFiles) or error if variable cannot be established.

Author(s)

Dorian Pustina

Examples

1
2
3
4
5
6
7
8
## Not run: 
        files = Sys.glob('/data/jag/nifti/*.nii.gz')
         myimagelist = imageFileNames2ImageList(files)
         checkAntsInput(myimagelist) # returns 'antsImageList'
         checkAntsInput(antsFiles) # returns 'antsFiles'
         checkAntsInput(myimagelist[[1]]) # returns 'antsImage'
         
## End(Not run)

neuroconductor-releases/LESYMAP documentation built on Nov. 13, 2020, 11:28 p.m.