Filter löschen
Filter löschen

Issue with overlaying medical images using transparency

1 Ansicht (letzte 30 Tage)
Swathi
Swathi am 10 Feb. 2024
Kommentiert: Swathi am 22 Feb. 2024
Changing image transparency seems simple enough, but when I try to do this to superimpose my PET and MR imaging data, I don't get good results. First image shows what I have now and second shows an example of correctly superimposed results done manually.
Would love some help with this issue and have included my code and the variables:
figure
for n = 1:10
subplot(2,5,n)
MRtr = imshow(Ven(1:156,1:156,n),[]);
hold on
PTtr = imshow(interpolatedPET(1:156,1:156,n)',[],Colormap=hot);
PTtr.AlphaData = 0.5;
end

Antworten (1)

Taylor
Taylor am 13 Feb. 2024
You could use imfuse.
load workspaceoverlay.mat
figure
for n = 1:10
subplot(2,5,n)
% MRtr = imshow(Ven(1:156,1:156,n),[]);
% hold on
% PTtr = imshow(interpolatedPET(1:156,1:156,n)',[],Colormap=hot);
% PTtr.AlphaData = 0.5;
c = imfuse(Ven(1:156,1:156,n), interpolatedPET(1:156,1:156,n)');
imshow(c)
end
  1 Kommentar
Swathi
Swathi am 22 Feb. 2024
Thanks, is there any way to do this while preserving the original images' colors though?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by