Learn R Programming

neuroim2 (version 0.8.5)

bounds: Extract Spatial Bounds of an Image

Description

This function extracts the spatial bounds (origin + dim * spacing) of an image represented by the input object.

Usage

bounds(x)

# S4 method for NeuroSpace bounds(x)

Value

A numeric matrix with two columns specifying the min (column 1) and max (column 2) bounds of each dimension of x.

Arguments

x

The object with the `bounds` property, typically an image.

Examples

Run this code
bspace <- NeuroSpace(c(10, 10, 10), c(2, 2, 2))
b <- bounds(bspace)
nrow(b) == ndim(bspace)
ncol(b) == 2

Run the code above in your browser using DataLab