Re: [Freesurfer] Clarification about .annot file format

2018-09-28 Thread Christopher Markiewicz
External Email - Use Caution

Doug,


I think that's the only one.


Chris


From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Greve, Douglas N.,Ph.D. 

Sent: Friday, September 28, 2018 1:09:50 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Clarification about .annot file format

Is this the offending line? or is there more?
value = (A * 2563) + (B * 2562) + (G * 256) + (R)


On 9/28/18 1:03 PM, Christopher Markiewicz wrote:

External Email - Use Caution

Hi Doug,


The relevant wiki page is: 
https://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles#Annotation


Chris


From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 on behalf of Greve, Douglas N.,Ph.D. 
<mailto:dgr...@mgh.harvard.edu>
Sent: Friday, September 28, 2018 12:47:36 PM
To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Clarification about .annot file format

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>
 
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 on behalf of paul mccarthy 
<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<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

Re: [Freesurfer] Clarification about .annot file format

2018-09-28 Thread Greve, Douglas N.,Ph.D.
Is this the offending line? or is there more?
value = (A * 2563) + (B * 2562) + (G * 256) + (R)


On 9/28/18 1:03 PM, Christopher Markiewicz wrote:

External Email - Use Caution

Hi Doug,


The relevant wiki page is: 
https://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles#Annotation


Chris


From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 on behalf of Greve, Douglas N.,Ph.D. 
<mailto:dgr...@mgh.harvard.edu>
Sent: Friday, September 28, 2018 12:47:36 PM
To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Clarification about .annot file format

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>
 
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 on behalf of paul mccarthy 
<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<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

Re: [Freesurfer] Clarification about .annot file format

2018-09-28 Thread Christopher Markiewicz
External Email - Use Caution

Hi Doug,


The relevant wiki page is: 
https://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles#Annotation


Chris


From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Greve, Douglas N.,Ph.D. 

Sent: Friday, September 28, 2018 12:47:36 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Clarification about .annot file format

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>
 
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 on behalf of paul mccarthy 
<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

Re: [Freesurfer] Clarification about .annot file format

2018-09-28 Thread Greve, Douglas N.,Ph.D.
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>
 
<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 on behalf of paul mccarthy 
<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

Re: [Freesurfer] Clarification about .annot file format

2018-09-28 Thread Christopher Markiewicz
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 
 on behalf of paul mccarthy 

Sent: Thursday, September 20, 2018 11:39:53 AM
To: 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
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Clarification about .annot file format

2018-09-20 Thread paul mccarthy
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
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.