Borrar filtros
Borrar filtros

Issue with overlaying medical images using transparency

1 visualización (últimos 30 días)
Swathi
Swathi el 10 de Feb. de 2024
Comentada: Swathi el 22 de Feb. de 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

Respuestas (1)

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

Iniciar sesión para comentar.

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by