History of AFNI updates  

|
August 24, 2022 09:22AM
Hi, Johannes-

OK, from the error, I suspect that is a shell scripting issue, that the value after "-input ..." in the command should not be "$FLAIR", but instead "$t1", as the latter seems to have the full path information and the former just part of the file name.

So, could you please try the following:
for folder in /Users/lab/Desktop/MRI/*/
do
	echo $folder
	id=$(basename "$folder")
	echo $id
	t1="$folder"*"FLAIR"*".ni"*
	echo $t1
	mkdir /Users/lab/Desktop/MRI/$id/ 
	/Users/lab/abin/@afni_refacer_run -input "$t1" -mode_reface -anonymize_output -prefix /Users/lab/Desktop/MRI//$id/"$id"_FLAIR_reface.nii.gz 
done
echo 'done with script'

... and see how that goes?

--pt
Subject Author Posted

@afni_refacer_run with FLAIR

AFNI1512 August 24, 2022 03:55AM

Re: @afni_refacer_run with FLAIR

ptaylor August 24, 2022 07:11AM

Re: @afni_refacer_run with FLAIR

AFNI1512 August 24, 2022 08:28AM

Re: @afni_refacer_run with FLAIR

ptaylor August 24, 2022 09:22AM

Re: @afni_refacer_run with FLAIR

AFNI1512 August 25, 2022 05:03AM