Error in find_bounding_box

Viewing 10 reply threads
  • Author
    Posts
    • #1152
      jtanedo
      Participant

      Hello,

      Would I be able to get some guidance on which files to check for addressing the error below?

      Thank you!

      Best,

      Rigid registration done.

      Setting up data for non-rigid registration based distortion correction…
      Correcting intensity non-uniformity in b=0 image…Index exceeds matrix dimensions.
      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)

    • #1153
      divarada
      Participant

      This issue generally happens when the masking code fails in BDP – since this is a heuristic approach it is possible that it fails for certain cases. Can you try specifying the brain mask file diffusion data ? Use –dwi-mask flag for specifying the mask file.

    • #1154
      divarada
      Participant

      typo : –dwi-mask (there are two hyphens)

    • #1155
      jtanedo
      Participant

      Thank you divarada.

      I actually do specify the dwi-mask. In fact, here is my call

      bdp.sh t1.bfc.nii.gz –nii dwi.nii.gz -g encoding.bvec -b encoding.bval –t1-mask t1_mask.bfc.nii.gz –dwi-mask dwi_mask.nii.gz

    • #1156
      divarada
      Participant

      Can you try without giving the dwi-mask and/or t1-mask then ?

      Generally we have seen this when the mask is creating some issues. I am not sure if its the same reason in your case, so we will have to try a few things.

    • #1157
      jtanedo
      Participant

      I’ve just tried removing both the masks and I am encountering the same issue.

    • #1166
      divarada
      Participant

      Can you share the dwi mask file (dropbox ?)? This is most likely a corner case related to the masking file specified and debugging this issue is specific to the particular images that you are using.

    • #3464
      Anonymous
      Inactive

      After this I still with the same error (doing with files from the tutorial steps [2523412.nii.gz]).

      (Windows Here) I put:

      C:\Users\LNI_Users\Documents\Italo_Cesar\BrainSuite\Tutorial\BrainSuiteTutorialCSE>bdp.exe 2523412.bfc.nii.gz –tensor –FRT –FRACT –nii 2523412.dwi.nii.gz -g 2523412.dwi.bvec -b 2523412.dwi.bval –dwi-mask 2523412.dwi.RAS.mask.nii.gz (This mask that has ‘.dwi’ and ‘.mask’)

      Returned me:

      “Reading input flags…

      Checking input files…

      BDP could not find any .mask.nii.gz file. BDP will use input bfc file itself as
      brain mask for registration and statistics. All voxels with intensity>0 in bfc
      will be treated as voxels in brain. You can specify a custom brain mask by using
      flag –t1-mask <maskfile_name>. The custom mask must overlay correctly with
      input BFC image in BrainSuite.

      Processing data with fileprefix:
      2523412”

      Am I put the wrong mask setup? Here is the two ‘.mask.nii.gz’: ‘2523412.dwi.RAS.less_csf.mask.nii.gz’ and ‘2523412.dwi.RAS.mask.nii.gz’.

      What should I do?

    • #3465
      Anonymous
      Inactive

      Before this final message, the prompt showed me some warnings, but was ignored aparently.

      
      Starting rigid registration of input images...
      Reading input data...
      Setting/generating masks...
      Matching centroids (approx. align)...
      Matching resolution of the images...
      Normalizing intensity of images...
      Performing affine registration with 6 degrees of freedom...
      Search-based initialization...
      Scale 1 of 6 running...
      Scale 2 of 6 running...
      Scale 3 of 6 running...
      Scale 4 of 6 running...
      Scale 5 of 6 running...
      Scale 6 of 6 running...
      
      Refine: Scale 1 of 2 running...
      Refine: Scale 2 of 2 running...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>@(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 45)
        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>@(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 45)
        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: check this case.
      

      *This repeated a lot of time over the prompt before saying: “Rigid registration done”*

    • #3466
      Anonymous
      Inactive

      Problem solved: Inlude the dwi mask and t1 mask like this >> –dwi-mask <filename.dwi.RAS.mask.nii.gz> –t1-mask <filename.cerebrum.mask.nii.gz>

    • #3581
      yemishade
      Participant

      I have similar error as follows and I have tried correcting it but to no avail.

      Any help would be appreciated. Thanks

      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 41)

      Error in EPI_correct_files_registration_INVERSION>trim_msk_PED (line 538)

      Error in EPI_correct_files_registration_INVERSION (line 296)

      Error in coregister_diffusion_mprage_pipeline (line 244)

      Error in BrainSuite_Diffusion_pipeline (line 51)

      MATLAB:badsubscript

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