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

Fix some publish/create SR using dcmjs #1442

Merged

Conversation

wayfarer3130
Copy link
Contributor

This is a bug fix to add support for saving and recreating the cornerstone tools markups, in particular the cobb angle and rectangel roi tools.
This is not a breaking change.
Adding unit tests for cobb angle, and for the rectangeroi

@@ -124,12 +124,14 @@ export default class CobbAngleTool extends BaseAnnotationTool {
return false;
}

return (
const seg1Near =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just some tidying to make it easier to debug.

@codecov
Copy link

codecov bot commented Oct 22, 2021

Codecov Report

Merging #1442 (e7a9095) into master (1bd6e17) will increase coverage by 0.38%.
The diff coverage is 12.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1442      +/-   ##
==========================================
+ Coverage   19.76%   20.15%   +0.38%     
==========================================
  Files         286      286              
  Lines       10082    10097      +15     
  Branches     2052     2056       +4     
==========================================
+ Hits         1993     2035      +42     
+ Misses       6878     6851      -27     
  Partials     1211     1211              
Impacted Files Coverage Δ
src/tools/annotation/ProbeTool.js 52.77% <0.00%> (ø)
src/util/findAndMoveHelpers.js 8.33% <0.00%> (-1.35%) ⬇️
src/tools/annotation/CobbAngleTool.js 26.47% <5.88%> (+26.47%) ⬆️
src/tools/annotation/RectangleRoiTool.js 43.39% <100.00%> (+0.72%) ⬆️
src/util/lineSegDistance.js 100.00% <0.00%> (+100.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bd6e17...e7a9095. Read the comment docs.

@@ -26,14 +28,27 @@ const moveHandleNearImagePoint = function(
) {
toolData.active = true;
state.isToolLocked = true;
const doneHandler = success => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fire a completed event when the user is done modifying a completed/existing handle, in order to allow updating anything listening. That allows saving the right values into a TID.300 object.

@wayfarer3130 wayfarer3130 force-pushed the fix/cobbAngleRestoreFix branch from 1833b36 to 1a5afd6 Compare October 22, 2021 20:09
…th the TID.300 saving changes.

Correct notification on tool completion, with values restored correctly when loaded from TID.300 is
required for store/save functionality.  This is implemented in dcmjs, but the changes are required
here.  The cobb angle needed to be udpated after restoring, the Rectangle ROI needed the perimeter,
and changes needed to publish a completed measurement event.
@wayfarer3130 wayfarer3130 force-pushed the fix/cobbAngleRestoreFix branch from 1a5afd6 to 8f13fa9 Compare October 25, 2021 11:46
wayfarer3130 and others added 2 commits October 25, 2021 09:31
The existing test only checked negative tests, adding tests for point is near tool.
@igoroctaviano igoroctaviano self-requested a review October 25, 2021 21:13
Copy link
Contributor

@igoroctaviano igoroctaviano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igoroctaviano igoroctaviano merged commit f518bd8 into cornerstonejs:master Oct 25, 2021
@dannyrb
Copy link
Member

dannyrb commented Oct 25, 2021

🎉 This PR is included in version 6.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@wayfarer3130 wayfarer3130 deleted the fix/cobbAngleRestoreFix branch October 25, 2021 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants