origin-methods: Extract Image Attribute 'origin'

Description Usage Arguments Details Author(s) References Examples

Description

Methods that act on the origin field in the NIfTI/ANALYZE header.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
origin(object)

## S4 method for signature 'nifti'
origin(object)

## S4 method for signature 'anlz'
origin(object)

## S4 method for signature 'ANY'
origin(object)

origin(object) <- value

## S4 replacement method for signature 'anlz'
origin(object) <- value

## S4 replacement method for signature 'nifti'
origin(object) <- value

Arguments

object

is an object of class nifti or anlz.

value

is the value to assign to the origin field.

Details

See documentation on the ANALYZE and/or NIfTI data standards for more details.

Author(s)

John Muschelli muschellij2@gmail.com,
Brandon Whitcher bwhitcher@gmail.com

References

ANALYZE 7.5
http://eeg.sourceforge.net/ANALYZE75.pdf
NIfTI-1
http://nifti.nimh.nih.gov/

Examples

1
2
3
4
5
6
7
8
fname = system.file("nifti", "mniRL.nii.gz", 
package = "oro.nifti")
img = readNIfTI(fname)
oimg = origin(img)
stopifnot(all(oimg == c(-90, -126, -72)))
zero_img = img
origin(zero_img) = rep(0, 3)
stopifnot(all(origin(zero_img) == 0))

neuroconductor/oro.nifti documentation built on May 19, 2021, 5:25 a.m.