fix(annotation): stabilize planar freehand ROI statistics for oblique volume data - #2718
fix(annotation): stabilize planar freehand ROI statistics for oblique volume data#2718Devu-trenser wants to merge 4 commits into
Conversation
|
@sedghi Could you please take a look at this PR? |
37b9f9c to
6a00e71
Compare
5fc9b35 to
c26fe97
Compare
|
@sedghi Could you please review the changes? |
| */ | ||
| const TOLERANCE = 0.5; | ||
|
|
||
| const isOblique = |
There was a problem hiding this comment.
This isn't a good oblique detection - to do this correctly, you will have to use the dot product of the VPN with the view plane normal of the images. Perhaps oblique isn't what you want to detect? By oblique, I mean that the VPN of the display isn't orthogonal and isn't co-linear with the image VPN.
There is another PR that converts the internal points to use single-voxel delta distances - I THINK that one will just address this change directly without you needing to do anything here, but I don't really know. The way it works is that it converts everything to a voxel-relative x/y "canvas" like space to perform the calculations.
wayfarer3130
left a comment
There was a problem hiding this comment.
@sedghi - I think we should reject this PR in favour of fixing the oblique tests to use the voxel-centric x/y two dimensional coordinate system instead as that fixes it fundamentally rather than a work around.
|
The PR I'm thinking of that was just recently merged is https://github.com/cornerstonejs/cornerstone3D/pull/2717/changes |
|
This issue is not fixed as part of PR https://github.com/cornerstonejs/cornerstone3D/pull/2717/changes. However, it has been resolved in the open PR #2744. We verified the fix locally by linking against the branch @wayfarer3130, could you please confirm whether we can close this PR in favor of the changes implemented in https://github.com/cornerstonejs/cornerstone3D/pull/2744/changes#diff-30e53f5adb45d004036f0a67ea62e0729ce6f25b65136476867fc977ad5fabf0R954 A reference video has been attached for verification. PR-2718-Resolved.mp4 |
Context
Fixes issue: #2386
Fixes an issue where Closed Freehand ROI statistics could become inconsistent or invalid when viewing annotations on oblique volume data.
The problem was caused by floating-point precision differences during scanline processing in worldToCanvas projection space.
Small subpixel variations in canvas Y coordinates caused repeated scanline resets during voxel traversal, which could result in:
Changes & Results
Before
After
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment