pixdim-methods: Extract or Replace NIfTI/Analyze Pixel Dimensions

Description Usage Arguments Methods Author(s) Examples

Description

Methods that act on the “pixdim” numeric vector in the NIfTI or ANALYZE header.

Usage

1
2
## S4 method for signature 'nifti'
pixdim(object)

Arguments

object

is an object of class nifti or anlz.

Methods

object = "anlz"

Extract or replace ANALYZE "pixdim" value.

object = "nifti"

Extract or replace NIfTI "pixdim" value.

Author(s)

Brandon Whitcher bwhitcher@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
url <- "http://nifti.nimh.nih.gov/nifti-1/data/avg152T1_LR_nifti.nii.gz"
urlfile <- file.path(system.file("nifti", package="oro.nifti"),
                     "mniLR.nii.gz")
download.file(url, urlfile, quiet=TRUE)

## End(Not run)
urlfile <- file.path(system.file("nifti", package="oro.nifti"),
                     "mniLR.nii.gz")
mniLR <- readNIfTI(urlfile)
pixdim(mniLR)

Example output

oro.nifti 0.9.1
Warning messages:
1: In download.file(url, urlfile, quiet = TRUE) :
  URL http://nifti.nimh.nih.gov/nifti-1/data/avg152T1_LR_nifti.nii.gz: cannot open destfile '/usr/lib/R/site-library/oro.nifti/nifti/mniLR.nii.gz', reason 'Permission denied'
2: In download.file(url, urlfile, quiet = TRUE) :
  download had nonzero exit status
[1] 0 2 2 2 1 1 1 1

oro.nifti documentation built on May 2, 2019, 5:26 p.m.