Dear AFNI gurus,
I'm writing about using the AFNI matlab tool WriteBrik.m
My intention is to run statistics in matlab and then write a brik that can be used in AFNI's viewer GUI with cluster thresholds defined from 3dClustSim.
I've ran statistics on a voxel-wise basis using matlab, resulting in a p-value for each voxel for a particular masked region. I've used BrikLoad.m to load the mask file, and replaced the masked voxel values (i.e., volume values of 1s) with the respective p values. Then I've written a brik using WriteBrik.m, using the info from the BrikLoad. When I open the resulting p-value map (in brik format) using the AFNI GUI, the values in the overlay have a value of 0 or 1, not the pvalue that was computed. What is strange is that the autoRange is properly set (i.e., it doesn't see only 1s). Do you know why I might be only seeing 0s and 1s in my Brik when viewed using the GUI? I imagine I could use AFNI's 3dttest++ in this case, but I'd like to be able to use matlab in the future for statistical endeavors.
Moreover, it looks like the Clusterize tool is used with values OVER a certain threshold, so I imagine I could set the threshold at 0.95 and invert the p-values (i.e., 1 - p, for each voxel) in order to set a threshold that would correspond to a p-value of 0.05 in the original dataset. I imagine there may be a better way? Like can WriteBrik be used to create the sort of statistical maps that AFNI is use to? If so, what do you recommend?
Many thanks,
Matthew