acpc_reorient: AC/PC Reorientation

Description Usage Arguments Value

View source: R/acpc_reorient.R

Description

Function that AC/PC re-orients the images for SPM spatial normalization routine. Uses nii_setOrigin from http://www.mccauslandcenter.sc.edu/CRNL/sw/spm8/spm.zip

Usage

1
2
3
4
5
6
7
8
acpc_reorient(
  infiles,
  modality = c("T1", "T2", "CT", "fMRI"),
  spmdir = spm_dir(),
  verbose = TRUE,
  install_dir = NULL,
  ...
)

Arguments

infiles

(character) Files to reorient. First file will be used to estimate AC/PC, then rest will be transformed

modality

T1, T2, CT, fMRI (T2*)

spmdir

(character) path for SPM12. If NULL, assumes SPM12 is in matlabpath and so is spm8/toolbox Must have nii_setOrigin installed. In system.file("", package="spm12r") from http://www.mccauslandcenter.sc.edu/CRNL/sw/spm8/spm.zip

verbose

(logical) Print diagnostic output

install_dir

directory to download SPM12

...

Arguments to pass to run_matlab_code

Value

Exit code from MATLAB. If not zero, there was an error


spm12r documentation built on March 4, 2021, 9:11 a.m.