Hi @Francois
When using CAT12 for segmentation, I noticed a warning message. I wonder if this is a bug?
By default (in windows), the brainstorm uses the TPM files under the path of *.brainstorm\defaults* but the strcmp used in CAT12 is under SPM toolbox which is: *\brainstorm\plugins\spm12\spm12\tmp* this makes the mismatch triggers the warning message (code below).
isSPMtpm = strcmp(job.extopts.species,'human') && ...
( strcmp(job.opts.tpm , fullfile(spm('dir'),'tpm','TPM.nii') ) || ...
strcmp(job.opts.tpm , fullfile(spm('dir'),'tpm','TPM.nii,1') ) );
[ppt,fft] = spm_fileparts(job.opts.tpm{1});
isLONGtpm = strcmp(fft(1:min(numel(fft),7)),'longTPM');
if exist('Ybg','var') && job.extopts.setCOM ~= 120 % setCOM == 120 - useCOM,useMaffreg,noMask
if (length(ff)>4 && strcmp(ff(1:5),'navg_')) || ...
(isfield(job,'useprior') && ~isempty(job.useprior)) || ...
(isfield(job.extopts,'new_release') && job.extopts.new_release)
cat_io_cprintf('g8',' Use new longitudinal background setting. ');
% new minimal masking approach in longitudinal processing to avoid backgound peak erros and for future releases
Ymsk = cat_vol_morph( ~Ybg ,'dd',10,vx_vol) & ... % remove voxels far from head
~( Ybg & rand(size(Ybg))>0.5) & ... % have a noisy corona
~( cat_vol_grad( Ysrc , vx_vol)==0 & Ysrc==0 ); % remove voxel that are 0 and have no gradient
else
% RD20220103: old cross-sectional setting with small correction for own TPMs
if isSPMtpm || isLONGtpm
Ymsk = ~Ybg; % old default - mask background
else
cat_io_addwarning([mfilename ':noSPMTPM-noBGmasking'],...
This file has been truncated. show original
Thank you for your time
Best regards
Ken
Hi Ken,
Thank you for the detailed information.
Now, Brainstorm prefers the SPM TPM.nii
file if it is available: 3a38bdb
1 Like