AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
February 28, 2023 07:16AM
Hello!

I'm attempting to run @animal_warper between a native space T1w image and the D99 atlas. Unfortunately, for some of the macaques this isn't working. The errors seem to be related to 3DQwarp. I have tried running @align_centers first on the images (aligning the native T1w with the D99_template), and also have run FLIRT between the two images because I was reading on other threads that the issue may be due to the images being very far apart. However this has not fixed the issue, despite the images now being on top of each other when viewing through fsleyes. I have also run the command on the cluster with 100GB+ of memory so I doubt its a memory issue. Do you know what might be going wrong here? I have pasted the output from when it starts to have warnings/ errors below. Happy to post it all if you like, and can upload the crash log as well?

Many thanks,
Sam

*+ WARNING: Parameter z-shift =  41.80656 is close to edge of its search range -38.13291 ..  41.86709
 + - Fine net CPU time = 0.0 s
++ Computing output image
++ image warp: parameters = -38.5248 -14.0263 41.8066 -37.0619 -43.3652 20.6220 1.0346 1.0497 0.7239 0.0163 -0.0150 -0.0304
++ Unloading unneeded data
++ Wrote -1Dmatrix_save ./D99_template_al2std_mat.aff12.1D
++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 983.2
++ ###########################################################
++ #   PLEASE check results VISUALLY for alignment quality   #
++ ###########################################################
#++  Applying alignment for dset2 to dset1
#++ Inverting dset1 to dset2 matrix
#Script is running (command trimmed):
  cat_matvec -ONELINE ./D99_template_al2std_mat.aff12.1D -I > ./center_aligned_T1_pshft_al2std_mat.aff12.1D
#++ Applying transformation of dset2 to dset1
#Script is running (command trimmed):
  3dAllineate -base /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz -1Dmatrix_apply ./center_aligned_T1_pshft_al2std_mat.aff12.1D -prefix ./center_aligned_T1_pshft_al2std -input ./__tt_center_aligned_T1_pshft+tlrc -master BASE -mast_dxyz 0.250000 -weight_frac 1.0 -maxrot 6 -maxshf 10 -VERB -warp aff -source_automask+4 -twoblur 1.000000 -blok "RHDD(0.500000)" -twobest 11 -twopass -VERB -maxrot 45 -maxshf 40 -fineblur 0.5 -source_automask+2 -overwrite
++ 3dAllineate: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Registrator
*+ WARNING: Small value 0.25 after -mast_dxyz sad smiley
++ Source dataset: ./__tt_center_aligned_T1_pshft+tlrc.HEAD
++ Base dataset:   /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz
++ Loading datasets into memory
++ base center of mass = 136.500 147.653 125.509 (index)
 + source center of mass = 135.789 207.093 118.041 (index)
 + source-target CM = -0.428 2.186 -1.867 (xyz)
 +        -cmass x y z shifts =   -0.428    2.186   -1.867
 +  shift search range is +/- =   21.989   27.767   19.581
 + Range param#4 [z-angle] = -6.000000 .. 6.000000  center = 0.000000
 + Range param#5 [x-angle] = -6.000000 .. 6.000000  center = 0.000000
 + Range param#6 [y-angle] = -6.000000 .. 6.000000  center = 0.000000
 + Range param#1 [x-shift] = -10.000000 .. 10.000000  center = 0.000000
 + Range param#2 [y-shift] = -10.000000 .. 10.000000  center = 0.000000
 + Range param#3 [z-shift] = -10.000000 .. 10.000000  center = 0.000000
 + Range param#4 [z-angle] = -45.000000 .. 45.000000  center = 0.000000
 + Range param#5 [x-angle] = -45.000000 .. 45.000000  center = 0.000000
 + Range param#6 [y-angle] = -45.000000 .. 45.000000  center = 0.000000
 + Range param#1 [x-shift] = -40.000000 .. 40.000000  center = 0.000000
 + Range param#2 [y-shift] = -40.000000 .. 40.000000  center = 0.000000
 + Range param#3 [z-shift] = -40.000000 .. 40.000000  center = 0.000000
++ Final parameter search ranges:
 +       x-shift =  -40.000 ..   40.000
 +       y-shift =  -40.000 ..   40.000
 +       z-shift =  -40.000 ..   40.000
 +       z-angle =  -45.000 ..   45.000
 +       x-angle =  -45.000 ..   45.000
 +       y-angle =  -45.000 ..   45.000
 +       x-scale =    0.711 ..    1.406
 +       y-scale =    0.711 ..    1.406
 +       z-scale =    0.711 ..    1.406
 +     y/x-shear =   -0.111 ..    0.111
 +     z/x-shear =   -0.111 ..    0.111
 +     z/y-shear =   -0.111 ..    0.111
