3dQwarp ** FATAL ERROR: Can't compute autoweight: max value seen as 0

Hi AFNI experts,
I have a problem with 3dQwarp command in trying to allineate on of the slice of my functional with my anatomical images. I am working with primate and I am using a pipeline called sammba MRI that use afni.
The weird thing is that 3dQwarp command has works very well for all the slices of my primate and all the other primates. I don’t really understand the error message.
Thank you very much for your help and Merry Christmas !


RuntimeError: Command:
3dQwarp -allineate -allineate_opts '-parfix 1 0 -parfix 2 0 -parfix 3 0 -parfix 4 0 -parfix 5 0 -parfix 6 0 -parfix 7 0 -parfix 9 0 -parfix 10 0 -parfix 12 0' -base /Documents/3_Nifti/lastV/nipype_mem/nipype-interfaces-afni-preprocess-Qwarp/ccaacfa1c8e86187e4d4dccbf5d244e8/anatT1_unifized_shr_warped_oblique_slice_0020_resampled.nii.gz -blur 0.0 2.0 -source /Documents/3_Nifti/lastV/nipype_mem/nipype-interfaces-afni-preprocess-Qwarp/ccaacfa1c8e86187e4d4dccbf5d244e8/BOLD_restingstate_tshift_volreg_oblique_tstat_n4_slice_0020_resampled.nii.gz -nmi -noXdis -noneg -prefix /Documents/3_Nifti/lastV/per_slice/BOLD_restingstate_tshift_volreg_oblique_tstat_n4_slice_0020_resampled_qwarped.nii.gz -verb
Standard output:

Standard error:
++ OpenMP thread count = 15
++ 3dQwarp: AFNI version=AFNI_19.3.16 (Dec 12 2019) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
++ ###############################################################
 + Starting 3dAllineate (affine register) command:

  3dAllineate -base /Documents/3_Nifti/lastV/nipype_mem/nipype-interfaces-afni-preprocess-Qwarp/ccaacfa1c8e86187e4d4dccbf5d244e8/anatT1_unifized_shr_warped_oblique_slice_0020_resampled.nii.gz -source /Documents/3_Nifti/lastV/nipype_mem/nipype-interfaces-afni-preprocess-Qwarp/ccaacfa1c8e86187e4d4dccbf5d244e8/BOLD_restingstate_tshift_volreg_oblique_tstat_n4_slice_0020_resampled.nii.gz -prefix AFN_mK9KLDRv4rCVpGViQbjxHA.nii -1Dmatrix_save AFN_mK9KLDRv4rCVpGViQbjxHA -cmass -final wsinc5 -float -master BASE -twobest 7 -verb -parfix 1 0 -parfix 2 0 -parfix 3 0 -parfix 4 0 -parfix 5 0 -parfix 6 0 -parfix 7 0 -parfix 9 0 -parfix 10 0 -parfix 12 0 -zclip -fineblur 4.44
 + ###############################################################
++ 3dAllineate: AFNI version=AFNI_19.3.16 (Dec 12 2019) [64-bit]
++ Authored by: Zhark the Registrator
++ Source dataset: /Documents/3_Nifti/lastV/nipype_mem/nipype-interfaces-afni-preprocess-Qwarp/ccaacfa1c8e86187e4d4dccbf5d244e8/BOLD_restingstate_tshift_volreg_oblique_tstat_n4_slice_0020_resampled.nii.gz
++ Base dataset:   /Documents/3_Nifti/lastV/nipype_mem/nipype-interfaces-afni-preprocess-Qwarp/ccaacfa1c8e86187e4d4dccbf5d244e8/anatT1_unifized_shr_warped_oblique_slice_0020_resampled.nii.gz
++ Loading datasets
++ 708 voxels in source_automask+0
++ Zero-pad: not needed (plenty of internal padding)
 + 2D image registration: orientation is axial
++ Computing -autobox
 + Weightize: xfade=6 yfade=6 zfade=0
 + Weightize: (unblurred) top clip=0
 + Weightize: (blurred) bot clip=0
** FATAL ERROR: Can't compute autoweight: max value seen as 0
** Program compile date = Dec 12 2019
** FATAL ERROR: 3dQwarp: 3dAllineate command failed :-(
** Program compile date = Dec 12 2019


Clément

Hi Clement,

What does “3dinfo -extent” and “3dBrickStat” show about those datasets?

cd /Documents/3_Nifti/lastV/nipype_mem/nipype-interfaces-afni-preprocess-Qwarp/ccaacfa1c8e86187e4d4dccbf5d244e8

3info -extent -prefix BOLD_resting*.nii.gz anatT1_unif*.nii.gz
3dBrickstat -slow -min -max BOLD_resting*.nii.gz
3dBrickstat -slow -min -max anatT1_unif*.nii.gz
  • rick

Hi rick,
Thank you so much for your answer.
here is the results of the commands:
3dinfo -extent -prefix BOLD_resting*.nii.gz anatT1_unif*

-65.423553 60.576447 -37.874031 88.125969 75.824852 75.824852 BOLD_restingstate
-65.423553 60.576447 -37.874020 88.125977 75.824852 75.824852 anatT1_unifized

3dBrickStat -slow -min -max BOLD_resting*.nii.gz
0 143.973

3dBrickStat -slow -min -max anatT1_unif*.nii.gz
0 1500

Again, thank you for your help !

Also, i try to copy the header of the anat on the func (due to the minor differences) to see if it change anything but it doesn’t…
Thank you again!

To be sure, do both of those datasets visually look like brains (via the afni GUI)?

When viewing them, are they basically on top of each other?

  • rick

Hi rick,
yes, it concern only one slice of the EPI image and one slice of the anatomical image that seems well align but with some difference due to the EPI sequence.
I can send these images to you if you want?
I just repeated the error this week on other animals and it seems to appear always in the last axial slice of the brain on which their is probably not enough similar voxels. However, I do not understand why it has works for the other animals and how to fix this.
Thank you and Happy New Year!!!

Clement

Hi Clement,

Sure, you can upload the data and I will take a look. I sent you a PM with instructions.

  • rick