Skip to content

Commit

Permalink
Remove dependency on image processing toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
brudfors authored Apr 24, 2023
1 parent d6f9689 commit 8dab9c6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spm_mb_fit.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@
nworker_zm = sett.nworker;
if isscalar(nworker_zm), nworker_zm = [nworker_zm]; end
if numel(nworker_zm) > numel(sz), nworker_zm = nworker_zm(1:numel(sz)); end
nworker_zm = padarray(nworker_zm,[0, numel(sz) - numel(nworker_zm)],nworker_zm(1),'pre');
nworker_zm = fliplr(nworker_zm);
sett.nworker = nworker_zm(end);
% Pad
tmp = zeros(size(sz));
tmp(end - numel(nworker_zm) + 1:end) = nworker_zm;
tmp(1:end - numel(nworker_zm)) = nworker_zm(1);
nworker_zm = tmp;
% Flip
nworker_zm = fliplr(nworker_zm);
% Set
sett.nworker = nworker_zm(end);

% If SPM has been compiled with OpenMP support then the number of threads
% are here set to speed up the algorithm
Expand Down

0 comments on commit 8dab9c6

Please sign in to comment.