Display Image Result from a code in GUI
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
N
le 3 Oct 2023
Réponse apportée : Cris LaPierre
le 3 Oct 2023
Hi everyone, I have a code to reconstruct image MRI and now I want to display image reconstruct in GUI not in command window, can someone help me?
Here is the part to display image in my code:
figure(1)
imshow(abs(image),[]);
title('The original image');
figure(2)
imshow(abs(fftshift(ifft2(CSimage))),[]);
title('The image reconstructed ');
0 commentaires
Réponse acceptée
Cris LaPierre
le 3 Oct 2023
If you are using app designer and displaying the image using imshow, you need to tell MATLAB which axes to plot to. You do this using the 'Parent' name-value pair. The value is the axes handle, which is the component name. It might be something like this
imshow(abs(image),[],'Parent',app.UIAxes1);
See this page for more help in displaying graphics in App Designer: https://www.mathworks.com/help/matlab/creating_guis/graphics-support-in-app-designer.html
You might also find this example helpful: https://www.mathworks.com/help/matlab/creating_guis/image-histogram-gui-in-app-designer.html
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Display and Exploration dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!