Oh, now I get it---thanks for those additional details.
I was picturing the cluster table as the thing output by 3dClusterize, which looks like this:
#
# Cluster report
#[ Dataset prefix = stats.FT ]
#[ Threshold vol = [2] 'vis#0_Tstat' ]
#[ Supplement dat vol = [1] 'vis#0_Coef' ]
#[ Option summary = bisided,-2.556,2.556,clust_nvox,150,NN2 ]
#[ Threshold value(s) = left-tail thr=-2.556000; right-tail thr=2.556000 ]
#[ Aux. stat. info. = DEGREES-of-FREEDOM : 412 ]
#[ Nvoxel threshold = 150; Volume threshold = 2343.750 ]
#[ Single voxel volume = 15.625 (microliters) ]
#[ Neighbor type, NN = 2 ]
#[ Voxel datum type = float ]
#[ Voxel dimensions = 2.500 mm X 2.500 mm X 2.500 mm ]
#[ Coordinates Order = RAI ]
#[ Mean and SEM based on signed voxel intensities ]
#
#Volume CM RL CM AP CM IS minRL maxRL minAP maxAP minIS maxIS Mean SEM Max Int MI RL MI AP MI IS
#------ ----- ----- ----- ----- ----- ----- ----- ----- ----- ------- ------- ------- ----- ----- -----
16378 -4.0 34.6 27.2 -78.8 68.8 -71.2 98.8 -21.2 66.2 -0.4271 0.0026 -3.9898 1.2 68.8 51.2
12901 1.1 42.9 2.8 -78.8 76.2 -78.8 98.8 -21.2 66.2 0.9981 0.0093 12.7 43.8 -46.2 -18.8
839 -47.2 -2.2 42.5 -66.2 -26.2 -31.2 16.2 16.2 66.2 0.5937 0.0196 5.8923 -36.2 8.8 66.2
421 46.1 8.7 -13.2 21.2 66.2 -18.8 48.8 -21.2 3.8 -0.4573 0.0111 -1.3876 53.8 18.8 -11.2
221 3.5 -28.5 48.1 -11.2 13.8 -53.8 -1.2 38.8 58.8 0.3041 0.0124 1.1872 8.8 -51.2 48.8
185 -73.6 -10.8 7.3 -78.8 -48.8 -18.8 11.2 -3.8 28.8 2.1604 0.122 7.2476 -78.8 -13.8 6.2
#------ ----- ----- ----- ----- ----- ----- ----- ----- ----- ------- ------- ------- ----- ----- -----
# 30945 -2.7 37.5 11.9 0.215 0.0059
... not the cluster-simulation results from 3dClustSim, which looks like this:
# 3dClustSim -mask TMP_RES.nii.gz -acf 0.5128 3.8451 11.3839 -nodec -prefix TMP_RES_CLUST
# 2-sided thresholding
# Grid: 91x109x91 2.00x2.00x2.00 mm^3 (178964 voxels in mask)
#
# CLUSTER SIZE THRESHOLD(pthr,alpha) in Voxels
# -NN 3 | alpha = Prob(Cluster >= given size)
# pthr | .10000 .05000 .02000 .01000
# ------ | ------ ------ ------ ------
0.050000 844 1016 1264 1466
0.020000 317 386 486 574
0.010000 172 212 269 311
0.005000 104 126 161 190
0.002000 57 70 90 107
0.001000 39 47 61 74
0.000500 26 33 43 50
0.000200 16 21 28 33
0.000100 11 15 20 24
Hence my confusion to the query. I now understand!
However, I think the answer is that there is not a way for 3dClusterize to directly take inputs from the cluster-simulation (clustsim) table. The reason is that the clustsim table contains a lot of outputs, and the user has to choose which pthr+alpha combination they want to use. That is, you must choose whether you want pthr=0.0005 and alpha=0.02, and get the threshold number sitting at that cross-section of the grid, or whether you want pthr=0.002 and alpha=0.10, or ... whatever. Because cluster simulations are so computationally expensive, but multiple pthr+alpha combos can be calculated simultaneously (even for multiple NN and sidedness, which are typically in separate files), it makes sense to output a table to choose from later---but that choice has to be made.
Now, that being said, it is possible to scriptically select your row/column entry from the clustsim table, such as doing this (NB: 1dcat ignores commented lines, and zerobased counting is used) to get the pthr=0.0005 entry from the 6th row and alpha=0.02 from the 3rd column:
1dcat csim_output.NN3_2sided.1D'{6}[3]'
You could dump that to a variable in a script:
set holy_cluster_threshold = `1dcat csim_output.NN3_2sided.1D'{6}[3]'`
The downside of this kind of selection is that it is not by row/column label, so you have to be sure of that (probably also checking the information, to make sure the person providing the file didn't use different pthr/alpha values).
All of that is for when you have the file, and you asked about getting it from a file header. It's true that that table can be stored in a header, in an attribute typically linked to the particular NN and sidedness used in the 3dClustSim call, as you showed above; it can be dumped out with 3dAttribute:
3dAttribute AFNI_CLUSTSIM_NN1_1sided DSET_NAME
That displays the NIML-formatted version of the file. However, I'm not sure how to easily get at the table that is there. Perhaps someone else will, though.
--pt