Print

Print


Hi Noelia,

fsladd should be in your $FSLDIR/bin/ directory (And that directory should be in your $PATH variable).

If that is not the case, you may want to check if your FSL installation / configuration is correct.

Cheers

2017-12-19 10:21 GMT+00:00 Noelia Martinez-Molina <[log in to unmask]>:
Hi Saad,

Thank you for your help. I tried using fsladd but the terminal shows "command not found".  I'm not sure about what the problem is.

Best,
Noelia

2017-12-19 10:51 GMT+01:00 Saad Jbabdi <[log in to unmask]>:
You can use fsladd   (no need for loops)

Cheers
Saad



> On 19 Dec 2017, at 09:49, Noelia Martinez Molina <[log in to unmask]OM> wrote:
>
> Dear FSL experts,
>
> I need to average images from 38 subjects using fslmaths. The command would be something like this:
>
> fslmaths image1 -add image2 -add image3 ... -add image38 -div 38 average_image
>
> However, I was wondering if you could tell me how to use a loop to create a string with all the -add arguments in order to avoid the tedious of having to write manually all the filenames for each image.
>
> Thank you in advance for your help.
>
> Best,
> Noelia



--

Noelia Martínez-Molina
Cognition and Brain Plasticity Group
Department of Cognition, Development and Educational Psychology
Universitat de Barcelona
Campus Mundet, Edifici de Ponent

twitter:@NoeliaMrtnez

--------------------------------------------------------------------------------------------------------

"Where words fail, music speaks."

                                                               Hans Christian Andersen
---------------------------------------------------------------------------------------------------------