Displaying image with push button in GUI

2 views (last 30 days)
Hi All, At the moment, i am using the commands below in my code for creating an image. i would like to display the same image using the GUI using a pushbutton. The the tag name on the axis I would like to display on is: 'axis_1'. Please can anyone help me with the syntax for the callback?
Thanks in advance.
imh = image(cat(3,cells,z,z);
set(imh, 'erasemode', 'none');
axis equal
axis tight

Accepted Answer

Image Analyst
Image Analyst on 18 May 2014
rgbImage = cat(3, cells,z,z); % 3-D true color image from 2 other gray scale images.
axes(handles.axes_1); % Set current axes to this one.
imshow(rgbImage); % or use image() instead of imshow() if you want.
% Optional stuff:
axis on;
axis equal;
axis tight;
axis image;
title('This image is in axis_1', 'FontSize', 20);

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!