diff --git a/CAT.glnx86/CAT_Surf2Vol b/CAT.glnx86/CAT_Surf2Vol deleted file mode 100755 index 4958a252..00000000 --- a/CAT.glnx86/CAT_Surf2Vol +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e0966258acd07339a315e3e87df9d8c4b6e6c47bbd0fae0d3be270d979070d7 -size 2184264 diff --git a/CAT.maca64/CAT_Surf2Vol b/CAT.maca64/CAT_Surf2Vol deleted file mode 100755 index 7c500765..00000000 --- a/CAT.maca64/CAT_Surf2Vol +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:700c6d0040593545c68213eb20aeb5a04c936c9a25ed5e8c71e6008d91f96694 -size 2074521 diff --git a/CAT.maci64/CAT_Surf2Vol b/CAT.maci64/CAT_Surf2Vol deleted file mode 100755 index 76ae7f85..00000000 --- a/CAT.maci64/CAT_Surf2Vol +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e4c36c1bc22f7219edee789ef136c6ad2f80b1fb44b8d36038eb29f8ab534fe -size 1935672 diff --git a/CAT.w32/CAT_Surf2Vol.exe b/CAT.w32/CAT_Surf2Vol.exe deleted file mode 100755 index 47581462..00000000 --- a/CAT.w32/CAT_Surf2Vol.exe +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b86e96769a154564aaa1383d73f91281718b22ca03e2fb26412ac5532b4b21f1 -size 1805473 diff --git a/CHANGES.txt b/CHANGES.txt index 3390c5b1..651e5a20 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,27 @@ ------------------------------------------------------------------------ +r2517 | gaser | 2024-01-09 16:15:15 + +Changed paths: + D CAT.glnx86/CAT_Surf2Vol + D CAT.maca64/CAT_Surf2Vol + D CAT.maci64/CAT_Surf2Vol + D CAT.w32/CAT_Surf2Vol.exe + M CHANGES.txt + M Contents.m + D cat_amap_new.mexmaci64 + M cat_io_xml.m + M cat_main_gintnorm.m + M cat_run_job1639.m + M cat_vol_approx.m + M cat_vol_inpaint.m + M cat_vol_pbtsimple.m + M cat_vol_set_com.m + M doc/cat.html + +(1) Changed: Added warning that xml-file could not be written in cat_io_xml.m. +(2) Changed: Set default approx-function to 'nn' in cat_vol_approx. +(3) Changed: Added additional check. for xml-mat file in cat_run_job1639.m. +------------------------------------------------------------------------ r2510 | gaser | 2023-12-22 12:35:54 Changed paths: diff --git a/Contents.m b/Contents.m index e571f5aa..865103cb 100644 --- a/Contents.m +++ b/Contents.m @@ -1,5 +1,5 @@ % Computational Anatomy Toolbox -% Version 2509 (CAT12.9) 2023-12-13 +% Version 2516 (CAT12.9) 2024-01-08 % ______________________________________________________________________ % % Christian Gaser, Robert Dahnke diff --git a/cat_amap_new.mexmaci64 b/cat_amap_new.mexmaci64 deleted file mode 100755 index e96f297d..00000000 Binary files a/cat_amap_new.mexmaci64 and /dev/null differ diff --git a/cat_io_xml.m b/cat_io_xml.m index 44838d9d..d577c29b 100644 --- a/cat_io_xml.m +++ b/cat_io_xml.m @@ -164,6 +164,9 @@ warning off all savexml(file,'S'); end + if ~exist(file,'file') + fprint('MATLAB:cat_io_xml:writeErr','Can''t write XML-file ''%s''!\n',file); + end catch %#ok<*NASGU> % can write xml file?? % This can be a warning as far as we have the mat. warning('MATLAB:cat_io_xml:writeErr','Can''t write XML-file ''%s''!\n',file); diff --git a/cat_main_gintnorm.m b/cat_main_gintnorm.m index 25d4886e..1fccad19 100644 --- a/cat_main_gintnorm.m +++ b/cat_main_gintnorm.m @@ -682,9 +682,9 @@ Yi(isnan(Yi) | isinf(Yi))=0; if ~debug, clear Yim Ycm Ygm Ywm; end if isfield(res,'ppe') && isfield(res.ppe,'affreg') && isfield(res.ppe.affreg,'highBG') && res.ppe.affreg.highBG - Yiw = cat_vol_approx(Yi,4 * (res.ppe.affreg.highBG * 3 + 1)); + Yiw = cat_vol_approx(Yi,'nn',4 * (res.ppe.affreg.highBG * 3 + 1)); else - Yiw = cat_vol_approx(Yi,4); + Yiw = cat_vol_approx(Yi,'nn',4); end %% correction % ds('d2sm','a',1,Ysrc/clsint(3),Ysrc ./ Yi / clsint(3),140) diff --git a/cat_run_job1639.m b/cat_run_job1639.m index 1b82443c..74a589b8 100644 --- a/cat_run_job1639.m +++ b/cat_run_job1639.m @@ -623,9 +623,10 @@ function cat_run_job1639(job,tpm,subj) priorname = job.useprior{1}; [pp,ff,ee,ex] = spm_fileparts(priorname); %#ok catxml = fullfile(pp,reportfolder,['cat_' ff '.xml']); + catmat = fullfile(pp,reportfolder,['cat_' ff '.mat']); % check that file exists and get affine transformation - if exist(catxml,'file') + if exist(catxml,'file') || exist(catmat,'file') if strcmp(job.opts.affreg,'prior') fprintf('\nUse affine transformation from:\n%s\n',priorname); else diff --git a/cat_vol_approx.m b/cat_vol_approx.m index c9694f7c..a0a84f81 100644 --- a/cat_vol_approx.m +++ b/cat_vol_approx.m @@ -1,4 +1,4 @@ -function [Ya,times] = cat_vol_approx(Y,method, varargin) +function [Ya,times] = cat_vol_approx(Y,method,varargin) % Approximation of missing values % ______________________________________________________________________ % Approximation of missing values (nan's / zeros) by different methods. @@ -75,7 +75,7 @@ % $Id$ if nargin==0, help cat_vol_approx; return; end - if ~exist('method','var'); method = 'nn'; end + if ~exist('method','var'); method = 'oldnn'; end stime = clock; %#ok if ~cat_io_contains(method,'test') && 1 @@ -90,7 +90,7 @@ % ################### methodold = method; if 1 - method = 'nn'; + method = 'oldnn'; else method = 'rec'; if nargin<3; vx_vol = ones(1,3); else, vx_vol = varargin{1}; end @@ -110,10 +110,8 @@ Ya = rec_approx(Y, s); case {'nn','nh','linear'} % link old calls to the newer version - fprintf('\n cat_vol_approx: Use new recusive approach instead of (old) "%s"!\n',method) % updated classic approach - %Ya = cat_vol_approx_classic(Y,varargin{:}); - Ya = rec_approx(Y, 1); + Ya = cat_vol_approx_classic(Y,varargin{:}); case 'oldnn' % classic approach @@ -522,7 +520,3 @@ TA = TA + cf; end end - - - - diff --git a/cat_vol_inpaint.m b/cat_vol_inpaint.m index 967e8137..042bcc05 100644 --- a/cat_vol_inpaint.m +++ b/cat_vol_inpaint.m @@ -10,7 +10,7 @@ % out = cat_vol_inpaint(vol,niter,smooth,reduce,init,verb) % % vol .. input image -% niter .. number of iteratiosn for inpainting +% niter .. number of iterations for inpainting % smooth .. size for Gaussian smoothing % reduce .. increase speed by using a reduced image for inpainting % init .. use either euclidean distance (init=1) or Laplace method diff --git a/cat_vol_pbtsimple.m b/cat_vol_pbtsimple.m index b96cc16a..815cb2a6 100644 --- a/cat_vol_pbtsimple.m +++ b/cat_vol_pbtsimple.m @@ -118,7 +118,7 @@ % (3) Approximation of non GM voxels for resampling: % -------------------------------------------------------------------- - Ygmt = cat_vol_approx(Ygmt,'rec-test'); + Ygmt = cat_vol_approx(Ygmt,'nh'); diff --git a/cat_vol_set_com.m b/cat_vol_set_com.m index 138e3b17..d7fb60f9 100644 --- a/cat_vol_set_com.m +++ b/cat_vol_set_com.m @@ -36,7 +36,7 @@ % pre-estimated COM of MNI template com_reference = [0 -20 -15]; -fprintf('Correct center-of-mass '); +fprintf('Correct center-of-mass \n'); for i=1:n Affine = eye(4); if isfield(V(i),'dat') @@ -45,17 +45,9 @@ vol = spm_read_vols(V(i)); end - % RD202307: use median rather than mean to be more robust - % use also larger-equal to support binary/mask images - if 0 - % original - avg = mean(vol(:)); - avg = mean(vol(vol>=avg)); % = to support binary/mask data - else - % median should be more robust - avg = cat_stat_nanmedian(vol(:)); - avg = cat_stat_nanmedian(vol(vol(:)>=avg)); % = to support binary/mask data - end + % median should be more robust + avg = cat_stat_nanmedian(vol(:)); + avg = cat_stat_nanmedian(vol(vol(:)>=avg)); % = to support binary/mask data % don't use background values [x,y,z] = ind2sub(size(vol),find(vol>avg)); diff --git a/doc/cat.html b/doc/cat.html index fa81d4ef..589d6271 100644 --- a/doc/cat.html +++ b/doc/cat.html @@ -9,7 +9,7 @@

-

This is CAT12.9 (r2509) from 2023-12-13
You can update your copy of CAT12 here: Check for update.
If you find any bug, please report them at vbmweb@gmail.com.

+

This is CAT12.9 (r2516) from 2024-01-08
You can update your copy of CAT12 here: Check for update.
If you find any bug, please report them at vbmweb@gmail.com.

CAT