a b/pushbutton3_Callback.m
1
% This is the callback for adjusting the BOX positions
2
% --- Executes on button press in pushbutton3.
3
function pushbutton3_Callback(hObject, eventdata, handles)
4
   % hObject    handle to axes1 (see GCBO)
5
    % eventdata  reserved - to be defined in a future version of MATLAB
6
    % handles    structure with handles and user data (see GUIDATA)
7
        
8
    % Update the Threshold based on the new end values of the slider, stops any
9
    % running timers, update box locations
10
    script_update_Threshold_and_display;
11
    
12
    % handles.Bmode is false if the input data is Pulsed Doppler data
13
    if( handles.Bmode ~= true ), 
14
        handles.Message_Bar.String = "Button Deactivated! Not required for pulsed Doppler";
15
        return; 
16
    end
17
    
18
    % Run this script to put the "Box" on the images
19
    script_put_rectangle_on_image
20
    
21
    handles.Add_Box.String      = sprintf('Add BOX %d', handles.number_Box+1); 
22
    handles.Remove_Box.String   = sprintf('Remove BOX %d', handles.number_Box);
23
    
24
    % Diaplay user info
25
    handles.Message_Bar.String = sprintf("Box Pair %d ADDED !", handles.number_Box);
26
                    
27
    %Update handles structure
28
    guidata(hObject, handles);
29
end