> 3dttest++ -prefix blabla.nii -setA group1/*.nii -setB group2/*.nii
> 3dcalc -a blabla.nii[0] -expr a -prefix map_mean.nii
>
> Is it correct?
The 3dttest++ command gives you the connectivity difference between the two groups and the associated t-statistic. I'm not so sure about the purpose of the 3dcalc command.
> If so, why if I reverse group A and B
>
> 3dttest++ -prefix blabla.nii -setB group1/*.nii -setA group2/*.nii
> 3dcalc -a blabla.nii[0] -expr a -prefix map_mean.nii
>
> I obtain different results/maps?
There is no point reversing the order of the two groups. By default the t-test is two tailed in AFNI, so the first 3dttest++ command should give all you want. If you want to sort out the directionality, the positive or negative sign in the output should be good enough for that purpose. If you think that one-tailed thresholding is justified, you can simply divide the p-value underneath the slider bar on the AFNI GUI by 2.
Gang