How to overlay a semi-transparent colorimage over a grayscale image?

3 次查看(过去 30 天)
Hi all,
I would like to overlay a semi-transparent colorimage over a grayscale image (colored fMRI activity map over a structural MRI image). I tried to use colorFreeze, but if I do, for some reason I lose the transparency of the overlay image.
i = 30; %Slice 30 of an MRI image.
image(anat.img(:,:,i),'CDataMapping','scaled');colormap gray;
%freezeColors;
hold on;
image(im(:,:,i),'CDataMapping','scaled','AlphaData',mask(:,:,i));colormap(autumn);
Transparency works fine without the use of freezeColors.

回答(2 个)

Zhangyan Yang
Zhangyan Yang 2020-12-12
you can use spm which is matlab-compatible

Image Analyst
Image Analyst 2020-12-12

类别

Help CenterFile Exchange 中查找有关 MRI 的更多信息

产品


版本

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by