-
Notifications
You must be signed in to change notification settings - Fork 0
MatLab API
-
rearrangeFolders(root_directory, output_directory);
whereroot_directory
(string) - is a path to the folder which contains PET, MRI images
output_directory
(string) - is a path where rearranged results have to be stored
Workflow: the main purpose of this function is to move all patients data to a single folder, the output structure -> patient/MRI, PET -
patiend_ids = csv_rearrange(home_path, xls_files, mat_files)
wherehome_path
(string) - is a path to root directory. Example: ../neuroimaging
xls_files
(cell array) - paths to original ADNI file which contains information about patients. Example: home/csv_dataset/ADNIMERGE.xls and DXSUM_PDXCONV_ADNIALL.xls
mat_files
(cell array) - path to .mat files which a result of .xls to .mat file conversion. Example: home/csv_dataset/data_ids.mat
Workflow: the main purpose of this function is convert .xls to array ofstruct
. The conversion contains from several steps: 1. Select patientsrtid's
who havedx_change
from DXSUM_PDXCONV_ADNIALL.xls ; 2. Select all data from ADNIMERGE.xls based onrtid's
. It is necessary in order to get right label.
The conversion fordx_change
is the following: 1,7,9 - Normal; 2,4,8 - MCI; 3,5,6 - AD. More -
rearrangePreFolders(root_directory, csv_data)
whereroot_directory
(string) - is a path to the folder which contains PET, MRI images. Should be used afterrearrangeFolders
or with folder which has structure root/patients
csv_data
- is data from ADNI database converted in MatLab format. Example can be find in the csv_dataset origin -> ANDIMERGE.csv; converted -> data_ids.mat; Workflow: the main purpose of this function group patients data in groups based on csv_file. Currently: Normal, MCI, AD
-
scanAndLogMissing(root_directory, csv_data)
whereroot_directory
(string) - is a path to the folder which contains PET, MRI images. Should be used afterrearrangeFolders
or with folder which has structure root/patients
csv_data
(struct array) - is data from ADNI database converted in MatLab format
Workflow: the main purpose of this function is loop through all folders inroot_directory
and runpreprocessImages
function and save to log.txt file missing info. The analysis can start if MRI and PET_AV45 data is available. After analysis unused MRI data will be removed, unlesscleanData
flag is not1
. -
output_files = preprocessImages(root_directory, output_directory, dx_data)
whereroot_directory
(string) - is a path to a folder which contains PET and MRI data
output_directory
(string) - is a name of the root folder where the extracted features will be stored. Currently is the data fromdx_change
filed.
dx_data
(struct) - is a matlabstruct
with fields: id, age, gender, dx_change, mmse; which describes patient. Workflow: the main purpose of this function is pick valid images (the date of recording is less then 6 month) and set new origin, coregister, normalize and extract brain features. In order to adjust image spm toolbox functions have been used:spmSetOringin(im_name(**cell**), template_path)
r_files = performCoregisterER(image, other)
wr_files = performNormalization(mri_image, r_files(**cell array**))
-
performSegmentation(mri_image)
- in order to get white, gray matter getRegionFromAtlas(brain_atlas_path, image)