Skip to content

Fix(lengthtool) autodelete#2708

Open
bionoone wants to merge 2 commits into
cornerstonejs:mainfrom
bionoone:fix/lengthtool_autodelete
Open

Fix(lengthtool) autodelete#2708
bionoone wants to merge 2 commits into
cornerstonejs:mainfrom
bionoone:fix/lengthtool_autodelete

Conversation

@bionoone

Copy link
Copy Markdown
Contributor

Context

in commit 20efd77#diff-4bdf7112153ce30f1829f12a4e4899bcf36b964d578c23c5c0e82235f8e166f3

there is a change in convertion from transformWorldToIndex that perform a integer index conversion in favor of imageData.worldToIndex that perform continuous index conversion.

This has an impact on annotation drawn on stack viewport, where z extend is from 0 to 1.

due to conversion, the z coordinate could become something -1e-5 leading to some side effect when preventHandleOutsideImage option is on.

Changes & Results

added a tollerance of EPSILON in new method indexAlmostWithinDimensions

Testing

add karma test exhibiting the defect

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • "OS:
  • "Node version:
  • "Browser:

Comment thread .husky/pre-commit Outdated
@@ -1 +1 @@
yarn lint-staged
bun lint-staged

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please revert

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@bionoone bionoone force-pushed the fix/lengthtool_autodelete branch from 110c404 to 67b34dc Compare April 27, 2026 11:39
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

Successfully merging this pull request may close these issues.

2 participants