-
Notifications
You must be signed in to change notification settings - Fork 455
Keeping measurements inside displayedArea when options' flags are set #1278
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
base: master
Are you sure you want to change the base?
Keeping measurements inside displayedArea when options' flags are set #1278
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1278 +/- ##
==========================================
- Coverage 20.16% 20.16% -0.01%
==========================================
Files 287 291 +4
Lines 10102 10103 +1
Branches 2060 2041 -19
==========================================
Hits 2037 2037
- Misses 6852 6860 +8
+ Partials 1213 1206 -7
Continue to review full report at Codecov.
|
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.
During some manual tests found the following details:
-
Displayed area is image area or actually viewport? Saying that because, having flag deleteIfHandleOutsideDisplayedArea: true, I`m able to set a measurement tool if its placed inner image area but even out of viewport (what it is really displayed). Is this expected? To easily reproduce it: use pan to move image, then add a measurement starting from a visible region up to a region out of viewport but inner image area.
-
Bugs I believe: FreehandRoi tool.
2.1 For deleteIfHandleOutsideDisplayedArea: true
- Enable freehandRoi tool
- Start drawing from invalid area(outside image)
- Drawing color must change to red
- At this point you can not even cancel drawing (maybe this is another potential and not related bug)
- Force cancel drawing by changing to another selected to
Expected: FreehandRoi draw must be delete
Actual: FreehandRoi is persisted and also with a different drawing line
2.2 For preventHandleOutsideDisplayedArea: true
- Enable freehandRoi tool
- Start drawing from a valid area(inner image boundaries)
- Draw over valid area
- Drawing color must change to red
Expected: FreehandRoi drawing must be blocked to go outside
Actual: Drawing is kind of blocked, but limits looks like are different from other tools. Also after finishing a handle outside area drawing might change on an unexpectedly way
src/manipulators/moveAllHandles.js
Outdated
}, | ||
options | ||
); | ||
options = getHandleMovingOptions(options); |
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.
Is it possible to create a new variable instead of options. I know this come from old implementation, but doing this we avoid potential js reference issues.
…to feature/measurements-inside-displayed-area
@sedghi can you review + test this pull request please? for more details, check out the ticket in the issue description. |
I'm not able to replicate the behaviour that is intended here.
|
This should work since we used it in another project. @brunoalvesdefaria the usage is correct? |
…to feature/measurements-inside-displayed-area
…om:cornerstonejs/cornerstoneTools into feature/measurements-inside-displayed-area
What kind of change does this PR introduce?
Fixes Keep annotations inside displayedArea #1277
What is the current behavior?
Keep annotations inside displayedArea #1277
What is the new behavior?
New
deleteIfHandleOutsideDisplayedArea
andpreventHandleOutsideDisplayedArea
flags were created in order to prevent handles outside image's displayed area.Does this PR introduce a breaking change?
No, it will only add a new feature to control measurements outside the displayed area of the image.
Other information:
This PR will fix the problem mentioned in this issue: "Crop" image #745