If I understand there is a quadratic fading by default but it would be nice to know where in the plot is threshold for still discernable subthreshold voxels...

At present, there isn't a way to export a colorbar image with the translucency showing up on it.

Note that you can export the "normal" or full colorbar, and text information about the min, max and threshold associated with it.

Occasionally, I have brought that colormap into LibreOffice Impress (i.e., something like Powerpoint), and overlaid white rectangle with linearly-graded opacity over the subset of the cmap that corresponds to sub-threshold region. This can create an appropriate colormap, like this, say, if the threshold were set at 7 here (on the Plasma cbar):

I'm guessing this wouldn't work for the default quadratic fading right? Only the linear fading?
Relatedly, I'm not quite sure I understand how the --opacity[0..9] argument factors into how the subthreshold fading will end up looking?

Perhaps if the equation governing the subthreshold fading is made explicit one could load in the exported colorbar in python and automate overlaying the fading?

Re. quadratic: that is true, it won't be exact. It would be close. I think that in theory if you put 2 linear fades over each other, that should be the same as a quadratic fade (because quadratic = linear**2)? Consider here where I have done that (rightmost cbar):

The leftmost cbar shows the case of setting "-opacity = 6", so that the max opacity is about 70%. What that means is that everything above threshold has 70% opacity, and things below threshold fade more and more transparent from there.

The explicity equation: opacity is set by user, OMAX, as is the threshold magnitude value T. Any [i]th voxel has a value in the threshold volume t_i. The determination of what the opacity will be there is (for linear fade): opacity_i = OMAX, if |t_i| >=T, and otherwise OMAX * |t_i| / T.

It could also be written more compactly as this for linear: opacity_i = max( |t_i| / T, 1) * OMAX.
... and this for quadratic: opacity_i = max( (|t_i| / T)**2, 1) * OMAX.

And sure, you can load stuff into Python to view like that, indeed, using those equations. To dump a 1-column text file of the 256 colorbar values from the AFNI GUI, rightclick on the "Olay" above the displayed colorbar, and select "write out palette".

The leftmost cbar shows the case of setting "-opacity = 6", so that the max opacity is about 70%. What that means is that everything above threshold has 70% opacity, and things below threshold fade more and more transparent from there.

So the middle colorbar would be "-opacity = 9", right?

It could also be written more compactly as this for linear (corrected now): opacity_i = min( |t_i| / T , 1) * OMAX.
... and this for quadratic: opacity_i = min( (|t_i| / T )**2, 1) * OMAX.

Also, I realize I should have written "min(...)" instead of "max(...)" in my formulation up above---I have corrected that now, and noted it in the thread.

--pt

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.