MATLAB: Radio button in a GUI

buttonguiimage analysisradiobutton

Hello, I'm working on the images from a GUI matlab my problem is: I have two radioButton pushButton and I want to know how to link the three callback more exactemnt 1 radionbutton is for DICOM images and the 2nd is for jpeg images and pushbutton that is open is that I want is when I select the pushbutton opens the RadioButton1 me that dicom images that exist and when I select the 2nd radion button the pushbutton opens my jpeg images that exist, help me with a code for the three callback.

Best Answer

You don't need to do anything with the radio button callback functions. In the push button call back, have this code
radioButton1State = get(handles.radioButton1, 'Value');
radioButton2State = get(handles.radioButton2, 'Value');
if radioButton1State
% create dicom filename then open it.
end
if radioButton2State
% create jpg filename then open it.
end