Learn R Programming

fslr (version 1.4.4)

check_nifti-methods: Check if nifti image or read in a nifti image

Description

Simple check to see if input is character or of class nifti

Usage

check_nifti(x, reorient = FALSE, allow.array = FALSE)

## S3 method for class 'nifti': check_nifti(x, reorient = FALSE, allow.array = FALSE)

## S3 method for class 'character': check_nifti(x, reorient = FALSE, allow.array = FALSE)

## S3 method for class 'list': check_nifti(x, reorient = FALSE, allow.array = FALSE)

## S3 method for class 'array': check_nifti(x, reorient = FALSE, allow.array = FALSE)

Arguments

x
character path of image or an object of class nifti, or array
reorient
(logical) passed to readNIfTI if the image is to be re-oriented
allow.array
(logical) Are array types allowed (TRUE) or should there be an error if the object is not character or class nifti.

Value

  • nifti object or array if allow.array=TRUE and x is an array

See Also

readNIfTI