Skip to content
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

cat_main_report error #24

Closed
ThomasStephan1000 opened this issue May 7, 2024 · 1 comment
Closed

cat_main_report error #24

ThomasStephan1000 opened this issue May 7, 2024 · 1 comment

Comments

@ThomasStephan1000
Copy link

I use CAT12.9 to preprocess a dataset from Linux command line (matlab -batch). Processing does not generate the .pdf reports when used without GUI. I tried to re-generate these reports using cat_main_report, but run into an error:

>> job.files{1} = 'cat_sub-3556_ses-V06_I372345.xml'

job = 

  struct with fields:

    files: {'cat_sub-3556_ses-V06_I372345.xml'}

>> cat_main_report(job )
Index exceeds the number of array elements (0).

Error in cat_main_report (line 91)
    if isfield( job, 'Pp0' ) && iscell(job.Pp0) && ~isempty( job.Pp0{1} ) && ~isempty( job.Pp0{1} ) && exist( job.Pp0{fi} , 'file' )

Is this the right way to get the report, or am I doing something wrong?

Thank you for your support!

@ThomasStephan1000
Copy link
Author

I guess that I found the problem.
In cat_main_report.m, change line 91:

%     if isfield( job, 'Pp0' ) && iscell(job.Pp0) && ~isempty( job.Pp0{1} ) && ~isempty( job.Pp0{1} ) && exist( job.Pp0{fi} , 'file' )
    if isfield( job, 'Pp0' ) && iscell(job.Pp0) && ~isempty( job.Pp0 ) && ~isempty( job.Pp0{1} ) && exist( job.Pp0{fi} , 'file' )

Expression 3 and 4 are identical, and they should not be. First test that Pp0 is not empty, and afterwards test for Pp0{1} to be present.

Best, Thomas

robdahn added a commit that referenced this issue May 10, 2024
          cat_conf_extopts, cat_run, cat_run_job[1639], and cat_main1639.
          Improved documentation and help and make batch visible for default
          users.
Changed:  Allowed to have empty template files to keep the SPM registration
          and have no specific probability maps for WMHs and lesions in
          cat_main[1639], cat_main_registration, and cat_run.
Fixed:    Corrected bug in testing for BIDS in cat_io_writenii.
Fixed:    Corrected bug in cat_main_report use in the retrospective CAT
          report pointed out by Thomas Stephan (issue #24).
Fixed:    Corrected bug in cat_long_report > cat_stat_homogeneity in case
          of BIDS setting with subdirs.
Changed paths:
 M CHANGES.txt
 M cat_conf_extopts.m
 M cat_io_writenii.m
 M cat_main.m
 M cat_main1639.m
 M cat_main_registration.m
 M cat_main_report.m
 M cat_main_reportstr.m
 M cat_run.m
 M cat_run_job.m
 M cat_run_job1639.m
 M cat_stat_homogeneity.m
 M tbx_cfg_cat.m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants