mincArray: A utility function to give a MINC object spatial dimensions

View source: R/minc_vis2D.R

mincArrayR Documentation

A utility function to give a MINC object spatial dimensions

Description

Currently the plotting functions (mincPlotAnatAndStatsSlice) need an object with the correct spatial dimensions assigned. While this might in the future happen at the time those objects are created, for the moment this utility function works with older style RMINC objects and extract what you need.

Usage

mincArray(volume, dimIndex = 1)

Arguments

volume

The input volume (from mincLm, mincGetVolume, etc.)

dimIndex

The index into a multidimensional object

Value

A matrix with 3 dimensions

Note

R uses Fortran indexing, so dimension assignment is c(dim[3], dim[2], dim[1]) once dimensions are obtained from any libminc functions (which use C indexing)

Examples

## Not run: 
vol <- mincGetVolume("somefile.mnc")
volWithDims <- mincArray(vol)

vs <- mincLm(jacobians ~ genotype, gf)
tvol <- mincArray(vs, 6)

## End(Not run)

Mouse-Imaging-Centre/RMINC documentation built on Nov. 12, 2022, 1:50 p.m.