Given a z-score, you can compute the p-value for that score in 1 of 2 ways, using the AFNI programs. The first way is manually, 1 score at a time, using the "cdf" program, as in
cdf -t2p fizt 2.739
which returns the output line "p = 0.00616264".
You can also do this for each voxel in the z-score dataset, using the function 'fizt_t2p(a)', where 'a' is the input dataset symbol. You should probably force the output dataset to be stored in float format, not as scaled shorts, since p-values take a large range of values. You do this by using the '-datum float' option on the 3dcalc command line. Once you have calculated this p-value dataset, you could then use 3dmaskdump to extract the values you want.
Finally, if you are very advanced, you could actually calculate the p-value dataset on the 3dmaskdump command line directly, as in
3dmaskdump -mask ext+tlrc '3calc( -a zsc+tlrc -datum float -expr fizt_t2p(a) )'
This will use 3dcalc to compute the p-value dataset into a temporary file, read that dataset in, delete the temporary file, then process it. In this way, you don't need to delete it yourself -- what fun!?
bob cox