AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
December 10, 2014 02:25PM
Following a suggestion by Isaac, I have implemented a variable-opacity overlay capability in the AFNI GUI. In the imaging jargon, opacity is denoted by 'alpha' and ranges from 0 = transparent to 1 = opaque.

This feature will be available in the next binaries compiled after this post date -- that is to say (unless something bad happens), on Thursday 11 Dec 2014.

In the default mode of operation, AFNI's overlay opacity is a step function: it is 0 for below-threshold voxels and 1 for above-threshold voxels. In the new mode of operation, when 'Alpha' is turned on, the opacity is 1 for above-threshold voxels, and is smaller than 1 -- but not 0 -- for below-threshold voxels -- lending an air of translucency to them.

You control the setting of Alpha from the right-click popup menu attached to the label just above the 'Define Overlay' threshold slider. You can also turn it on at startup using the new AFNI_FUNC_ALPHA environment variable -- I personally have set AFNI_FUNC_ALPHA = Linear in my ~/.afnirc file, so that I can observe any problems that come up with this new display mode.

The settings for Alpha are 'Off', 'Linear', and 'Quadratic'. The latter two describe the function that reduces the opacity below 1 for below-threshold voxels. These strings are also the valid settings for AFNI_FUNC_ALPHA.

You can set a floor value for opacity, below which the linear or quadratic reduction will not occur. This setting is done on the same popup menu, in the item just below 'Alpha'. However, pixels with the threshold variable exactly equal to zero will not get the Floor value of opacity, but will get alpha=0.

Note that the alpha (opacity) level at the pixel-wise level is scaled by the global opacity '1-9' control on the right side of the individual slice image viewers, where '9' means that above-threshold pixels will be 100% opaque, and '6' means they will be 6/9=66.6666% opaque -- and lower opacity pixels will be have their opacity scaled down by the same factor.

{Just to be semi-clear, 'opacity=alpha' here means that the color of the displayed pixel is alpha*overlay+(1-alpha)*underlay, where in this formula, alpha=final opacity factor for each voxel, as computed by the 'Alpha' setting from the voxel's threshold value and the image viewer's global opacity factor.}

The variable-opacity overlay usually looks better (less blocky) if you open 'Define Datamode' and set the resampling modes for the OLay and Stat to 'Li' (linear) rather than the default 'NN' (you can also do this via environment variables AFNI_resam_func and AFNI_resam_thr).

When Alpha is turned on, the above-threshold pixel regions are outlined in opaque black, unless you set the AFNI_EDGIZE_OVERLAY environment variable to NO -- this variable can be set interactively via the 'EditEnv' pseudo-plugin.

The outline is done over the pixels immediately OUTSIDE the above-threshold regions, in the overlay image as interpolated to the underlay resolution. If the underlay is on a coarse matrix (e.g., native EPI), these outlines will look terrible -- you can alter the underlay display grid dimension in 'Define Datamode' using the control 'Warp ULay on Demand'.

Below is a screenshot example, using InstaCorr. This fancy redrawing is fast enough to be usable with the shift+ctrl+click-drag method of interactively sliding the seed voxel around -- and it looks really cool to do so. (Occasionally us government drones do something useful. Or at least fun.)

Subject Author Posted

Announcement -- Voxel-wise Opacity (Alpha)

Emperor Zhark December 10, 2014 02:25PM

Re: Announcement -- Voxel-wise Opacity (Alpha)

Emperor Zhark December 16, 2014 11:49AM

Re: Announcement -- Voxel-wise Opacity (Alpha)

Emperor Zhark December 16, 2014 01:17PM