These shell commands are for importing 'DICOM' images to 'Nifti' format, reconstructing cortical surfaces, and align' the CT' to 'MRI'. The commands are only tested on 'MacOS' and 'Linux'. On 'Windows' machines, please use the 'WSL2' system.
cmd_run_3dAllineate(
subject,
mri_path,
ct_path,
overwrite = FALSE,
command_path = NULL,
dry_run = FALSE,
verbose = dry_run
)cmd_execute(
script,
script_path,
command = "bash",
dry_run = FALSE,
backup = TRUE,
args = NULL,
...
)
cmd_run_r(
expr,
quoted = FALSE,
verbose = TRUE,
dry_run = FALSE,
log_file = tempfile(),
script_path = tempfile(),
...
)
cmd_run_dcm2niix(
subject,
src_path,
type = c("MRI", "CT"),
merge = c("Auto", "No", "Yes"),
float = c("Yes", "No"),
crop = c("No", "Yes", "Ignore"),
overwrite = FALSE,
command_path = NULL,
dry_run = FALSE,
verbose = dry_run
)
cmd_run_flirt(
subject,
mri_path,
ct_path,
dof = 6,
cost = c("mutualinfo", "leastsq", "normcorr", "corratio", "normmi", "labeldiff", "bbr"),
search = 90,
searchcost = c("mutualinfo", "leastsq", "normcorr", "corratio", "normmi", "labeldiff",
"bbr"),
overwrite = FALSE,
command_path = NULL,
dry_run = FALSE,
verbose = dry_run
)
cmd_run_recon_all(
subject,
mri_path,
args = c("-all", "-autorecon1", "-autorecon2", "-autorecon3", "-autorecon2-cp",
"-autorecon2-wm", "-autorecon2-pial"),
work_path = NULL,
overwrite = FALSE,
command_path = NULL,
dry_run = FALSE,
verbose = dry_run
)
cmd_run_recon_all_clinical(
subject,
mri_path,
work_path = NULL,
overwrite = FALSE,
command_path = NULL,
dry_run = FALSE,
verbose = dry_run,
...
)
A list of data containing the script details:
script
script details
script_path
where the script should/will be saved
dry_run
whether dry-run mode is turned on
log_file
path to the log file
execute
a function to execute the script
characters or a RAVESubject
instance
the absolute to 'MRI' volume; must in 'Nifti' format
the absolute to 'CT' volume; must in 'Nifti' format
whether to overwrite existing files; default is false
command line path if 'RAVE' cannot find the command binary files
whether to run in dry-run mode; under such mode, the shell command will not execute. This is useful for debugging scripts; default is false
whether to print out the command script; default is true under dry-run mode, and false otherwise
the shell script
path to run the script
which command to invoke; default is 'bash'
whether to back up the script file immediately; default is true
further arguments in the shell command, especially the 'FreeSurfer' reconstruction command
passed to system2
, or additional arguments
expression to run as command
whether expr
is quoted; default is false
where should log file be stored
source of the 'DICOM' or 'Nifti' image (absolute path)
type of the 'DICOM' or 'Nifti' image; choices are 'MRI'
and 'CT'
'dcm2niix'
conversion arguments; ignored when
the source is in 'Nifti' format
parameters used by 'FSL' 'flirt'
command; see their documentation for details
work path for 'FreeSurfer' command;