subset_4d-methods: Subset a 4D image

Description Usage Arguments Value Author(s) Examples

Description

Subsets an antsImage or nifti object from 4D

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
subset_4d(img, ind, ...)

## S4 method for signature 'character'
subset_4d(img, ind, ...)

## S4 method for signature 'nifti'
subset_4d(img, ind, ...)

## S4 method for signature 'antsImage'
subset_4d(img, ind, ...)

.subset_4d(img, ind)

Arguments

img

character path of image or an object of class nifti, or antsImage

ind

subset indexers for the 4th dimension (usually time)

...

Arguments passed to copyNIfTIHeader or antsCopyImageInfo

Value

An antsImage or nifti depending on input

Author(s)

John Muschelli muschellij2@gmail.com

Examples

1
2
3
4
5
6
library(oro.nifti)
n = 20
x = nifti(array(rnorm(n^3*10), dim = c(n, n, n, 10)))
ind = 2:3
subset_4d(x, ind)
subset_4d(x, ind = 1) 

neuroconductor-releases/extrantsr documentation built on Dec. 10, 2019, 12:07 a.m.