-
Notifications
You must be signed in to change notification settings - Fork 327
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 options to tool hydrate method #1776
base: main
Are you sure you want to change the base?
Conversation
- Optional referencedImageId, viewPlaneNormal, and viewUp to populate annotation metadata rather than use current viewport data. - Don't calculate spline polyline coordinates on hydration, as this only works for the current camera position, not any passed in parameters. It appears this gets recalculated on annotation render anyways, so seems to be redundant.
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…o that the correct config is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comments thanks a lot
Changes applied |
can we do the refactoring of the base class too? |
Which base tool? |
Yes, AnnotationTool, so we do something like
and in each tool you call it, since you can see the repetition of handling viewUp, viewPlaneNormal with or without options et |
Context
hydrate
methods of tools use whatever the current viewport camera properties are to populate the new annotation metadata, which may not be desired if adding an annotation to some arbitrary location in the volume or to a specific 2D image.Changes & Results
Testing
Checklist
PR
semantic-release format and guidelines.
Code
[] My code has been well-documented (function documentation, inline comments,
etc.)
[] I have run the
yarn build:update-api
to update the API documentation, and havecommitted the changes to this PR. (Read more here https://www.cornerstonejs.org/docs/contribute/update-api)
Public Documentation Updates
additions or removals.
Tested Environment