Skip to content

Commit

Permalink
new_update
Browse files Browse the repository at this point in the history
  • Loading branch information
zclhit committed Jul 3, 2017
1 parent ee16bcd commit cbc876c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
48 changes: 48 additions & 0 deletions CCN/CCN_ROI_filter.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
% Author:Challen
% 2017-6-30
%funtion: set CCN in 00001_FA_normalize_to_CCN_withothers ROI to 1,and
%remove other ROIs
clc
clear all;
close all; %initialization
%cd 'F:\ADNI_AD\ADT1SEG\AD16\output'
% name='Zhuxiaolan';
[filename,pathname]=uigetfile({'*.*'},'choose any dcm file');
cd(pathname);
[hdr,filetype,fileprefix,machine] = load_nii_hdr(filename);
[img,hdr] = load_nii_img(hdr,filetype,fileprefix,machine);

%CCN:
temp1=[1:4,15,16,21,22]; %label number
index=(img==temp1(1)); %index是图像中对应label number的体素序号
for t=temp1
index1=(img==t);
index=index|index1;
end
img(index)=1;

%other than CCN:
temp1=[5:14,17:20,23:59]; %label number
index=(img==temp1(1)); %index是图像中对应label number的体素序号
for t=temp1
index1=(img==t);
index=index|index1;
end
img(index)=0;

%tabulate(img(:))


%从1到Lable最大值排列
Lables=unique(img);
for i=1:length(Lables)
temp=Lables(i); %label number
index=(img==temp); %index是图像中对应label number的体素序号
img(index)=i-1;
end

CC_286_L=make_ana(img); %savemat

%cd(['H:\DTI_file\',name,'\fiber']) %自行更改路径
save_untouch_nii(CC_286_L,'CCN_ROI');%save_untouch_nii(CC_286_R,'CC_286_R');
tabulate(img(:))
6 changes: 3 additions & 3 deletions Plot_Gretna/hitsz_gretn_PlotNetwork_2GroupCompare.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
num_G=2;

%分别确定G1与G2的Network Analysis网络参数txt的文件位置
pathname_G1 = 'G:\韩璎课题组数据\SCD-NC\1SCD_network';
pathname_G2 = 'G:\韩璎课题组数据\SCD-NC\NC_network';
pathname_G1 = 'G:\玄武医院数据\M2图论分析\AD';
pathname_G2 = 'G:\玄武医院数据\M2图论分析\NC';
pathname_G3 = 'G:\韩璎课题组数据\SCD-NC\Result_path';
pathname_P='G:\韩璎课题组数据\SCD-NC\P_value';
pathname_P='G:\玄武医院数据\M2图论分析\p_val';

% 读取G1的数据
dirs_G1=dir([pathname_G1, '\*.txt']);
Expand Down
2 changes: 1 addition & 1 deletion level5_to_level3_M2.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
end
end
%开始进行回溯
path = 'G:\test';
path = 'G:\深圳人民医院\朱进医生\分割结果_M2';
cd(path)
dirs_G1=dir([path, '\*.*']);
dircell_G1=struct2cell(dirs_G1)' ;
Expand Down

0 comments on commit cbc876c

Please sign in to comment.