Processing Residuals for 3dFWHMx and 3dClustSim


I am trying to determine the Cluster size threshold using 3dClustSim (updated process).

My process so far has been to use the same script for each subject as for my main data analysis but with the “-errts residuals” option added.

I then warp and smooth the output residuals+orig. to match my main data analysis.
However at this stage I run into issues. The output residuals of the warp is either way off to the edge of the screen or not present at all depending on the data set.
This same warping works on other files I have used but not these residuals. Could you help with this? Is it because the residuals files have multiple sub-bricks? It still doesn’t work when I try to select single sub-bricks. Do you know how to fix this issue? I believe the warping script I am using uses ANTS.

After those steps I plan on running
3dFWHMx -acf s4_nw_residuals.nii -automask > AllSubjACF.txt
I then find the average of each column and feed that in to
3dClustSim -mask MNI_mask -acf c1 c2 c3

Please let me know if you have further questions and I appreciate any help you can provide.

Thanks so much

So I think I’ve figured out that the residuals files that are output are 4d. So I’ll need to use a warping script that expects this (although it will take a very long time).

So if anyone else is wondering how to warp their residuals files to do 3dClustSim in the same space as their stats were warped, you’ll likely need the same.