space-methods: Extract Geometric Properties of an Image

spaceR Documentation

Extract Geometric Properties of an Image

Description

This function retrieves the geometric properties of a given image, such as dimensions and voxel size.

Usage

space(x, ...)

## S4 method for signature 'IndexLookupVol'
space(x)

## S4 method for signature 'ROICoords'
space(x)

## S4 method for signature 'NeuroObj'
space(x)

## S4 method for signature 'NeuroSpace'
space(x)

Arguments

x

The object to query, which can be an instance of NeuroVol or NeuroVec.

...

Additional arguments, if needed.

Value

An object representing the geometric space of the image, of type NeuroSpace.

Examples

# Create a NeuroSpace object with dimensions (10, 10, 10) and voxel size (1, 1, 1)
x <- NeuroSpace(c(10, 10, 10), c(1, 1, 1))

# Create a NeuroVol object with random data and the specified NeuroSpace
vol <- NeuroVol(rnorm(10 * 10 * 10), x)

# Retrieve the geometric properties of the NeuroVol object
identical(x, space(vol))


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