Skip to content

feat: cobb angle with cstools #576

Merged
laura-borghesi-lum00n merged 5 commits into
masterfrom
feat-cobbAngle
Jun 4, 2026
Merged

feat: cobb angle with cstools #576
laura-borghesi-lum00n merged 5 commits into
masterfrom
feat-cobbAngle

Conversation

@laura-borghesi-lum00n

@laura-borghesi-lum00n laura-borghesi-lum00n commented May 27, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces the Cobb Angle measurement tool to the imaging toolkit and updates the documentation to describe its usage. It also includes a patch version bump to reflect these feature additions.

Cobb Angle Tool Integration:

  • Added CobbAngleTool import and registered it in the dvTools object in imaging/tools/default.ts, enabling its use as a measurement tool. [1] [2]
  • Added a CobbAngle entry to the DEFAULT_TOOLS configuration, specifying its properties, options, and description for annotation purposes.

Documentation Updates:

  • Updated docs/examples/defaultTools.html to display instructions and information when the Cobb Angle tool is selected, describing its purpose and usage.

Other Changes:

  • Incremented the package version in package.json from 3.8.11 to 3.8.12 to reflect the new feature.
  • Minor UI improvement in docs/examples/base.html to ensure the loading spinner is hidden after all files are processed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new CobbAngle tool for measuring angles in medical imaging, including its implementation and registration in the default tools configuration. The review identified several issues regarding state management and coordinate handling. Specifically, the reviewer suggested refactoring the tool to query the cornerstone tool state directly instead of using class-level flags to avoid synchronization risks, and recommended updating the coordinate conversion logic in the distance calculation helper to ensure accuracy. Additionally, the reviewer proposed cleaning up temporary drag state properties by moving them into local scopes within callback functions.

Comment thread imaging/tools/custom/CobbAngleTool.ts Outdated
Comment thread imaging/tools/custom/CobbAngleTool.ts
Comment thread imaging/tools/custom/CobbAngleTool.ts Outdated
Comment thread imaging/tools/custom/CobbAngleTool.ts Outdated
Comment thread imaging/tools/custom/CobbAngleTool.ts Outdated
Comment thread imaging/tools/custom/CobbAngleTool.ts
Comment thread imaging/tools/custom/CobbAngleTool.ts Outdated
Comment thread imaging/tools/custom/CobbAngleTool.ts
Comment thread imaging/tools/custom/CobbAngleTool.ts Outdated
@laura-borghesi-lum00n laura-borghesi-lum00n changed the title feat: cobb angle first cstools implementation feat: cobb angle with cstools Jun 4, 2026
@laura-borghesi-lum00n laura-borghesi-lum00n marked this pull request as ready for review June 4, 2026 07:31
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Cypress Test Results

Status: ✅ All tests passed
Pass Rate: 100.00%
Total Tests: 32
Passed: 32
Failed: 0
Pending/Skipped: 0
Duration: 155.13s

📊 Test Suite Details

Suite Status Pass % Total Passed Failed Pending
Root > Testing the base.html functionalities 100.00% 13 13 0 0
Root > Larvitar DICOM Viewer 100.00% 1 1 0 0
Root > Larvitar - Default Tools Example 100.00% 3 3 0 0
Root > Larvitar DSA Rendering 100.00% 2 2 0 0
Root > Larvitar ECG Rendering 100.00% 6 6 0 0
Root > Larvitar Multiframe Rendering 100.00% 4 4 0 0
Root > Larvitar DICOM PDF Rendering 100.00% 1 1 0 0
Root > Testing the 4d.html functionalities 100.00% 2 2 0 0

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🧪 Type Coverage

93.43%

(20770 / 22230)

███████████████████░ 93.43%
Target: 90%

Top hotspots (untyped occurrences)

File Uncovered
imaging/imageRendering.ts 240
imaging/imageUtils.ts 142
imaging/parsers/nrrd.js 138
imaging/imageTools.ts 112
imaging/imageParsing.ts 100

@laura-borghesi-lum00n laura-borghesi-lum00n merged commit cb86b25 into master Jun 4, 2026
1 check passed
@laura-borghesi-lum00n laura-borghesi-lum00n deleted the feat-cobbAngle branch June 4, 2026 12:41
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