++ changing output grid spacing to 0.2500 mm
++ OpenMP thread count = 4
++ ========== Applying transformation to 1 sub-bricks ==========
++ ========== sub-brick #0 ========== [total CPU to here=0.0 s]
 + * Enter alignment setup routine
 + - copying base image
 + - copying source image
 + - no weight image
 + - using 11 points from base image [use_all=0]
 + * Exit alignment setup routine
++ using -1Dmatrix_apply
++ Computing output image
++ image warp: parameters = -0.5876 -0.4455 0.9233 165.7096 0.7347 -0.5653 0.4152 -37.7864 0.2232 0.6255 0.9400 -375.1440
++ Unloading unneeded data
++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 5.0
++ ###########################################################
#++ Creating final output: dset2 data aligned to dset1
# copy is not necessary
#++ Saving history
#Script is running (command trimmed):
  3dNotes -h "align_epi_anat.py -overwrite -output_dir intermediate -dset2 \
 intermediate/center_aligned_T1_pshft.nii.gz -dset1 \
 /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz \
 -dset2to1 -suffix _al2std -dset1_strip None -dset2_strip None -cost \
 lpa+ZZ -feature_size 0.5 -giant_move -master_dset2 BASE" \
 ./center_aligned_T1_pshft_al2std+tlrc

#++ Removing all the temporary files
#Script is running (command trimmed):
  \rm -f ./__tt_center_aligned_T1_pshft*
#Script is running (command trimmed):
  \rm -f ./__tt_D99_template*
# Finished alignment successfully

++ 3dAFNItoNIFTI: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3drefit: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset intermediate/center_aligned_T1_shft.nii.gz
 + deoblique
 + loading and re-writing dataset intermediate/center_aligned_T1_shft.nii.gz (/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft.nii.gz in NIFTI storage)
++ 3drefit processed 1 datasets
++ 3dAllineate: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Registrator
++ Source dataset: /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft.nii.gz
++ Base dataset:   /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz
++ Loading datasets into memory
*+ WARNING: center of mass shifts (-cmass) are turned off, but would be TERRIBLY large!
*+ WARNING:   - at least one is more than 50% of search range
 +        -cmass x y z shifts =    9.290   39.922   54.804
 +  shift search range is +/- =   21.989   27.767   19.581
 +                                 42.2%   143.8%   279.9%
++ OpenMP thread count = 4
++ ========== Applying transformation to 1 sub-bricks ==========
++ Output dataset intermediate/center_aligned_T1_shft_aff.nii.gz
++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 2.2
++ ###########################################################
 +  
