suffix_filename error when a filename is too short

Viewing 3 reply threads
  • Author
    Posts
    • #744
      robreid
      Participant

      Hi,

      There’s a bug in bdp/BDP16a_src/helper_tools/suffix_filename.m where matlab throws an error if the input filename is shorter than 12(?) characters:

      ######################
      Subscript indices must either be real positive integers or logicals.
      Error in suffix_filename (line 7)

      Error in bdp_setup (line 884)

      Error in BrainSuite_Diffusion_pipeline (line 13)

      MATLAB:badsubscript
      #########################

      suffix_filename.m starts with a set of strcmps like
      if strcmp(fname(end-12:end), ‘.label.nii.gz’)
      ^ Matlab throws an error if end < 12

      Could you alter suffix_filename.m to not do those strcmps if fname is too short to match the suffix?

      I hit this by working on a batch of subjects where I had put everybody in their own directory, and was using standard filenames like t1tiv.nii. Renaming t1tiv.nii to xx_t1tiv.nii worked.

      Thanks,

      Rob

    • #783
      divarada
      Participant

      Hi Rob,

      Did you get this error while running BDP or has BDP code been modified for some other purpose ?

    • #785
      robreid
      Participant

      I was running bdp through bdp.sh.

    • #837
      divarada
      Participant

      Thanks – We will update this in the next build.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.