Skip to content

Commit

Permalink
Bugfix: Running CAT12 for the default anatomy folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ftadel committed Jan 18, 2022
1 parent 10bfe72 commit bbc699d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion doc/license.html
Expand Up @@ -5,7 +5,7 @@
<body alink="#fff000" link="#fff000" vlink="#fff000">
<h4><span style="font-family: Arial Black; color: #ffffff;"><strong>THERE IS NO UNDO BUTTON - SET UP A BACKUP OF YOUR DATABASE</strong></span></h4>
<HR>
<!-- LICENCE_START -->Version: 3.220115 (15-Jan-2022)<br>
<!-- LICENCE_START -->Version: 3.220118 (18-Jan-2022)<br>
<span style="font-style: italic;">COPYRIGHT &copy; 2000-2022
USC &amp; McGill University.<br>
</span>
Expand Down
2 changes: 1 addition & 1 deletion doc/version.txt
@@ -1,2 +1,2 @@
% Brainstorm
% v. 3.220115 (15-Jan-2022)
% v. 3.220118 (18-Jan-2022)
4 changes: 2 additions & 2 deletions toolbox/io/import_anatomy_cat_2020.m
Expand Up @@ -593,11 +593,11 @@
end

%% ===== IMPORT THICKNESS MAPS =====
if isExtraMaps && ~isempty(CentralHiFile)
if isExtraMaps && ~isempty(CentralHiFile) && (iSubject > 0)
% Create a condition "CAT12"
iStudy = db_add_condition(iSubject, 'CAT12');
% Import cortical thickness
if ~isempty(ThickLhFile) && ~isempty(ThickLhFile)
if ~isempty(ThickLhFile) && ~isempty(ThickRhFile)
import_sources(iStudy, CentralHiFile, ThickLhFile, ThickRhFile, 'FS', 'thickness');
end
% Import gyrification
Expand Down
22 changes: 13 additions & 9 deletions toolbox/process/functions/process_segment_cat12.m
Expand Up @@ -352,8 +352,8 @@
elseif ~isSphReg && isCerebellum
matlabbatch{1}.spm.tools.cat.estwrite.output.surface = 6; % 6: lh+rh+cerebellum (fast, no registration, quick review only)
end
% Extract additional surface parameters: Cortical thickness, Gyrification index, Sulcal depth
if isExtraMaps
% Extract additional surface parameters: Cortical thickness, Gyrification index, Sulcal depth (can't be imported for default anatomy)
if isExtraMaps && (iSubject > 0)
matlabbatch{1}.spm.tools.cat.estwrite.output.surf_measures = 1; % Thickness maps
% Separate SPM process (second element in the batch)
matlabbatch{2}.spm.tools.cat.stools.surfextract.data_surf(1) = cfg_dep('CAT12: Segmentation (current release): Left Central Surface', substruct('.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('()',{1}, '.','lhcentral', '()',{':'}));
Expand Down Expand Up @@ -427,13 +427,17 @@ function ComputeInteractive(iSubject, iAnatomy) %#ok<DEFNU>
if isCancel
return
end
% Ask for cortical maps
[isExtraMaps, isCancel] = java_dialog('confirm', ['Compute cortical maps?' 10 10 ...
' - Cortical thickness', 10 ...
' - Gyrification index', 10 ...
' - Sulcal depth', 10 10], 'CAT12 MRI segmentation');
if isCancel
return
% Ask for cortical maps (not for default anatomy)
if (iSubject > 0)
[isExtraMaps, isCancel] = java_dialog('confirm', ['Compute cortical maps?' 10 10 ...
' - Cortical thickness', 10 ...
' - Gyrification index', 10 ...
' - Sulcal depth', 10 10], 'CAT12 MRI segmentation');
if isCancel
return
end
else
isExtraMaps = 0;
end
% Open progress bar
bst_progress('start', 'CAT12', 'CAT12 MRI segmentation...');
Expand Down

0 comments on commit bbc699d

Please sign in to comment.