Skip to content

Commit

Permalink
Fixed: Added checks for additional cat-tools that should be ignored i…
Browse files Browse the repository at this point in the history
…f CAT12

       is not installed.

Changed paths:
 M CHANGES.txt
 M Contents.m
 M cat_spm_results_ui.m
 M doc/cat.html
  • Loading branch information
ChristianGaser committed Jul 8, 2024
1 parent 6c4ef22 commit 7ad28a5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
13 changes: 12 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
------------------------------------------------------------------------
r2595 | gaser | 2024-07-08 21:03:40

Changed paths:
M CHANGES.txt
M Contents.m
M cat_spm_results_ui.m
M doc/cat.html

Fixed: Added checks for additional cat-tools that should be ignored if CAT12
is not installed.
------------------------------------------------------------------------
r2583 | gaser | 2024-05-25 15:33:40

Changed paths:
Expand All @@ -10,7 +21,7 @@ Changed paths:
M templates_MNI152NLin2009cAsym/thalamic_nuclei.txt

Fixed: Corrected wrong labels of thalamic nuclei atlas. Thanks to Jonas Krauß
for poiting to this error and Manoj Saranathan for help with the atlas
for pointing to this error and Manoj Saranathan for help with the atlas
labels.
------------------------------------------------------------------------
r2582 | gaser | 2024-05-21 01:23:31
Expand Down
2 changes: 1 addition & 1 deletion Contents.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% Computational Anatomy Toolbox
% Version 2582 (CAT12.9) 2024-05-21
% Version 2583 (CAT12.9) 2024-05-25
% ______________________________________________________________________
%
% Christian Gaser, Robert Dahnke
Expand Down
18 changes: 11 additions & 7 deletions cat_spm_results_ui.m
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
if isfield(SPM.xVol,'G') && ischar(SPM.xVol.G)
if ~exist(SPM.xVol.G,'file')
[pp2,ff2,xx2] = spm_fileparts(SPM.xVol.G);
if ~isempty(strfind(ff2,'.central.freesurfer')) | ~isempty(strfind(ff2,['.central.' cat_get_defaults('extopts.shootingsurf')]))
if ~isempty(strfind(ff2,'.central.freesurfer')) || (exist('cat_get_defaults','file')) && (~isempty(strfind(ff2,['.central.' cat_get_defaults('extopts.shootingsurf')])))
if strfind(pp2,'templates_surfaces_32k')
SPM.xVol.G = fullfile(fileparts(mfilename('fullpath')),'templates_surfaces_32k',[ff2 xx2]);
else
Expand Down Expand Up @@ -448,7 +448,7 @@
% - first we have to use the Shooting Surface for the statistic to
% obtain more meaningful MNI coordinates
% - here we have to change to the used surface (FSaverage)
if spm_mesh_detect(xSPM.Vspm) & exist('spm_cat12')
if spm_mesh_detect(xSPM.Vspm) && exist('spm_cat12') && exist('cat_get_defaults','file')
FSavg = '.freesurfer.gii';
GSavg = ['.' cat_get_defaults('extopts.shootingsurf') '.gii'];
if ischar(SPM.xVol.G)
Expand Down Expand Up @@ -494,7 +494,7 @@

%-Atlas menu
%----------------------------------------------------------------------
if ~spm_mesh_detect(xSPM.Vspm)
if ~spm_mesh_detect(xSPM.Vspm) && exist('cat_get_defaults','file')
hAtlasUI = cat_spm_results_ui('SetupAtlasMenu',Finter);
end

Expand Down Expand Up @@ -923,11 +923,15 @@
'previous ortho sections /', ...
'previous surface rendering'};

if exist('cat_get_defaults','file')
str4 = ['spm_sections(xSPM,hReg,char(cat_get_defaults(''extopts.shootingT1'')));',...
'cat_spm_results_ui(''spm_list_cleanup'');',];
else
str4 = '';
end
tmp0 = {'spm_transverse(''set'',xSPM,hReg)',...
'spm_sections(xSPM,hReg);',...
['spm_sections(xSPM,hReg,char(cat_get_defaults(''extopts.shootingT1'')));',...
'cat_spm_results_ui(''spm_list_cleanup'');',...
],...
str4,...
{@myslover},...
['spm_render( struct( ''XYZ'', xSPM.XYZ,',...
'''t'', xSPM.Z'',',...
Expand Down Expand Up @@ -2074,7 +2078,7 @@ function spm_list_cleanup(hReg)
h = get(findobj(fg,'type','patch','tag','CATSurfRender'),'parent');
if ~isfield(job,'view'), job.view = 'left'; end
viewname = '';
if ~isempty(h) && isfield(job,'view')
if ~isempty(h) && isfield(job,'view') && exist('cat_surf_render','file')
switch lower(job.view)
case {'r','right'}, cat_surf_render('view',h,[ 90 0]); viewname = 'r.';
case {'l','left'}, cat_surf_render('view',h,[ -90 0]); viewname = 'l.';
Expand Down
2 changes: 1 addition & 1 deletion doc/cat.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<div id="content">
<br />
<p align="center" style="text-align:center;">This is <b>CAT12.9 (r2582) from 2024-05-21</b><br />You can update your copy of CAT12 here: <a href="matlab:cat_update(1);">Check for update</a>.<br />If you find any bug, please report them at <a href="mailto:[email protected]">[email protected]</a>.</p>
<p align="center" style="text-align:center;">This is <b>CAT12.9 (r2583) from 2024-05-25</b><br />You can update your copy of CAT12 here: <a href="matlab:cat_update(1);">Check for update</a>.<br />If you find any bug, please report them at <a href="mailto:[email protected]">[email protected]</a>.</p>
<h1 style="text-align:center;"><img src="images/CAT.png" width=40% height=auto alt="CAT" ></h1>

<hr />
Expand Down

0 comments on commit 7ad28a5

Please sign in to comment.