Skip to content

fix: Properly reset cachedStats when cloning annotation during interpolation#2811

Open
bionoone wants to merge 1 commit into
cornerstonejs:mainfrom
bionoone:fix/interpollation
Open

fix: Properly reset cachedStats when cloning annotation during interpolation#2811
bionoone wants to merge 1 commit into
cornerstonejs:mainfrom
bionoone:fix/interpollation

Conversation

@bionoone

@bionoone bionoone commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Context

trivial fix : annotation.cachedStats => annotation.data.cachedStats

Changes & Results

Testing

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:

Summary by CodeRabbit

  • Bug Fixes
    • Corrected initialization of cached statistics for polyline interpolation annotations.
    • Ensured cached statistics are stored with the annotation’s data for more reliable annotation handling.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a48c9614-d94b-4f82-8955-0e5fe391014d

📥 Commits

Reviewing files that changed from the base of the PR and between aaf6d3b and e4e6907.

📒 Files selected for processing (1)
  • packages/tools/src/utilities/contours/interpolation/createPolylineToolData.ts

📝 Walkthrough

Walkthrough

createPolylineToolData now initializes cachedStats under annotation.data instead of the root annotation object.

Changes

Polyline annotation data

Layer / File(s) Summary
Move cached statistics into annotation data
packages/tools/src/utilities/contours/interpolation/createPolylineToolData.ts
Removes root-level cachedStats initialization and adds it to the annotation data assignment.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes context but leaves Changes & Results, Testing, and Tested Environment largely blank. Add a brief Changes & Results summary, concrete testing steps, and the OS/Node/browser environment used.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, semantic-release compliant, and accurately describes the cachedStats cloning fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant