The NeuroSpace class represents the geometric properties of a brain image, including its dimensions, origin, spacing, axes, and coordinate transformations. It provides a comprehensive framework for handling spatial information in neuroimaging data analysis.
Slots
dim
An integer vector representing the grid dimensions of the image.
origin
A numeric vector representing the coordinates of the spatial origin.
spacing
A numeric vector representing the dimensions (in mm) of the grid units (voxels).
axes
A named
AxisSet
object representing the set of spatial axes in the untransformed native grid space.trans
A matrix representing an affine transformation that converts grid coordinates to real-world coordinates.
inverse
A matrix representing an inverse transformation that converts real-world coordinates to grid coordinates.
Validity
A NeuroSpace
object is considered valid if:
The length of the
dim
slot is equal to the lengths of thespacing
,origin
, and number of axes in theaxes
slots.The
dim
slot contains only non-negative values.
Usage
The NeuroSpace
class is fundamental in representing and manipulating
the spatial properties of neuroimaging data. It is used extensively throughout
the package for operations that require spatial information, such as image
registration, resampling, and coordinate transformations.
References
For more information on spatial transformations in neuroimaging: Brett, M., Johnsrude, I. S., & Owen, A. M. (2002). The problem of functional localization in the human brain. Nature Reviews Neuroscience, 3(3), 243-249.
See also
AxisSet-class
for details on the axis set representation.
NeuroVol-class
and NeuroVec-class
for classes that use NeuroSpace.
Examples
# Create a NeuroSpace object
space <- NeuroSpace(dim = c(64L, 64L, 64L),
origin = c(0, 0, 0),
spacing = c(1, 1, 1))
# Get the dimensions
dim(space)
#> [1] 64 64 64