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  

|
September 18, 2007 03:06PM
The basic formats for X11 colors are hexadecimal integers or decimal floating point numbers between 0.0 and 1.0. What you have is decimal integers, which X11 doesn't support (as far as I know).

If you stripped off the "10 = RGB" stuff from your file, then you would have a file comprising 3 columns of numbers. You could torture these into an acceptable format with a clever script.

However, to avoid violation of the Geneva Conventions, I have modified the AFNI color parsing function to accept a string of the form "RGB:100,149,237" as a valid color specifier. So, you'll have to edit your color file so that

(1) each line ends in something of the above form (global change "RGB " to "RGB:", and put commas between the numbers so there are no blanks in the color definition)

and

(2) make sure that there are blanks surrounding the "=" on each line! (Your line that starts with "5=" is not legal".) Or just eliminate the "=" via a global replace with " ".

Do NOT do this editing in Windows -- AFNI does not really like Windows-generated text files.

Also, note that the "labels" are numbers, not arbitrary character strings. Also, AFNI colorscales always have 128 values. If you supply 67 values, then the range will be stretched and interpolated to give 128 colors anyway. To avoid this, you could do something like

1 = RGB:3,4,5
2 = RGB:200,22,37
...
67 = RGB:44,66,77
68 = RGB:0,0,0
128 = RGB:0,0,0

In that way, the values between 67 and 128 will be all be set to pure black (which, as the Web pages explains, is not actually an overlay color).

More also: the number labels should be in order (increasing or decreasing), not scrambled up.

You will have to wait until tomorrow (19 Sep 2007) to re-download and install AFNI to get this "RGB:" update -- binaries will be rebuilt tonight, starting when I leave the NIH for my long long trudge home across the McMansion-ized wastelands of Bethesda.
Subject Author Posted

color scale

Erika September 18, 2007 01:19PM

Re: color scale

bob cox September 18, 2007 03:06PM

Re: color scale

Erika September 18, 2007 03:20PM

Re: color scale

Ziad September 18, 2007 04:04PM