You could just do this with 3dfim+. It seems to me to be the most straightforward way of doing it.
3dROIstats -quiet -mask_f2short -mask ${seed} mytimeseries+tlrc.HEAD > ${seedTimeseriesDir}/${seedName}.1D
3dfim+ -input mytimeseries+tlrc.HEAD -ideal_file ${seedTimeseriesDir}/${seedName}.1D -out Correlation -bucket ${rsfcDir}/${seedName}_corr
and just for good measure Fisher Z transform it
3dcalc -datum float -a ${rsfcDir}/${seedName}_corr+tlrc.HEAD -expr 'log((a+1)/(a-1))/2' -prefix ${rsfcDir}/${seedName}.z-score