Closed gdevenyi closed 2 years ago
The path to CAT12 is hard-coded to be inside the toolbox directory of the SPM12 installation: https://github.com/ChristianGaser/cat12/blob/main/spm_cat12.m#L43
But SPM12 allows modification of toolbox directory path via spm_get_defaults('tbx') it will iterate over all directories defined in the variable and load toolboxes there: https://github.com/neurodebian/spm12/blob/master/spm.m#L943-L977
spm_get_defaults('tbx')
I use this to install SPM toolboxes into lmod modules to provide proper versioning (see #2 for an improvement request there)
fullfile(fileparts(mfilename('fullpath'))) might be a better way to locate the installation path when CAT12 loads.
fullfile(fileparts(mfilename('fullpath')))
Thanks for the advice. I have changed all hardcoded paths.
The path to CAT12 is hard-coded to be inside the toolbox directory of the SPM12 installation: https://github.com/ChristianGaser/cat12/blob/main/spm_cat12.m#L43
But SPM12 allows modification of toolbox directory path via
spm_get_defaults('tbx')
it will iterate over all directories defined in the variable and load toolboxes there: https://github.com/neurodebian/spm12/blob/master/spm.m#L943-L977I use this to install SPM toolboxes into lmod modules to provide proper versioning (see #2 for an improvement request there)
fullfile(fileparts(mfilename('fullpath')))
might be a better way to locate the installation path when CAT12 loads.