Regarding the contains()
issue: I’m afraid my hack was too hacky and could not be used as a proper replacement for the original function, as it e.g. does not support patterns consisting of several strings, which the original function does support. Also, contains()
can be used in both case-sensitive and insensitive modes, while strfind
cannot. However, looking in the Lead-DBS code, multiple-string patterns seem not to be used, and possibly neither case-insensitive search.
So, I suppose there are three possible solutions:
i) put the hacked version of contains()
in the code *only* for Matlab <R12016b (I can’t see a way how to do this when there is no installation process and users can get the code directly from github),
ii) put the hacked version of contains()
in the code regardless of Matlab version (this would IMHO produce tons of warnings, I would not go this way),
iii) put a differently named function (e.g. mycontains()
in the code and update all the calls to contains()
to mycontains()
– this would affect quite many people and much code, but would be quite clean IMHO.
What’s your opinion?
Regarding the normalization issue: ignoring the keyboard
did not help, the process failed with
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Running 'Run Shoot (existing Templates)'
Failed 'Run Shoot (existing Templates)'
Error using read_hdr (line 32)
Error reading header file "/home/sieger/src/matlab/leaddbs-2.2.3/templates/space/MNI_ICBM_2009b_NLIN_ASYM/dartel/shootmni_1.nii".
In file "/home/sieger/src/matlab/spm12/@nifti/private/read_hdr.m" (v4967), function "read_hdr" at line 32.
In file "/home/sieger/src/matlab/spm12/@nifti/nifti.m" (v4986), function "nifti" at line 26.
In file "/mnt/hdd/home/sieger/src/matlab/spm12/toolbox/Shoot/spm_shoot_warp.m" (v6024), function "load_template" at line 195.
In file "/mnt/hdd/home/sieger/src/matlab/spm12/toolbox/Shoot/spm_shoot_warp.m" (v6024), function "spm_shoot_warp" at line 104.
The following modules did not run:
Failed: Run Shoot (existing Templates)
Error using MATLABbatch system
Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the exact #job as displayed in this error message)
------------------
Running job #1
------------------
The problem was that the .../MNI_ICBM_2009b_NLIN_ASYM/dartel/shootmni_1.nii
is missing.
There are only these files in the directory:
dartelmni_6.mat
dartelmni_6.nii
dartelmni_6_hires_00001.nii
dartelmni_6_hires_00002.nii
dartelmni_6_hires_00003.nii
dartelmni_6_hires_00004.nii
dartelmni_6_hires_00005.nii
dartelmni_6_hires_00006.nii
s0dartelmni_6_hires_00001.nii
s0dartelmni_6_hires_00002.nii
s0dartelmni_6_hires_00003.nii