Skip to content

Commit

Permalink
Bugfix: Import BrainSuite folder with interactive "Compute MNI transf…
Browse files Browse the repository at this point in the history
…ormation"
  • Loading branch information
ftadel committed May 28, 2020
1 parent c684f2c commit 45c1c8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions toolbox/core/bst_memory.m
Expand Up @@ -98,6 +98,8 @@
end

% ===== CHECK IF LOADED =====
% Use short file name
MriFile = file_short(MriFile);
% Check if surface is already loaded
iMri = find(file_compare({GlobalData.Mri.FileName}, MriFile));
% If MRI is not loaded yet: load it
Expand Down Expand Up @@ -3386,10 +3388,8 @@ function UnloadSurface(SurfaceFiles, isCloseFig)
%% ===== UNLOAD MRI =====
function UnloadMri(MriFile) %#ok<DEFNU>
global GlobalData;
% Get SUBJECTS directory
ProtocolInfo = bst_get('ProtocolInfo');
% Force relative path
MriFile = strrep(MriFile, ProtocolInfo.SUBJECTS, '');
MriFile = file_short(MriFile);
% Check if MRI is already loaded
iMri = find(file_compare({GlobalData.Mri.FileName}, MriFile));
% If it is: unload it
Expand Down
2 changes: 1 addition & 1 deletion toolbox/io/import_anatomy_bs.m
Expand Up @@ -411,7 +411,7 @@
BstHeadFile = tess_downsize( BstHeadHiFile, 1082, 'reducepatch' );
% Load MRI
bst_progress('start', 'Import BrainSuite folder', 'Filling holes in the head surface...');
sMri = bst_memory('LoadMri', BstMriFile);
sMri = in_mri_bst(BstMriFile);
% Load head surface
sHead = in_tess_bst(BstHeadFile);
% Remove holes
Expand Down

0 comments on commit 45c1c8d

Please sign in to comment.