Skip to content

Conversation

@JamesAPetts
Copy link
Member

This PR adds easy api methods to change the individual segment LUTs of the labelmap of the View2D component.

api.setSegmentRGBA(segmentIndex, [red, green, blue, alpha])
api.setSegmentRGB(segmentIndex, [red, green, blue])
api.setSegmentAlpha(segmentIndex, alpha)

I also added a helper that mirrors Cornerstone's cornerstone.updateImage(enabledElement) function for forcing a re-render, as it ends up being used a lot:

api.updateImage()

TODO: Checked it works in console, but a demo for this would be nice.

@JamesAPetts JamesAPetts changed the title Color lu tapi Color LUT api Jan 15, 2020
@JamesAPetts JamesAPetts merged commit 5d71b4b into OHIF:master Jan 15, 2020
@ohif-bot
Copy link
Member

🎉 This PR is included in version 0.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants