From d498d685e3f8e7756f8fb7cb0c0fa9a9e8b95a8e Mon Sep 17 00:00:00 2001 From: Aldo Zaimi Date: Thu, 22 Sep 2016 11:51:47 -0400 Subject: [PATCH] small updates --- code/GUI/ManualCorrectionGUI.m | 2 +- code/GUI/SegmentationGUI.m | 26 ++++++++++++++++++++++++++ code/utils/as_regiongrowing.m | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/code/GUI/ManualCorrectionGUI.m b/code/GUI/ManualCorrectionGUI.m index 91c6dff..cebbc23 100644 --- a/code/GUI/ManualCorrectionGUI.m +++ b/code/GUI/ManualCorrectionGUI.m @@ -74,7 +74,7 @@ function ManualCorrectionGUI_OpeningFcn(hObject, eventdata, handles, varargin) if strfind(varargin{1},'.nii') handles.img = load_nii_data(varargin{1}); else - handles.img = rgb2gray(imread(varargin{1})); + handles.img =imread(varargin{1}); end % Image is enhanced to help manual segmentation diff --git a/code/GUI/SegmentationGUI.m b/code/GUI/SegmentationGUI.m index 1132420..dffe23b 100644 --- a/code/GUI/SegmentationGUI.m +++ b/code/GUI/SegmentationGUI.m @@ -1960,10 +1960,27 @@ function popupmenu_ROC_Callback(hObject, eventdata, handles) % Call the slider_ROC_plot callback function to update classifier, ROC plot % & axon discrimination display + + +handleArray = [handles.remove, handles.remove_concavity, handles.DiscriminantAnalysis, handles.resetStep3, handles.go_full_image... + handles.LoadSegParam, handles.PixelSize, handles.PixelSize_button, handles.popupmenu_ROC, handles.Transparency, handles.slider_ROC_plot... + handles.Quadratic, handles.Linear, handles.MyelinSeg]; + +set(handleArray,'Enable','off'); +drawnow; + + slider_ROC_plot_Callback(hObject, eventdata, handles); +set(handleArray,'Enable','on'); + + guidata(hObject,handles); + + + + % --- Executes during object creation, after setting all properties. function popupmenu_ROC_CreateFcn(hObject, eventdata, handles) % hObject handle to popupmenu_ROC (see GCBO) @@ -1986,6 +2003,13 @@ function slider_ROC_plot_Callback(hObject, eventdata, handles) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) +handleArray = [handles.remove, handles.remove_concavity, handles.DiscriminantAnalysis, handles.resetStep3, handles.go_full_image... + handles.LoadSegParam, handles.PixelSize, handles.PixelSize_button, handles.popupmenu_ROC, handles.Transparency, handles.slider_ROC_plot... + handles.Quadratic, handles.Linear, handles.MyelinSeg]; + +set(handleArray,'Enable','off'); +drawnow; + % Make sure the slider value is an integer float_value=get(handles.slider_ROC_plot,'Value'); set(handles.slider_ROC_plot,'Value',round(float_value)); @@ -2031,6 +2055,8 @@ function slider_ROC_plot_Callback(hObject, eventdata, handles) % -1- % imshow(sc(get(handles.Transparency,'Value')*sc(handles.data.DA_accepted,[0 0.75 0],handles.data.DA_accepted)... % +get(handles.Transparency,'Value')*sc(Rejected_axons_img,[1 0.5 0],Rejected_axons_img)+sc(handles.data.Step1))); + +set(handleArray,'Enable','on'); guidata(hObject,handles); diff --git a/code/utils/as_regiongrowing.m b/code/utils/as_regiongrowing.m index 87460ee..92024ff 100644 --- a/code/utils/as_regiongrowing.m +++ b/code/utils/as_regiongrowing.m @@ -1,4 +1,4 @@ -function J=regiongrowing(I,x,y,reg_maxdist) +function J=as_regiongrowing(I,x,y,reg_maxdist) % This function performs "region growing" in an image from a specified % seedpoint (x,y) %