Skip to content
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

vNext brush layering to allow for overlapping segmentations. #566

Merged

Conversation

JamesAPetts
Copy link
Member

@JamesAPetts JamesAPetts commented Sep 6, 2018

Hey all,

Edit: No longer WIP. I think it has all the features we need for now packed nicely. At least until we have SVG brush support.

For now I add a UUID to the cornerstone element if its not present, we'll get a warning to remove this code when it is. The UUID PR has been merged to cornerstonejs/cornerstone#310. It will be in a semantic release soonish.

Changelog:

  • Nuked BrushEraserTool and ported its functionality into ctrl+click of BrushTool.
  • Exposed an API on the BaseBrushTool which allows the user to hide/show segmentations on an element. The config data is stored per tool/element. So you could have segmentation 5 disabled on element 0, whilst element 1's segmentation 5 is visible.
  • Hidden segmentations are displayed with a softer alpha whilst that segmentation color is actively being drawn.
    -- Made a brush-specific demo that demonstrates the tool and the API.
    -- Made a Freehand demo whilst I was at it.

Brush-specific demo:

https://deploy-preview-566--cornerstone-tools.netlify.com/examples/brush/

Freehand-specific demo:

https://deploy-preview-566--cornerstone-tools.netlify.com/examples/freehand/

@JamesAPetts JamesAPetts changed the title WIP (Experiment) - vNext experimental brush layering to allow for overlapping segmentations. WIP - vNext experimental brush layering to allow for overlapping segmentations. Sep 17, 2018
@JamesAPetts JamesAPetts changed the title WIP - vNext experimental brush layering to allow for overlapping segmentations. vNext experimental brush layering to allow for overlapping segmentations. Sep 19, 2018
@JamesAPetts JamesAPetts changed the title vNext experimental brush layering to allow for overlapping segmentations. vNext brush layering to allow for overlapping segmentations. Sep 20, 2018
@JamesAPetts JamesAPetts merged commit 1f7d41d into cornerstonejs:vNext Sep 20, 2018
@JamesAPetts JamesAPetts deleted the vNext-ExperimentalBrushLayers branch September 26, 2018 09:27
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.

1 participant