Skip to content

Commit

Permalink
prevent missing output dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwok-shing Chan committed Oct 11, 2022
1 parent 759e89f commit 65bef47
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
[h.Analysis.segmentation.AHEAD.text.outputDir,...
h.Analysis.segmentation.AHEAD.edit.outputDir,...
h.Analysis.segmentation.AHEAD.button.outputDir] = sepia_construct_text_edit_button(panelParent,...
'Ourpur directory:',[],open_icon,pos,wratio);
'Ourpur directory:',pwd,open_icon,pos,wratio);
% correct bias field option
pos = [left(1) bottom(14) width height];
h.Analysis.segmentation.AHEAD.checkbox.biasCorr = uicontrol('Parent',panelParent,'backgroundcolor',get(h.fig,'color'),'Style','checkbox','units','normalized',...
Expand Down Expand Up @@ -217,6 +217,7 @@ function PushbuttonStart_Analysis_segmentation_Callback(source,eventdata,h)
% output
outputDir = get(h.Analysis.segmentation.AHEAD.edit.outputDir, 'String');
% if the output directory does not exist then create the directory
if isempty(outputDir); outputDir = fullfile(pwd,'segmentation_sepia');end
if exist(outputDir,'dir') ~= 7; mkdir(outputDir); end

% create a new m file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
[h.Analysis.segmentation.CIT168RL.text.outputDir,...
h.Analysis.segmentation.CIT168RL.edit.outputDir,...
h.Analysis.segmentation.CIT168RL.button.outputDir] = sepia_construct_text_edit_button(panelParent,...
'Ourpur directory:',[],open_icon,pos,wratio);
'Ourpur directory:',pwd,open_icon,pos,wratio);
% correct bias field option
pos = [left(1) bottom(13) width height];
h.Analysis.segmentation.CIT168RL.checkbox.biasCorr = uicontrol('Parent',panelParent,'backgroundcolor',get(h.fig,'color'),'Style','checkbox','units','normalized',...
Expand Down Expand Up @@ -208,6 +208,7 @@ function PushbuttonStart_Analysis_segmentation_Callback(source,eventdata,h)
% output
outputDir = get(h.Analysis.segmentation.CIT168RL.edit.outputDir, 'String');
% if the output directory does not exist then create the directory
if isempty(outputDir); outputDir = fullfile(pwd,'segmentation_sepia');end
if exist(outputDir,'dir') ~= 7; mkdir(outputDir); end

% create a new m file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
[h.Analysis.segmentation.MuSus100.text.outputDir,...
h.Analysis.segmentation.MuSus100.edit.outputDir,...
h.Analysis.segmentation.MuSus100.button.outputDir] = sepia_construct_text_edit_button(panelParent,...
'Ourpur directory:',[],open_icon,pos,wratio);
'Ourpur directory:',pwd,open_icon,pos,wratio);
% correct bias field option
pos = [left(1) bottom(14) width height];
h.Analysis.segmentation.MuSus100.checkbox.biasCorr = uicontrol('Parent',panelParent,'backgroundcolor',get(h.fig,'color'),'Style','checkbox','units','normalized',...
Expand Down Expand Up @@ -217,6 +217,7 @@ function PushbuttonStart_Analysis_segmentation_Callback(source,eventdata,h)
% output
outputDir = get(h.Analysis.segmentation.MuSus100.edit.outputDir, 'String');
% if the output directory does not exist then create the directory
if isempty(outputDir); outputDir = fullfile(pwd,'segmentation_sepia');end
if exist(outputDir,'dir') ~= 7; mkdir(outputDir); end

% create a new m file
Expand Down

0 comments on commit 65bef47

Please sign in to comment.