MRI folks, does anyone know an easy way to take the standard deviation of multiple niftis? My goal is calculate the SD in betas at each voxel across 20 volumes. Thanks!
I usually use functionality from CoSMoMVPA (http://www.cosmomvpa.org/get_started.html) using MATLAB. If you prefer python check out pymvpa (http://www.pymvpa.org/). From what I know it is similar to CoSMo.
I can only speak for my experience with CoSMo and I would say it is quite easy to use and very well documented.
In your case you need to load the beta files with cosmo_fmri_dataset, then stack them with cosmo_stack.
This results in a matrix with 20 rows by #voxels columns. On this matrix you can use MATLABs std function to calculate the SD for each voxel across your 20 betas.
Note: if you already have a single file containing the 20 betas then you just load the data and use MATLABs std function (or a python equivalent).
EDIT: you actually can do it quite easily with FSL.
First merge your 20 volumes with 'fslmerge -t [names of beta files]'
Then use 'fslmaths name_of_concatenated -Tstd output.nii.gz'
I hope this helps. If you have any more questions feel free to contact me.
Assuming your MRI volumes are registered and normalized, you can do it easily with FIJI / ImageJ after creating a single 4D datasets of all your images.
you can use fsl or afni functions. Your niftis need to be in the same space. then you can create a 4d dataset by concatenating all your volumes in time. the rest is just matter of some code. If you use FSL you simply type :