if (FALSE) {
# Get general folder
folder <- system.file("extdata", package = "neurodata")
# Get covariates
covariates <- system.file("covariates.txt", package = "neurodata")
# Read covariates information
clinical_info <- read.csv(file = covariates, sep = ';')
# Folder and T1-weighted file of the patient
patient_folder <- file.path(folder,"patient01")
patient_T1 <- file.path(patient_folder,"patient01_T1.nii.gz")
# Getting preferred atlas template and template mask
# Using the MNI152 template available in the MNITemplate package
library(MNITemplate)
atlas <- getMNIPath()
atlas_mask <- readMNI("Brain_Mask")
# Preprocessing the patient's sequences
patient_preprocessed_mri <- preprocess_modality_t1(mri.patient = patient_T1,
folder.patient = patient_folder,
atlas = atlas, mask = atlas_mask,
inhomogeneity = 'N4',
transformation = 'SyN')
}
Run the code above in your browser using DataLab