axcodes-methods: Get Orientation Axis Codes

axcodesR Documentation

Get Orientation Axis Codes

Description

Returns a character vector of anatomical axis direction labels for a neuroimaging object or space. For example, c("R", "A", "S") for a standard RAS-oriented image.

Usage

axcodes(x)

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

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

## S4 method for signature 'matrix'
axcodes(x)

Arguments

x

A NeuroVol, NeuroVec, NeuroSpace, or a 4x4 affine matrix.

Value

A character vector of length 3 with axis direction codes.

Examples

sp <- NeuroSpace(c(10L, 10L, 10L), c(2, 2, 2))
axcodes(sp)

vol <- DenseNeuroVol(array(0, c(10,10,10)), sp)
axcodes(vol)


neuroim2 documentation built on April 16, 2026, 5:07 p.m.