-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Longitudinal segmentation batch script error (CAT12 MCR version) #6
Comments
Dear Jordi, This problem is a bit tricky to solve. I need to replace the precompiled cat_long_main.m file with cat_long_main.txt to allow it to be changed on the fly if you use some non-default flags with cat_standalone.sh. I have prepared a new version of standalone/cat_long_multi_run.m that saves this file in the current folder, but I am not sure if this will work in all cases. Please save the following code as standalone/cat_long_multi_run.m: function out = cat_long_multi_run(job) warning off; if isdeployed, job.nproc = 0; end if isfield(job.extopts,'vox') && job.extopts.vox ~= 1.5 % use some options from GUI or default file setappdata(0,'job',job); if isfield(job,'delete_temp') % modify job.subj w.r.t. different selection options if isfield(job.datalong,'subjects')
else
end % remove datalong field to prevent that modification of job.subjs is called again is_copied = zeros(numel(job.data),1); % create BIDS structure and unzip or copy file to BIDS-folder
end % also uncompress gz-files for non-BIDS structure end job_name = fullfile(fileparts(mfilename('fullpath')),'cat_long_main.txt'); % we have to copy the original txt-file to a matlab file because for deployed versions m_fileid = fopen(m_job_name,'r'); % check whether length of txt- and m-file differs or content differs and only then the txt-file will be copied end if ~exist(m_job_name,'file') % mirror jobs for all subjects inputs = cell(1, numel(job.subj)); out.surf = cell(''); out.thick = cell(''); out.mwp1 = cell(''); for i=1:numel(job.subj) out.sess(i).warps = cell(1,1); out.sess(i).files = cell(numel(job.subj(i).mov),1);
end % save XML Parameter end % split job and data into separate processes to save computation time for i=1:numel(job.data) warning on; |
If that works I can include that in a new standalone version... |
Hi @ChristianGaser, I copied the code you posted as a new
It's not urgent, I have added a workaround for it. I manually copied Jordi |
Dear Christian,
Running the longitudinal segmentation script for the standalone/MCR version of CAT12 (error reproducible in the 3 latest releases) results in the following error,
Apparently CAT attempts to replace a precompiled file (
cat_long_main.m
) with a raw Matlab script (cat_long_main.txt
). Is it then safe to permanently replace one for the other or that would break something else? What would you recommend me to do in that case?Thanks,
Jordi
The text was updated successfully, but these errors were encountered: