@chauffeur_afni options

Hi, Rekha-

Re. #2: There isn't a way within AFNI to plop text into the image files generically (just some specific text generation GUI image views, like slice number). I agree that would be useful in many cases, but at present that would have to done in a separate software. (And if you find an convenient/nice one for that, I'd appreciate knowing.)

Re. #1: I see, I understand now. There is an RGB dataset type within NIFTI (and AFNI uses it, for example to make DEC maps for diffusion directionality viewing) but those don't have alpha fading as part of it. AFNI can actually send data to SUMA to project volumetric data onto surfaces---it sends RGB information, and we are planning to have it deal with the alpha channel in the near future, too.

In terms of having other software use the information, it might be possible to view that have nilearn show the data in a similar way. I am not familiar with that tool, but if you can do matplotlib-like things there, you can make an alpha value per voxel according to, perhaps:

def calc_alpha(VAL, THR):
    """VAL is the voxel value, and THR is the threshold magnitude.
Return an alpha value in range [0, 1].
"""
    if abs(VAL) > THR :
        return 1.0
    elif abs(VAL) > 0 :
        return ABS(VAL)/THR
    else:
        return 0.0

1 Like