neuro_space: Constructor function for 'NeuroSpace' class

NeuroSpaceR Documentation

Constructor function for NeuroSpace class

Description

Constructor function for NeuroSpace class

Usage

NeuroSpace(dim, spacing = NULL, origin = NULL, axes = NULL, trans = NULL)

Arguments

dim

An integer vector describing the dimensions of the image grid.

spacing

A numeric vector representing the real-valued voxel dimensions (e.g., in millimeters). If not provided, the default is set to a vector of ones with the same length as the dimensions.

origin

A numeric vector representing the coordinate origin of the image space. If not provided, the default is set to a vector of zeroes with the same length as the dimensions.

axes

An AxisSet object representing the image axes ordering. If not provided, the default axes are determined based on the NIFTI standard (Left-Posterior-Inferior).

trans

A matrix representing the coordinate transformation associated with the image space. If not provided, the default is based on the NIFTI standard ("Neurological" orientation).

Value

An instance of the NeuroSpace class.

Note

Users rarely need to create a new NeuroSpace instance, as it will almost always be created automatically using information stored in an image header. If an existing image object is available, its NeuroSpace instance can be easily extracted with the space method.

Examples

bspace <- NeuroSpace(c(64, 64, 64), origin = c(0, 0, 0), spacing = c(2, 2, 2))
bspace
origin(bspace)
axes(bspace)
trans(bspace)


bbuchsbaum/neuroim2 documentation built on April 20, 2024, 4:20 p.m.