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
acpc_reorient(
infiles,
modality = c("T1", "T2", "CT", "fMRI"),
spmdir = spm_dir(),
verbose = TRUE,
install_dir = NULL,
...
)
(character) Files to reorient. First file will be used to estimate AC/PC, then rest will be transformed
T1, T2, CT, fMRI (T2*)
(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
(logical) Print diagnostic output
directory to download SPM12
Arguments to pass to run_matlab_code
Exit code from MATLAB. If not zero, there was an error