Learn R Programming

RNiftyReg (version 2.0.0)

isImage: Test whether an object represents an image

Description

This function tried to determine whether an object is an image that the package knows how to handle. If its class is "nifti", "niftiImage" or "internalImage", then the result is always TRUE. Likewise if it has an internal image pointer (although in that case it should also be of class "niftiImage"). If it has no dim attribute, or looks like an affine matrix, then the result is FALSE. Otherwise the value of the unsure argument is returned.

Usage

isImage(object, unsure = NA)

Arguments

object
An R object.
unsure
The value to return if the function can't tell whether or not the object is an image.