123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- % function MRI_quality(BIDS_path)
- % Stefan J. Blaschke, Neurology Department, University Hospital Cologne
- % VERSION 1.0., 31.12.2022
- %
- % matlab script to examine preprocessed fMRI dataset
- % display of raw imaging
- % overlay with registered atlas
- % SNR and tSNR
- % display of tSNR with mask outlines
- % DVARS and FD
- % - Afyouni S. & Nichols T.E., Insights and inference for DVARS, 2017
- % http://www.biorxiv.org/content/early/2017/04/06/125021.1
- % necessity of GSR (Chen et al., 2022, Magn Reson Med)
- if exist("Mat","var")
- % header
- addpath(".\scripts\toolbox\DVARS-master\")
- addpath(".\scripts\toolbox\DVARS-master\Nifti_Util\")
- addpath(".\scripts\toolbox\BCT\")
- addpath(".\scripts\toolbox\spm12")
- addpath(".\scripts\toolbox\fMRI-Quality-Checker-master")
- addpath(".\scripts\toolbox\spm12\matlabbatch")
- addpath(".\scripts\toolbox\nifti_utils-master\")
- addpath(".\scripts\toolbox\nifti_utils-master\external\NIFTI")
- addpath(".\scripts\toolbox\FSLNets\")
- addpath(".\scripts\")
- %%
- % create data table to store features
- varnames = {'animal','ses','ID','MRI date','qualy', 'strenght','degree','modularity','CC','CPL','SW'};
- vartype = repmat({'cellstr'},length(varnames),1);
- Graphmaster = table('Size',[length(Mat), length(varnames)],'VariableTypes',vartype,'VariableNames',varnames);
- %%
- % loop through Data
- %%%%%%%%%%%%%%%%%%%%
- %%%%%%%%%%%%%%%%%%%%
- for idx = 118:length(Mat) % start loop subjects
- fprintf('running set #%u of %u\n',idx,length(Mat))
- Graphmaster{idx,"animal"} = {Mat(idx).animal};
- Graphmaster{idx,"ses"} = {Mat(idx).ses};
- mNet = Mat(idx).mNet;
- if ~isempty(mNet)
- Graphmaster{idx,"ID"} = Mat(idx).ID;
- Graphmaster{idx,"MRI date"} = Mat(idx).date;
- Graphmaster{idx,'qualy'} = {Mat(idx).qualy};
-
- [degree, strength, modularity, CPL, CC, SW] = MRI_graph(mNet, AUC);
-
- Graphmaster{idx,'degree'} = {degree};
- Graphmaster{idx,'strenght'} = {strength};
- Graphmaster{idx,'modularity'} = {modularity};
- Graphmaster{idx,'CPL'} = {CPL};
- Graphmaster{idx,'CC'} = {CC};
- Graphmaster{idx,'SW'} = {SW};
- end
- end
- else
- disp('please load structure of matrices')
- end
|