crosshair color and gap size - env variable?

Hi all,

Is there an environment variable to pre-set cross-hair color and gap size? I cannot find one on the variable list, only thickness and presence, but maybe I am missing something

Hi, Pawel-

With @chauffeur_afni:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/auto_image/auto_%40chauffeur_afni.html
… you can set the crosshair presence and gap with:


-set_xhairs XX     :specify type and/or existence of crosshairs in the
                    image (see DR: SET_XHAIRS).

-set_xhair_gap GG  :specify gap in the crosshairs to the specified number
                    of pixels GG (see DR: SET_XHAIR_GAP).

In GUI, those are set with driving commands, not environment variables:


    -com "SET_XHAIRS      <my crosshair on/off choice>"      
    -com "SET_XHAIR_GAP   <my crosshair gap value>"

… as described here:
https://afni.nimh.nih.gov/pub/dist/doc/program_help/README.driver.html

But funnily enough, there isn’t an env variable or driving command to set the crosshairs color. That might be something to add.

–pt

Thank you, Paul. Actually, setting the gap size is more important for me, as I almost always want to switch it from the default 5 to a much smaller number, while only sometimes I feel like switching xhair color to yellow :slight_smile:

Actually, could it be made an environmental variable i.e. global setting at some point?

I thought I would be happy with
alias af ‘afni -com “SET_XHAIR_GAP 1”’
and starting afni via “af”

But if then I open a new controller using the New button, it uses the default gap size of 5

just putting in another vote to make gap size an environmental variable. i'm also always changing it from default 5 to smaller. but i know you guys are busy so no worries if too much work!

Done. See pull request Crosshair gap size by afni-dglen · Pull Request #836 · afni/afni · GitHub

That is great, thanks!

Just note this isn't in the current distribution yet (ver 25.2.12). It should be in our next build, so from 25.2.13 and ever onwards.

--pt

Try running this for example:

afni -DAFNI_crosshairgap=0 -DAFNI_ovcrosshair=11

Apparently those environment variables have been available since 1997. :)

-rick

thanks so much everyone, AFNI_CROSSHAIRGAP = 0 in my .afnirc has begun saving me so much time and clicking