1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
%Script Suit_isolate - Isole le cervelet et crée le mask (isolation map)
name = importdata('list.txt')
for i = 1:length(name)
display(name{i})
image_t1 = [name{i},'.nii'];
suit_isolate(image_t1);
end
%Script Suit_normalize - Normalisation classique
name = importdata('list.txt')
for i = 1:length(name)
display(name{i})
image_t1_cropped = ['c_',name{i},'.nii'];
mask = ['c_',name{i},'_pcereb_corr.nii'];
suit_normalize(image_t1_cropped,'mask',mask);
end
%Script Suit_normalize - Normalisation dartel
%name = importdata('list.txt')
%for i = 1:length(name)
%GM_prob_map = [name{i},'_seg1.nii'];
%WM_prob_map = [name{i},'_seg2.nii'];
%mask = ['c_',name{i},'_pcereb_corr.nii'];
%suit_normalize_dartel(GM_prob_map,WM_prob_map,'mask',mask);
%end
%Script Suit_reslice - l'image est mise dans l'espace de SUIT
name = importdata('list.txt')
for i = 1:length(name)
display(name{i})
image_t1_cropped =['c_',name{i},'.nii'];
deformation_map = ['mc_',name{i},'_snc.mat'];
mask = ['c_',name{i},'_pcereb_corr.nii'];
suit_reslice(image_t1_cropped,deformation_map,'mask',mask);
end
%Script Suit_reslice_inv - retour de l'image dans l'espace cropped du sujet
name = importdata('list.txt')
for i = 1:length(name)
display(name{i})
deformation_map = ['mc_',name{i},'_snc.mat'];
mask = ['c_',name{i},'_pcereb_corr.nii'];
nom = [name{i},'_'];
suit_reslice_inv('Cerebellum-SUIT.nii',deformation_map,'prefix',nom);
end
%Script d'extraction des volumes - donne fichier texte avec volume.
name = importdata('list.txt')
%Commande de pré-allocation
numvox = zeros(length(name),28);
for i = 1:length(name)
atlas_espace_sujet = [name{i},'_Cerebellum-SUIT.nii'];
for k = 1:28
V=spm_vol(atlas_espace_sujet);
X=spm_read_vols(V);
numvox(i,k)=length(find(X==k));
end
end
csvwrite('total_SUIT_cerebellum.csv',numvox) |