feat: cobb angle with cstools #576
Conversation
There was a problem hiding this comment.
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.
🔍 Cypress Test ResultsStatus: ✅ All tests passed 📊 Test Suite Details
|
🧪 Type Coverage93.43% ✅
███████████████████░ 93.43% Top hotspots (untyped occurrences)
|
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:
CobbAngleToolimport and registered it in thedvToolsobject inimaging/tools/default.ts, enabling its use as a measurement tool. [1] [2]CobbAngleentry to theDEFAULT_TOOLSconfiguration, specifying its properties, options, and description for annotation purposes.Documentation Updates:
docs/examples/defaultTools.htmlto display instructions and information when the Cobb Angle tool is selected, describing its purpose and usage.Other Changes:
package.jsonfrom3.8.11to3.8.12to reflect the new feature.docs/examples/base.htmlto ensure the loading spinner is hidden after all files are processed.