Basically I’m trying to get the index of certain subbricks within an output
the back ticks seemed to mess with the output formatting a bit
I was able to get something working using the following:
Unfortunately I’m extracting multiple subbricks at once:
-- At sub-brick #418 'not5_LL5#0_Coef' datum type is float: -56.7884 to 84.4562
-- At sub-brick #420 'not5_LL5#1_Coef' datum type is float: -68.8189 to 78.3945
-- At sub-brick #422 'not5_LL5#2_Coef' datum type is float: -78.8084 to 100.778
-- At sub-brick #424 'not5_LL5#3_Coef' datum type is float: -72.1925 to 78.0441
-- At sub-brick #426 'not5_LL5#4_Coef' datum type is float: -80.5103 to 74.3215
-- At sub-brick #428 'not5_LL5#5_Coef' datum type is float: -83.7845 to 76.9669
-- At sub-brick #430 'not5_LL5#6_Coef' datum type is float: -69.4753 to 76.8984
-- At sub-brick #432 'not5_LL5#7_Coef' datum type is float: -67.924 to 61.0146
-- At sub-brick #434 'not5_LL5#8_Coef' datum type is float: -67.4012 to 76.7596
-- At sub-brick #436 'not5_LL5#9_Coef' datum type is float: -71.3718 to 54.9496
-- At sub-brick #438 'not5_LL5#10_Coef' datum type is float: -57.654 to 64.9789
-- At sub-brick #440 'not5_LL5#11_Coef' datum type is float: -70.3451 to 74.7157
-- At sub-brick #442 'not5_LL5#12_Coef' datum type is float: -71.217 to 90.233
-- At sub-brick #444 'not5_LL5#13_Coef' datum type is float: -71.6169 to 58.2551
-- At sub-brick #446 'not5_LL5#14_Coef' datum type is float: -56.2692 to 100.694
-- At sub-brick #448 'not5_LL5#15_Coef' datum type is float: -65.0389 to 76.3429
-- At sub-brick #450 'not5_LL5#16_Coef' datum type is float: -73.6157 to 81.1147
-- At sub-brick #452 'not5_LL5#17_Coef' datum type is float: -67.8461 to 80.9208
-- At sub-brick #454 'not5_LL5#18_Coef' datum type is float: -61.3783 to 66.8849
-- At sub-brick #456 'not5_LL5#19_Coef' datum type is float: -74.3717 to 86.5165
-- At sub-brick #458 'not5_LL5#20_Coef' datum type is float: -62.4366 to 61.9594
So i think I’ll have to do some funky clunky stuff. But this should work for now.
I was looking through the code here: https://afni.nimh.nih.gov/pub/dist/src/debugtrace.c
is there a way for end users to set ZMAX?
I guess there might be some spaces in the output when using ...? Not sure.
This worked for me to build a list of indices (in tcsh, but the syntax should transfer directly to bash):
#!/bin/tcsh
set FILE = STATS_DSET
set idx_list = ( ) # to be populated
# make a list of all the labels
set all_labels = `3dinfo -label "${FILE}" | tr '|' '\n' | grep Coef`
# go through the labels and populate list of indices
foreach label ( ${all_labels} )
set idx_list = ( ${idx_list} `3dinfo -label2index "${label}" "${FILE}"` )
end
echo ""
echo "++ All my labels:"
echo " ${all_labels}"
echo "++ My final index list:"
echo " ${idx_list}"
We are running into this truncation error as well. You alluded to a way to "increase the maximum length if it is important’.
Could you please share this secret?
Sorry for being slow. Could you provide some details regarding what you are seeing? Is it just from 3dinfo with a long history, for example?
Thanks,
rick
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.