Azzera filtri
Azzera filtri

Issue with overlaying medical images using transparency

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

Taylor
Taylor il 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 Commento
Swathi
Swathi il 22 Feb 2024
Thanks, is there any way to do this while preserving the original images' colors though?

Accedi per commentare.

Categorie

Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by