Hi,
I am averaging 3 aligned 4D diffusion scans using "fslmaths" to
improve the SNR. Each scan contains 65 volumes. Here is what I did,
>fslmaths dti1_vol0000 -add dti2_0000 dti1ADD2_vol0000
...
>fslmaths dti1_vol0064 -add dti2_0000 dti1ADD2_vol0064
then,
>fslmaths dti1ADD2_vol0000 -add dti3_0000 dti123sum_vol0000
...
>fslmaths dti1ADD2_vol0064 -add dti3_0000 dti123sum_vol0064
then,
>fslmaths dti123sum_vol0000 -div 3 dti123average_vol0000
...
>fslmaths dti123sum_vol0064 -div 3 dti123average_vol0064
Finally, merge to one 4D file
>fslmerge -a DTI123average_merge dti123average_vol0000 ...
dti123average_vol0064
My questions are
1. Is this the only way to average diffusion scans(besides divided by
3 first then summed up)?
If we want to average much more scans and more volumes in each scan,
do we still need to repetitively add up each volume one at a time
manually, then divided by the total number of scan?
2. I have tried wildcard like the follow and they don't seem to work
fslmaths dti1_vol* -add dti2_0000 dti1ADD2_vol*
fslmerge -a DTI123average_merge dti123average_vol*
Do the FSL commands, like fslmaths, fslmerge, flirt etc., support
wildcard in general?
Is there a more efficient way of applying the same operation across
all volumes? For example, AFNI commands support the operation on a
single volume without first splitting the 4D scan, e.g., AFNICOMMAND
filename.nii.gz "[35]".
3. Could a shell script help automate the process?
Thank you very much,
Rick
|