[81c116]: / pushbutton1_Callback.m

Download this file

46 lines (38 with data), 1.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% Function for the Push Button "Play Movie"
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% handles.Bmode is false if the input data is Pulsed Doppler data
if( handles.Bmode ~= true )
plot(handles.time, handles.Velocity_Data, '-k', ...
'LineWidth', 1, ...
'Parent', handles.Diameter_Plot);
% This script update the message bar
script_to_display_message;
else
% Update the Threshold based on the new end values of the slider, stops any
% running timers, update box locations. clears the diameter plots
script_update_Threshold_and_display;
% Check this condition to see if any box were added for processing.
% If not, request user to add some boxes to get results
if(handles.number_Box == 0)
handles.Message_Bar.String = 'Please add a BOX';
handles.Diameter_data = [];
return;
else
% Run this script to process the frames. In the process, we are mainly
% running time intensive operations like bwareaopen. Instead of
% running it multiple times, we run these commands only when the slider
% is updated.
script_to_process_frames;
end
end
% This script update the message bar
script_to_display_message;
%run this scrip to save the results
script_to_save_results;
% Update handles structure
guidata(hObject, handles);
end