Thanks Chris, can you point us to the offending wiki page?
doug

On 9/28/18 12:44 PM, Christopher Markiewicz wrote:

        External Email - Use Caution

Hi all,


I believe I've gotten to the bottom of this, and the problem is incorrect 
documentation, both in the read/write_annotation.m files and in the wiki.


Taking the FreeSurfer C source as the de facto specification, we can refer to 
the colortab.c file. Here, the labels are not constructed or decoded using the 
transparency (255 - alpha) information at all, but are simply (R + G << 8 + B 
<< 16).


For more complete discussion, see:


https://github.com/nipy/nibabel/issues/649#issuecomment-424755969


I think the most parsimonious resolution of this confusion is simply to update 
the documentation on the wiki page (I cannot; someone with permissions will 
need to), and to patch the MATLAB code to build its labels from RGB values 
alone. I will submit a patch to the GitHub branch.

Please let me know if I've gotten something wrong.

Best,
Chris Markiewicz

________________________________
From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu><mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 on behalf of paul mccarthy 
<pauldmccar...@gmail.com><mailto:pauldmccar...@gmail.com>
Sent: Thursday, September 20, 2018 11:39:53 AM
To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] Clarification about .annot file format


        External Email - Use Caution

Howdy,

There is a discussion regarding the .annot file format over at the nibabel 
github repository, regarding the interpretation of the flag/alpha value:

https://github.com/nipy/nibabel/issues/649

If one wishes to create an .annot file with colours that have a transparency 
value, how should it be stored in the file? By piecing together the information 
from the freesurfer code [1,2], and Graham Wideman's helpful notes [3], I came 
to the conclusion that alpha values should be stored as 1-the actual value. But 
it would be great to get some clarification on this from somebody who knows 
more than me

Thanks very much,

Paul McCarthy

[1] https://github.com/freesurfer/freesurfer/blob/dev/matlab/read_annotation.m
[2] https://github.com/freesurfer/freesurfer/blob/dev/matlab/write_annotation.m
[3] 
https://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles#Annotation



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to