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

Add imageId specific toolState without element #1150

Closed
mikehazell opened this issue Dec 19, 2019 · 0 comments
Closed

Add imageId specific toolState without element #1150

mikehazell opened this issue Dec 19, 2019 · 0 comments

Comments

@mikehazell
Copy link
Contributor

mikehazell commented Dec 19, 2019

Description

In our application we often have a set of annotations across multiple images for one or more image stacks. These need to be added sometimes one at a time and sometimes as a bulk operation.

We can't use the addImageIdSpecificToolState method because it uses an element to find the current imageId. Usually we are adding this state when a different image is displaying or no image is displaying at all.

As we already know the imageId we can add all annotations for an image stack or multiple image stacks directly to the state manager.

I'm aware of the save and restore methods but these require our application to have a deeper understanding of the inner workings of the toolStateManager than I would like.

Currently we use a modified version of addImageIdSpecificToolState which takes the imageId rather than an element as the first argument.

I think it would make sense for this to be part of cornerstone-tools core.

Thoughts and feedback on this approach and its usefulness would be appreciated.

PR: #1151

mikehazell added a commit to mikehazell/cornerstoneTools that referenced this issue Dec 19, 2019
…lState via imageId

Expose [get|add|clear]ImageIdToolstate methods which allow managing imageId specific toolState
without needing an element with the image loaded.

cornerstonejs#1150
dannyrb added a commit that referenced this issue Jan 21, 2020
…lState via imageId (#1151)

Expose [get|add|clear]ImageIdToolstate methods which allow managing imageId specific toolState
without needing an element with the image loaded.

#1150

Co-authored-by: Danny Brown <[email protected]>
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

No branches or pull requests

1 participant