You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
…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
…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]>
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 anelement
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
andrestore
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 theimageId
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
The text was updated successfully, but these errors were encountered: