Matlab: badsubscript multiple errors

Viewing 1 reply thread
  • Author
    Posts
    • #3534
      Whiiz
      Participant

      Hello all,
      i have a similar issue than other people but the fixes that work for them don’t work for me.
      After entering the command:

      “C:\Program Files\BrainSuite21a\bdp\bdp.exe” “C:\Users\nicad\Desktop\PHD\MRT_2022_04_12\Series-8\Nifti\DCM_2_NIfTI.bfc.nii.gz” –tensor –FRACT –nii “C:\Users\nicad\Desktop\PHD\MRT_2022_04_12\Series-8\Nifti\DWI.nii” -g “C:\Users\nicad\Desktop\PHD\MRT_2022_04_12\Series-8\Nifti\DWI.bvec” -b “C:\Users\nicad\Desktop\PHD\MRT_2022_04_12\Series-8\Nifti\DWI.bval” –generate-stats

      I recieve the following prompt multiple times:

      Warning: check this case.
      > In register_volumes_affine>my_normalized_mutual_information (line 611)
      In register_volumes_affine>error_affine_reg (line 501)
      In register_volumes_affine>error_grad_affine_reg (line 470)
      In register_volumes_affine>error_grad_affine_reg (line 483)
      In register_volumes_affine>@(x)error_grad_affine_reg(x,scale,Imoving_small,Istatic_small,mask_moving_small,mask_static_small,reg_options) (line 409)
      In gradient_descent_backtrack (line 63)
      In register_volumes_affine (line 408)
      In register_files_affine (line 451)
      In EPI_correct_files_registration_INVERSION (line 109)
      In coregister_diffusion_mprage_pipeline (line 219)
      In BrainSuite_Diffusion_pipeline (line 26)
      Warning: The KEYBOARD function cannot be used in compiled applications.
      > In keyboard (line 4)
      In register_volumes_affine>my_normalized_mutual_information (line 612)
      In register_volumes_affine>error_affine_reg (line 501)
      In register_volumes_affine>error_grad_affine_reg (line 470)
      In register_volumes_affine>error_grad_affine_reg (line 483)
      In register_volumes_affine>@(x)error_grad_affine_reg(x,scale,Imoving_small,Istatic_small,mask_moving_small,mask_static_small,reg_options) (line 409)
      In gradient_descent_backtrack (line 63)
      In register_volumes_affine (line 408)
      In register_files_affine (line 451)
      In EPI_correct_files_registration_INVERSION (line 109)
      In coregister_diffusion_mprage_pipeline (line 219)
      In BrainSuite_Diffusion_pipeline (line 26)

      Saving output files…

      Rigid registration done.

      Setting up data for non-rigid registration based distortion correction…
      Correcting intensity non-uniformity in b=0 image…Index exceeds the number of array elements (0).

      Error in find_bounding_box (line 16)

      Error in EPI_correct_files_registration_INVERSION>trim_msk_PED (line 513)

      Error in EPI_correct_files_registration_INVERSION (line 271)

      Error in coregister_diffusion_mprage_pipeline (line 219)

      Error in BrainSuite_Diffusion_pipeline (line 26)

      MATLAB:badsubscript

      I tried including the dwi-mask and t1-mask to no avail. For other data the BDP works just fine.

      All help welcome,
      kind regards,

      Adrien

    • #5023
      astrologerdevanand
      Participant

      I understand you’re encountering MATLAB errors while using BrainSuite. These “bad subscript” errors often indicate issues with array indexing or data dimensions. To help troubleshoot, could you please provide more details about the specific BrainSuite functions you’re using? It would be helpful if you could share the exact error messages you’re seeing. Additionally, knowing which versions of MATLAB and BrainSuite you’re using could provide valuable context. Are you working with any particular dataset that might be causing these issues? It might also be beneficial to check if your MATLAB path is set up correctly for BrainSuite. Sometimes, these errors can occur if MATLAB can’t find the necessary functions or if there are conflicts with other toolboxes. If possible, try running a simple BrainSuite function to see if the error persists. This could help isolate whether the issue is with your specific workflow or a more general problem with the BrainSuite installation. Providing this additional information will help the community better assist you in resolving these errors.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.