Effacer les filtres
Effacer les filtres

Issue with overlaying medical images using transparency

1 vue (au cours des 30 derniers jours)
Swathi
Swathi le 10 Fév 2024
Commenté : Swathi le 22 Fév 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

Réponses (1)

Taylor
Taylor le 13 Fév 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 commentaire
Swathi
Swathi le 22 Fév 2024
Thanks, is there any way to do this while preserving the original images' colors though?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Lighting, Transparency, and Shading dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by