基于spm实现计算脑簇(Cluster)和大尺度脑网络(Large-Scale Network)的重叠

前言

  在神经科学的处理中,经常会出现想通过大尺度脑网络的视角来分析某一脑区的情形,首先我们要判断簇(Cluster)属于哪个网络,其次我们想要得知量化的信息与某网络的重叠百分比。那拿到Cluster的掩模与脑功能网络的模版后,有哪些方法可以计算重叠比例呢?

Network-based connectivity: a. Large-scale network parcellation is ...

目录

前言

一、基于可视化软件进行简单查看

环境配置:

操作步骤:

二、基于matlab进行百分比量化的计算

环境配置:

操作步骤:

1.计算重叠比例

2.画图

​编辑总结


一、基于可视化软件进行简单查看

环境配置:

操作步骤:

  首先打开TemplateImage>选择AddOverlay>选中Cluster

  再次打开AddOverlay>选中脑功能模版>选择AllRange(index)>依次检查每一个脑网络

  例子:如下图可以看出位于右上额回的团块,主要重叠在VAN(腹侧注意网络)里。可是这样的结论真的是可靠的吗?

二、基于matlab进行百分比量化的计算

环境配置:

 环境:matlabR2021a

软件:spm12(官方下载

操作步骤:

1.计算重叠比例

首先在Matlab里运行如下代码,会自动在输出路径里产生Cluster和每一个脑网络交集的掩模,并基于此计算出和每个网络重叠的比例在matlab工作区。

path.cluster='Path_to_Clsuter/';
outputDir='/Path_to_Out/';
%  %% functional connectivity
 cluster=dir(path.cluster);
 cluster=char(cluster.name);
 cluster(cluster(:,1)=='.',:)=[];
 cluster=cellstr(cluster);
 cluster_num=length(cluster(:,1));
 
 for k=1:cluster_num
%      
       ImageInput2_name=cluster(k);
       ImageInput2_name=char(ImageInput2_name);
        ImageInput2=[path.cluster '\' ImageInput2_name];
        for j=1:7
        ImageInput1=['Yeo_7network_Lib_' num2str(j) '.img'];
     
     output_name_pre=ImageInput2_name;
     output_name_pre=strrep(output_name_pre,'.nii','');
     output_name=[output_name_pre '_Yeo' num2str(j)];
     
     spm('Defaults','fMRI');
     spm_jobman('initcfg');
     clear matlabbatch;
     matlabbatch{1}.spm.util.imcalc.input = {ImageInput2 
                                         ImageInput1
                                        
                                        };
matlabbatch{1}.spm.util.imcalc.output =output_name;
matlabbatch{1}.spm.util.imcalc.outdir = {outputDir};
matlabbatch{1}.spm.util.imcalc.expression = 'i1.*i2';
matlabbatch{1}.spm.util.imcalc.var = struct('name', {}, 'value', {});
matlabbatch{1}.spm.util.imcalc.options.dmtx = 0;
matlabbatch{1}.spm.util.imcalc.options.mask = 0;
matlabbatch{1}.spm.util.imcalc.options.interp = 1;
matlabbatch{1}.spm.util.imcalc.options.dtype = 4;
 spm_jobman('run',matlabbatch);
  %% calculate the number of voxels in the two images
 V=spm_vol(ImageInput2);
 ImageInput2_f=spm_read_vols(V);
 clear V
 V=spm_vol(fullfile(outputDir,[output_name '.nii']));
 output_Image_f=spm_read_vols(V);
 clear V
 num_ImageInput2_f=numel(ImageInput2_f(abs(ImageInput2_f)>0));
 num_output_Image_f=numel(output_Image_f(abs(output_Image_f)>0));
 percentage(k,j)=num_output_Image_f/num_ImageInput2_f;
 clear ImageInput2_f output_Image_f
        end
      percentage_ROI_name(k,1)=cellstr(output_name);
  end
  [max,Index_max]=max(percentage,[],2);
2.画图

通过可视化热图可以看出,其实该簇主要FPN网络,而肉眼看起来已经重叠度非常高的VAN网络其实只占比24%。


percentage(percentage>1)=0;

networks = {'Visual', 'Somatomotor','DAN','VAN', 'Limbic', 'FPN', 'DMN'};

figure;

h = heatmap(networks, {'Networks'}, percentage);

总结

  本文介绍了两种方法识别某一脑区于其他脑网络的重叠程度:第一种方法利用mango等看图软件进行肉眼观察,但因为fMRI是高维图像的原因,这种方法虽然简单直观,但并不可靠。第二种方法是利用spm进行计算,可以得到量化的结果,更加可靠。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值