Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions demos/MoAE/MoAEpilot_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
WD = fileparts(mfilename('fullpath'));

% we add all the subfunctions that are in the sub directories
addpath(fullfile(WD, '..'));
addpath(genpath(fullfile(WD, '..', 'src')));
addpath(genpath(fullfile(WD, '..', 'lib')));
addpath(genpath(fullfile(WD, '..', '..', 'src')));
addpath(genpath(fullfile(WD, '..', '..', 'lib')));

%% Set options
opt = MoAEpilot_getOption();
Expand Down
14 changes: 7 additions & 7 deletions src/reports/copyGraphWindownOutput.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
%
% assumes that no file was generated if SPM is running in command line mode

if ~spm('CmdLine')
if nargin < 4 || isempty(imgNb)
imgNb = 1;
end

if nargin < 4 || isempty(imgNb)
imgNb = 1;
end
if nargin < 3 || isempty(action)
action = '';
end

if nargin < 3 || isempty(action)
action = '';
end
if ~spm('CmdLine') && ~isOctave

figureDir = fullfile(opt.derivativesDir, ['sub-' subID], 'figures');
if ~exist(figureDir, 'dir')
Expand Down
16 changes: 15 additions & 1 deletion src/utils/setGraphicWindow.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
% (C) Copyright 2019 CPP BIDS SPM-pipeline developpers

function [interactiveWindow, graphWindow, cmdLine] = setGraphicWindow()
[interactiveWindow, graphWindow, cmdLine] = spm('FnUIsetup');

interactiveWindow = [];
graphWindow = [];
cmdLine = true;

if ~spm('CmdLine') && ~isOctave

try
[interactiveWindow, graphWindow, cmdLine] = spm('FnUIsetup');
catch
warning('Could not open a graphic window. No figure will be created.');
end

end

end