MriImage: Class representing an MRI image
Description
This class represents an MRI image. An object of this class is made up of some voxel data, stored as a numeric array, and an MriImageMetadata
object, which stores extra information about the image, such as the file it was read from, the voxel dimensions, and so on. Since the class inherits from MriImageMetadata
, any object can be treated as an object of that class where needed. The group generic functions Math
, Ops
and Summary
are defined for this class, although there are some limitations (see Details).Value
- A list object (see
list.object
) with class c("image.mri", "metadata.image.mri", "list.object", "list")
and the following function elements. - getData()Retrieve the array of voxel values.
- getDataAtPoint(...)Retrieve the value of the voxel at the location specified by
c(...)
. Returns NA if the location is out of bounds. - getMetadata()Retrieve the embedded
MriImageMetadata
object. isMriImage
returns TRUE if object
is an MriImage object.
Details
Ops.image.mri
uses newMriImageWithBinaryFunction
, and as such does not work with unary operators (unary +
and -
, and !
). It is also not currently possible to use anything other than another MriImage object as the second argument. That is, one can add two MriImages together, but not add 10 to the value of each voxel in a single image (an error will be produced). This may be allowed in future.
Summary.image.mri
currently works only for a single image argument. A call such as max(image1,image2)
will produce an error.