Overlay statistical info on MR data

조회 수: 6 (최근 30일)
Mark Hoggarth
Mark Hoggarth 2021년 10월 19일
편집: Prachi Kulkarni 2021년 10월 22일
Hello!
I'm working with MR data and want to overlay a statistical map on top of it. I've created a montage of the imaging data; then a same statistical map that is thresholded at significance level (p <= 0.5). What I'm trying to do is overlay the thresholded statistical map with the jet colormap so that non-significant pixels (with value 0) are not shown. This would look like an "activation map" in fMRI analysis.
Here's a contrived example of the code I'm using that isn't working:
% Create contrived image
img = 1500*rand(100,100);
% Create contrived statistic
stat = 10*rand(100,100);
% Create and filter contrived significance value to p <= 0.05
sig = rand(100,100);
sig_thresh = zeros(size(sig));
sig_thresh(find(sig<=0.05)) = 1;
% Display images
h_beta=imshow(img,'InitialMagnification',800,'DisplayRange',[1 1500],'Colormap',gray); % Psuedo MR image
hold on;
h_stat=imshow(stat,'InitialMagnification',800,'DisplayRange',[0 10],'Colormap',jet); % Pseudo stat map
% Make non-significant stat pixels transparent
set(h_stat,'AlphaData',sig_thresh)

채택된 답변

Prachi Kulkarni
Prachi Kulkarni 2021년 10월 22일
편집: Prachi Kulkarni 2021년 10월 22일
Hi,
For the code snippet you have provided, here are some modifications that will work.
% Create contrived image
img = 1500*rand(100,100);
% Create contrived image
img = 1500*rand(100,100);
% Create contrived statistic
stat = 10*rand(100,100);
% Create and filter contrived significance value to p <= 0.05
sig = rand(100,100);
sig_thresh = zeros(size(sig));
sig_thresh(find(sig<=0.05)) = 1;
f = figure;
ax1 = axes('Parent',f); set(ax1,'Visible','off');
ax2 = axes('Parent',f); set(ax2,'Visible','off');
h_beta=imshow(img,'InitialMagnification',800,'DisplayRange',[1 1500],'Parent',ax1); % Psuedo MR image
ax1.Colormap = gray;
hold on;
h_stat=imshow(stat,'InitialMagnification',800,'DisplayRange',[0 10],'Parent',ax2); % Pseudo stat map
ax2.Colormap = jet;
% Make non-significant stat pixels transparent
set(h_stat,'AlphaData',sig_thresh)
Also do check whether labeloverlay is suitable for your MR image application.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by