++ ***********************************************************
*+ WARNING: -cmass was turned off, but might have been needed :(
 +           Please check your results - PLEASE PLEASE PLEASE
++ ***********************************************************
++ Prepare for running @djunct_overlap_check (ver = 0.42)
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./QC/__workdir_olap_pQpViRgP5C9/olapch_0_cp_ulay.nii
++ Just copy olay, bc ulay will get regridded
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./QC/__workdir_olap_pQpViRgP5C9/olapch_1_cp_olay.nii
++ Quietly run: 3drefit -space D99_Macaque olapch_0_cp_ulay.nii


++ olay_alpha has known value: No
++ My command:
   @chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 3 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 4 -do_clean -set_dicom_xyz 0 0 0

++ Using AFNI ver : AFNI_21.2.09
++ chauffeur ver  : 6.29
** ERROR: Xvfb -- not found in path -- program fails

++ DONE (bad exit): check for errors

2dcat: No match.

+* Removing temporary workdir 'QC/__workdir_olap_pQpViRgP5C9*'


++ DONE! Image output:
       QC/init_qc_02_inpaff_base

#++ auto_warp.py version: 0.06
-- clearing AFNI_COMPRESSOR ...
# Output directory /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/
#Script is running (command trimmed):
  mkdir ./awpy_center_aligned_T1_pshft/
cd /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/
#Script is running (command trimmed):
  3dcopy /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft_aff.nii.gz ./anat.nii
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#Script is running (command trimmed):
  3dUnifize -GM -input ./anat.nii -prefix ./anat.un.nii
++ 3dUnifize: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
 + Pre-processing: ADVUWm
++ Output dataset ./anat.un.nii
++ ===== Elapsed = 17.5 sec
#Script is running (command trimmed):
  3dcopy /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz ./base.nii
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#Script is running (command trimmed):
  3dAttribute DELTA ./anat.un.nii
#Script is running (command trimmed):
  3dAttribute DELTA ./base.nii
0.250000 0.250000
#Script is running (command trimmed):
  3dinfo -same_grid ./anat.un.nii ./base.nii
#++ Aligning /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/base.nii data to /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/anat.un.nii data
#Script is running (command trimmed):
  3dQwarp -prefix ./anat.un.qw.nii -blur -3 -3 -workhard:0:2 -iwarp \
 -maxlev 09 -base ./base.nii -source ./anat.un.nii 
++ OpenMP thread count = 4
++ 3dQwarp: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
** FATAL ERROR: 3dQwarp fails :: source image has 0 nonzero voxels (< 100)
** Program compile date = Sep 27 2021
#**ERROR Failed in warping step
** ERROR - script failed
3dcopy: No match.
3dcopy: No match.

+++ Command Echo:
   3dNwarpCat -warp1 center_aligned_T1_shft_WARP.nii.gz -warp2 intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D -prefix intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz 

++ 3dNwarpCat: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warper
** ERROR: Can't open dataset from file 'center_aligned_T1_shft_WARP.nii.gz'
** ERROR: Failed to read 3D warp from 'center_aligned_T1_shft_WARP.nii.gz'
** ERROR: Can't compute nonlinear warp from string 'center_aligned_T1_shft_WARP.nii.gz intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D '
** ERROR: EDIT_dset_items[1]: invalid input dataset
** ERROR: Cannot write dataset: it is invalid

Fatal Signal 11 (SIGSEGV) received
  3dNwarpCat
 Bottom of Debug Stack
** Command line was:
3dNwarpCat -warp1 center_aligned_T1_shft_WARP.nii.gz -warp2 intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D -prefix intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz
** AFNI version = AFNI_21.2.09  Compile date = Sep 27 2021
** [[Precompiled binary linux_openmp_64: Sep 27 2021]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/c1639425/.afni.crashlog

+++ Command Echo:
   3dNwarpCat -warp1 intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D -warp2 center_aligned_T1_shft_WARPINV.nii.gz -space NO-DSET -prefix intermediate/center_aligned_T1_shft_base2osh_WARP.nii.gz 

++ 3dNwarpCat: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warper
** ERROR: Can't open dataset from file 'center_aligned_T1_shft_WARPINV.nii.gz'
** ERROR: Failed to read 3D warp from 'center_aligned_T1_shft_WARPINV.nii.gz'
** ERROR: Can't compute nonlinear warp from string 'intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D center_aligned_T1_shft_WARPINV.nii.gz '

Fatal Signal 11 (SIGSEGV) received
  3dNwarpCat
 Bottom of Debug Stack
** Command line was:
3dNwarpCat -warp1 intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D -warp2 center_aligned_T1_shft_WARPINV.nii.gz -space NO-DSET -prefix intermediate/center_aligned_T1_shft_base2osh_WARP.nii.gz
** AFNI version = AFNI_21.2.09  Compile date = Sep 27 2021
** [[Precompiled binary linux_openmp_64: Sep 27 2021]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/c1639425/.afni.crashlog
++ 3dNwarpApply: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warped
++ opened source dataset 'intermediate/center_aligned_T1_shft.nii.gz'
++ -master dataset is '/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz'
++ Processing -nwarp ** ERROR: Can't open dataset from file 'intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz'
** ERROR: Can't open 3D warp dataset 'intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz'

** FATAL ERROR: Cannot process warp string 'intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz '
** Program compile date = Sep 27 2021
** ERROR: program failed (3dNwarpApply, osh2base)



Edited 1 time(s). Last edit at 02/28/2023 08:41AM by ptaylor.
Subject Author Posted

animal_warper failing for some images

El_suri February 28, 2023 07:16AM

Re: animal_warper failing for some images

ptaylor February 28, 2023 08:46AM

Re: animal_warper failing for some images

El_suri February 28, 2023 09:50AM

Re: animal_warper failing for some images

ptaylor February 28, 2023 10:38AM

Re: animal_warper failing for some images

El_suri February 28, 2023 11:16AM

Re: animal_warper failing for some images

ptaylor February 28, 2023 11:35AM

Re: animal_warper failing for some images Attachments

El_suri March 03, 2023 07:03AM

Re: animal_warper failing for some images

ptaylor March 03, 2023 12:19PM

Re: animal_warper failing for some images

El_suri March 07, 2023 08:24AM

Re: animal_warper failing for some images

ptaylor March 07, 2023 03:12PM