diff --git a/Code/AdvancedSettingsGUI.fig b/Code/AdvancedSettingsGUI.fig index 28bde46..1a0ef90 100644 Binary files a/Code/AdvancedSettingsGUI.fig and b/Code/AdvancedSettingsGUI.fig differ diff --git a/Code/AdvancedSettingsGUI.m b/Code/AdvancedSettingsGUI.m index 114aaa1..6abb440 100644 --- a/Code/AdvancedSettingsGUI.m +++ b/Code/AdvancedSettingsGUI.m @@ -22,7 +22,7 @@ % Edit the above text to modify the response to help AdvancedSettingsGUI -% Last Modified by GUIDE v2.5 08-Sep-2015 16:21:32 +% Last Modified by GUIDE v2.5 17-May-2016 08:16:51 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; @@ -66,6 +66,11 @@ function AdvancedSettingsGUI_OpeningFcn(hObject, eventdata, handles, varargin) handles.PrevSettings = Settings; %HROIM Method +if ~isfield(Settings,'DoStrain') + Settings.DoStrain = 1; +end +set(handles.DoStrain,'Value',Settings.DoStrain); + HROIMMethodList = {'Simulated-Kinematic','Simulated-Dynamic','Real-Grain Ref','Real-Single Ref'}; set(handles.HROIMMethod, 'String', HROIMMethodList); if strcmp(Settings.HROIMMethod,'Simulated') @@ -129,6 +134,7 @@ function AdvancedSettingsGUI_OpeningFcn(hObject, eventdata, handles, varargin) %Update Components HROIMMethod_Callback(handles.HROIMMethod,eventdata,handles); +DoStrain_Callback(handles.DoStrain, eventdata, handles); handles = guidata(hObject); DoDD_Callback(handles.DoDD, eventdata, handles); handles = guidata(hObject); @@ -602,5 +608,29 @@ function EnableProfiler_Callback(hObject, eventdata, handles) % Hint: get(hObject,'Value') returns toggle state of EnableProfiler handles.Settings.EnableProfiler = get(hObject,'Value'); +guidata(hObject,handles); + +% --- Executes on button press in DoStrain. +function DoStrain_Callback(hObject, eventdata, handles) +% hObject handle to DoStrain (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) +% Hint: get(hObject,'Value') returns toggle state of DoStrain +if get(hObject,'Value') + set(handles.HROIMMethod,'Enable','on'); + set(handles.HROIMedit,'Enable','on'); + set(handles.StandardDeviation,'Enable','on'); + set(handles.MisoTol,'Enable','on'); + set(handles.GrainRefType,'Enable','on'); + HROIMMethod_Callback(handles.HROIMMethod, eventdata, handles); +else + set(handles.HROIMMethod,'Enable','off'); + set(handles.HROIMedit,'Enable','off'); + set(handles.StandardDeviation,'Enable','off'); + set(handles.MisoTol,'Enable','off'); + set(handles.GrainRefType,'Enable','off'); +end +handles.Settings.DoStrain = get(hObject,'Value'); +guidata(hObject,handles); diff --git a/Code/GetHROIMDefaultSettings.m b/Code/GetHROIMDefaultSettings.m index 5106101..7e100cb 100644 --- a/Code/GetHROIMDefaultSettings.m +++ b/Code/GetHROIMDefaultSettings.m @@ -32,6 +32,7 @@ %% Advanced Settings %HROIM Settings +Settings.DoStrain = 1; Settings.HROIMMethod = 'Real'; %{'Simulated', 'Real'}, %Someday will add Hybrid Settings.IterationLimit = 6; Settings.RefImageInd = 0; diff --git a/Code/HREBSDMain.m b/Code/HREBSDMain.m index 77015c6..e1a0cef 100644 --- a/Code/HREBSDMain.m +++ b/Code/HREBSDMain.m @@ -225,13 +225,18 @@ %% Run Analysis %Use a parfor loop if allowed multiple processors. -tic +if ~isfield(Settings,'DoStrain') + Settings.DoStrain = 1; +end + %Initialize Variables F = repmat({zeros(3)},1,Settings.ScanLength); -g = repmat({zeros(3,1)},1,Settings.ScanLength); +g = repmat({zeros(3)},1,Settings.ScanLength); U = repmat({zeros(3)},1,Settings.ScanLength); SSE = repmat({0},1,Settings.ScanLength); - +XX = repmat({zeros(Settings.NumROIs,3)},1,Settings.ScanLength); +if Settings.DoStrain +tic if Settings.DoParallel > 1 NumberOfCores = Settings.DoParallel; try @@ -301,6 +306,7 @@ commented out this (outputs strain matrix - I think - DTF 5/15/14) end Time = toc/60; if Settings.DisplayGUI; disp(['Time to finish: ' num2str(Time) ' minutes']); end; +end %% Save output and write to .ang file for jj = 1:Settings.ScanLength @@ -335,7 +341,6 @@ commented out this (outputs strain matrix - I think - DTF 5/15/14) data.phi1rn{jj} = phi1; data.PHIrn{jj} = PHI; data.phi2rn{jj} = phi2; - Settings.XX = XX; end @@ -343,6 +348,7 @@ commented out this (outputs strain matrix - I think - DTF 5/15/14) Settings.NewAngles(jj,1:3) = [phi1 PHI phi2]; end +Settings.XX = XX; if strcmp(Settings.ScanType,'L') data.phi1rn = LFileVals{1};