Diff of /script_to_save_results.m [000000] .. [81c116]

Switch to unified view

a b/script_to_save_results.m
1
if( ~handles.simulation && handles.Bmode)
2
    % This is the condition to save results from processing BMode images.
3
    % This variable is empty, if no boxes were added
4
    if isempty(handles.Diameter_data)
5
        fprintf('No diameter data. No results saved\n');
6
        fprintf('Results for simulations will not be saved\n');
7
    else
8
        % Save the data into a matrix
9
        %handles.Message_Bar.String = 'Saving Results in Process...';
10
        Diameter        = handles.Diameter_data;
11
        time_frame      = handles.time;
12
        ECG             = handles.ECG; 
13
        Proximal_Mask   = handles.Proximal_Mask;
14
        Distal_Mask     = handles.Distal_Mask;
15
        BW_Threshold    = handles.Current_Threshold; 
16
        save(handles.save_path, 'ECG', ...
17
                                'time_frame', ...
18
                                'Diameter', ...
19
                                'Proximal_Mask', ...
20
                                'Distal_Mask', ...
21
                                'BW_Threshold');                   
22
        fprintf('Results are saved here %s\n', handles.save_path);
23
        %handles.Message_Bar.String = 'Saving Results COMPLETE.';
24
    end
25
    
26
elseif ( ~handles.simulation && ~handles.Bmode)
27
    
28
    % This is the condition to save results from processing Pulsed Waves
29
    % Doppler data.
30
    if isempty(handles.Velocity_Data)
31
        fprintf('No diameter data. No results saved\n');
32
        fprintf('Results for simulations will not be saved\n');
33
    else
34
        % Save the data into a matrix
35
        %handles.Message_Bar.String = 'Saving Results in Process...';
36
        Velocity        = handles.Velocity_Data;
37
        time_frame      = handles.time;
38
        ECG             = handles.ECG; 
39
        save(handles.save_path, 'ECG', ...
40
                                'time_frame', ...
41
                                'Velocity');
42
        fprintf('Results are saved here %s\n', handles.save_path);
43
        handles.Message_Bar.String = 'Saving Results COMPLETE.';
44
    end
45
        
46
elseif handles.simulation
47
    fprintf('Results are not saved for simulation\n');
48
end