Return a graph and an image from a function
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi "mathelabers" :p I'm stuck and I hope that someone can help me. So, I'm using matlab to process two images. I did a function to do it and it is working fine, since I´m using the "figure" to show both image and graph as shown below.
if true
figure;
hold on;
plot(dicomImage(centerRow, :), 'r');
plot(tiffImageAligned(centerRow, :), 'b');
plot(difference, 'Color', 'cyan', 'LineWidth', 1);
xlim([1 dcmColumns]);
ylim([-10 101]);
line([1 dcmColumns], [0 0], 'Color', 'black', 'LineStyle', '--');
%line([centerColumn centerColumn], [0 100], 'Color', 'black', 'LineStyle', '--');
legend('DICOM', 'TIFF', 'Difference');
hold off;
figure,
imshowpair (dicomImage,tiffImageAligned,'Scaling','joint');
end
The big problem is that I want to show the same images but using a GUI in different axes. I was thinking declare the variable as global and then create a function that returns the graph, but It's not working. If I chose the axes before calling my function and only return the "imshowpair" it's perfect, but I don't know how to return the graphic.
Can someone help me?
Thank youuuu
3 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Performance 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!

