Skip to content

FIX: Annotation labels are packed RGB, not RGBA #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 1, 2018

Conversation

effigies
Copy link
Member

Contrary to FreeSurfer documentation, FreeSurfer code uses only the RGB values of colors to identify to annotation labels, ignoring the transparency value.

It is worth noting that FreeSurfer stores a transparency value, which is 255 - alpha. I'm somewhat inclined to continue returning raw transparency values, as we are not returning labeled data structures, but if people feel strongly that we should return alpha values, I'm okay with that, as well.

Fixes #649.

@coveralls
Copy link

coveralls commented Sep 27, 2018

Coverage Status

Coverage remained the same at 91.826% when pulling 7b59675 on effigies:fix/annot_labels into be35aca on nipy:master.

@codecov-io
Copy link

codecov-io commented Sep 27, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@be35aca). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #666   +/-   ##
=========================================
  Coverage          ?   88.86%           
=========================================
  Files             ?       93           
  Lines             ?    11378           
  Branches          ?     1869           
=========================================
  Hits              ?    10111           
  Misses            ?      930           
  Partials          ?      337
Impacted Files Coverage Δ
nibabel/freesurfer/io.py 94.27% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be35aca...7b59675. Read the comment docs.

@effigies
Copy link
Member Author

@pauldmccarthy Are you comfortable with these changes?

@effigies effigies changed the title [WIP] FIX: Annotation labels are packed RGB, not RGBA FIX: Annotation labels are packed RGB, not RGBA Sep 28, 2018
@effigies
Copy link
Member Author

Going by the response on the mailing list, Doug at least agrees with this interpretation.

@larsoner says it works for them over in PySurfer in #649 (comment).

Barring objection, plan to merge this fix on Monday.

@effigies
Copy link
Member Author

effigies commented Oct 1, 2018

freesurfer/freesurfer#541 has been merged, so let's get on the same page.

@effigies effigies merged commit 7877add into nipy:master Oct 1, 2018
@effigies effigies deleted the fix/annot_labels branch October 1, 2018 13:31
@pauldmccarthy
Copy link
Contributor

@effigies sorry, was away from laptop all of last week - all looks good to me, thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants