auto_warp.py error

I’m using auto_warp.py to register T1 brain to the template brain. However, I am getting the following error (Error: template (or -apar) dset not found: ./base.nii). When I go to the directory /warptest, I see the base.nii.gz file but the command does not recognize this file and says that the base.nii is not found. There are two other files (anat.nii.gz and anat.un.nii.gz) that the command seems to recognize but not the base.nii.gz. I’m not sure why I have this error, and I would appreciate your help.

I unzipped the base.nii.gz and ran the same command again while having base.nii in the /warptest, and then it worked.

auto_warp.py -base XXX/parcellations/ch2bet.nii -input T1_brain.nii -output_dir warptest
#++ auto_warp.py version: 0.04

Output directory XXX/T1/warptest/

#Script is running (command trimmed):
mkdir ./warptest/
cd XXX/T1/warptest/
#Script is running (command trimmed):
3dcopy XXX/T1/T1_brain.nii ./anat.nii
++ 3dcopy: AFNI version=AFNI_18.3.03 (Oct 19 2018) [64-bit]
#Script is running (command trimmed):
3dUnifize -GM -input ./anat.nii -prefix ./anat.un.nii
++ 3dUnifize: AFNI version=AFNI_18.3.03 (Oct 19 2018) [64-bit]

  • Pre-processing: ADV…UWGm
    ++ Output dataset ./anat.un.nii.gz
    ++ ===== Elapsed = 12.4 sec
    #Script is running (command trimmed):
    3dcopy XXX/parcellations/ch2bet.nii ./base.nii
    ++ 3dcopy: AFNI version=AFNI_18.3.03 (Oct 19 2018) [64-bit]
    #++ Aligning XXX/T1/warptest/base.nii data to XXX/T1/warptest/anat.un.nii data
    #Script is running (command trimmed):
    @auto_tlrc -base ./base.nii -input ./anat.un.nii -suffix .aff -no_ss -no_pre -init_xform CENTER
    Error: template (or -apar) dset not found: ./base.nii
    #**ERROR Failed in affine step
    ** ERROR - script failed

Hi-

I just tried that command with some data sets on my comp, and that seemed to work OK for me.

What version of AFNI are you using? You can see that with “afni -ver”.

I will PM you instructions to upload your dsets in question, fi that is possible, and maybe there is something odd therein?

-pt

Also, it is worth noting that @SSwarper is really a useful tool-- it combines making a nonlinear warp to a reference space with skullstripping, a kind of two-for-one deal.

A bit more about it is here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/template_atlas/sswarper_base.html#sswarper

–pt

You might have AFNI_COMPRESSOR set. That causes problems
with some of the scripts when dealing with NIFTI datasets.

  • rick