| NeuroSpace-class | R Documentation |
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.
dimAn integer vector representing the grid dimensions of the image.
originA numeric vector representing the coordinates of the spatial origin.
spacingA numeric vector representing the dimensions (in mm) of the grid units (voxels).
axesA named AxisSet object representing the set of spatial axes in the untransformed native grid space.
transA matrix representing an affine transformation that converts grid coordinates to real-world coordinates.
inverseA matrix representing an inverse transformation that converts real-world coordinates to grid coordinates.
A NeuroSpace object is considered valid if:
The length of the dim slot is equal to the lengths of the spacing, origin, and number of axes in the axes slots.
The dim slot contains only non-negative values.
The following methods are available for NeuroSpace objects:
dim: Get the dimensions of the space.
origin: Get or set the origin of the space.
spacing: Get or set the spacing of the space.
axes: Get the axes of the space.
trans: Apply the affine transformation to coordinates.
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.
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.
AxisSet-class for details on the axis set representation.
NeuroVol-class and NeuroVec-class for classes that use NeuroSpace.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.