How to depict an image in an axes?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Stelios Fanourakis
el 17 de Jun. de 2018
Comentada: Stelios Fanourakis
el 18 de Jun. de 2018
Let's assume I have a 4D image called 'im2'.
I want to imshow a new image called 'im3' which is equal:
im3 = permute(im2, [3 1 2 4]);
And I want the z axis to be
slice = floor(size(im2,2)/2)
So I come to
imshow(squeeze(im3(:,:,slice,:)))
What if I want to imshow the same image as above, to an axes using eg subplot but have a different index as z axis (controlled by a slider).
idx = round((get(hObject, 'Value'));
subplot(2,2,1)
imshow(squeeze(im3(:,:,idx,:)))
It works, but not the way I want. I need to keep the slice as the third dimension and at the same time to run it for times idx (which is the slider callbacks).
I have stuck. Any idea?
Please, ask me if you didn't understand my question
11 comentarios
Respuestas (1)
Ver también
Categorías
Más información sobre Display Image en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!