这对我来说很难解释,所以我会尽力弄清楚,但是如果需要更多信息,请告诉我:
- 我有一个3D图像,然后乘以一个逻辑蒙版。
- 我找到了这个新图像的所有非0值,并提取了数据。 (下面的代码)
然后,我将数据关联起来(每个体素与一个不同的变量相对应),现在我有了一个变量,可以说有7000个体素 报告相关系数大于0到500,000 不存在的体素。 (不包括代码)- 将那些大于0的相关体素分配为1,其余的分配为0。(下面的代码)
- 我现在的目标是查看原始3D(NIFTI格式)图像,该图像在具有相关体素的区域中以较亮的对比度覆盖。
感谢您的帮助!
%% Loop through images, collecting index values in WhiteMatter areas
for a = 1:length(FA_MNI_dir) %282
%% Load FA image
FAdir = load_untouch_nii([FA_MNI_dir(a).folder '\' FA_MNI_dir(a).name]);
FAimg = FAdir.img;
%% Reshape FA image into MNI mask size
FA_reshape = imresize3(FAimg,2); % 2 for double the dimensions
% view to check image alignment
imshowpair(squeeze(FA_reshape(:,:,95)),squeeze(FA_Whitematter(:,:,95))) % they overlap = good fit
%% Multiply FA and WhiteMatter mask
FA_Whitematter = (FA_reshape .* WhiteMatter_MNI152_img);
%% Get voxel values in FA
indecies_FA_white = find(FA_Whitematter ~= 0); %find the indecies where FA_WM is not 0
FA_White_Values = double(FA_Whitematter(indecies_FA_white)); %find the values within those indecies
%% Save indecies per subject
FA_allSubj{a} = FA_White_Values;
end
%% 1 if relative voxel is a positive or a negative correlation and 0 for every other voxel
Signf_corrNeg = corr_NM_voxel_i < -0.15;
Signf_corrPos = corr_NM_voxel_i > 0.15;