bounds-methods: Extract Spatial Bounds of an Image

boundsR Documentation

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 signature 'NeuroSpace'
bounds(x)

Arguments

x

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

Value

A matrix where each row contains the min (column 1) and max (column 2) bounds of the image dimension from 1 to 'ndim(image)'.

Examples

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


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