Hi,
as I had the same error "Validity check at end of stage 1 detected missing files" during segmentation for few subjects out of a large sample (the others worked!),
I followed the instructions given above:
1. I performed registration of the subject's T1 image to the atlas template using ITK-Snap
2. I created the inverse transformation matrix using c3d_affine-tool
3. I copied both matrices, "t1_to_template_affine.mat" and "t1_to_template_affine_inv.mat", into the folder "/work/affine_t1_to_template/".
4. I executed ASHS with the -N option.
I obtained the following error message:
"Validity check at end of stage 1 detected missing files. (ants_t1_to_temp/greedy_t1_to_template_invwarp.nii.gz and 9 other files).
Is this indicative of some major registration problems that cannot simply be fixed by supplying a custom transform matrix?
This is a slightly longer part of the log:
====================================
PROGRESS: 0
====================================
+ [[ -f /home/h7/goenner/ashs/ashs-fastashs_beta/ashs_work/10100115/affine_t1_to_template/t1_to_template_affine.mat ]]
+ [[ -n 1 ]]
+ echo 'Skipping Affine Registration'
Skipping Affine Registration
+ [[ 0 == 1 ]]
+ [[ 0 == 1 ]]
+ [[ 0 == 1 ]]
+ job_progress 0.5
+ local PROGRESS=0.5
+ local CHUNK_PSTART CHUNK_PEND
+ read CHUNK_PSTART CHUNK_PEND
++ echo 1
++ awk -v bs=0.0 -v be=0.2 -v j=0 -v n=1 '{print bs + ((be - bs) * j) / n, bs + ((be - bs) * (j+1)) / n}'
+ echo 'CHUNK 0.0 0.2'
CHUNK 0.0 0.2
+ echo 1
+ awk -v bs=0.0 -v be=0.2 -v j=0 -v n=1 '{print bs + ((be - bs) * j) / n, bs + ((be - bs) * (j+1)) / n}'
0 0.2
+ echo 'CHUNK 0 0.2 0.5'
CHUNK 0 0.2 0.5
+ bash /home/h7/goenner/ashs/ashs-fastashs_beta/bin/ashs_default_hook.sh progress 0 0.2 0.5
====================================
PROGRESS: 0
====================================
+ [[ -n 1 ]]
+ [[ -f /home/h7/goenner/ashs/ashs-fastashs_beta/ashs_work/10100115/ants_t1_to_temp/greedy_t1_to_template_warp.nii.gz ]]
+ greedy -d 3 -m NCC 2x2x2 -e 0.5 -n 60x20x0 -i /home/h7/goenner/ashs/atlases/ashs_atlas_princeton/template/template.nii.gz /home/h7/goenner/ashs/ashs-fastashs_beta/ashs_work/10100115/affine_t1_to_template/t1_to_template_affine.nii.gz -o /home/h7/goenner/ashs/ashs-fastashs_beta/ashs_work/10100115/ants_t1_to_temp/greedy_t1_to_template_warp.nii.gz -oinv /home/h7/goenner/ashs/ashs-fastashs_beta/ashs_work/10100115/ants_t1_to_temp/greedy_t1_to_template_invwarp.nii.gz -gm /home/h7/goenner/ashs/atlases/ashs_atlas_princeton/template/template_bet_mask.nii.gz
ABORTING PROGRAM DUE TO RUNTIME EXCEPTION -- File '/home/h7/goenner/ashs/ashs-fastashs_beta/ashs_work/10100115/affine_t1_to_template/t1_to_template_affine.nii.gz' does not exist
[0;31m
**************** !! ERROR !! *******************
Validity check at end of stage 1 detected
missing files.
(ants_t1_to_temp/greedy_t1_to_template_invwarp.n
ii.gz and 9 other files).
************************************************
[0m
Best,
Lorenz