fix: New growcut (fill) implementation#5954
Open
wayfarer3130 wants to merge 6 commits into
Open
Conversation
✅ Deploy Preview for ohif-dev canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The old growcut implementation had fundamental issues working with PT type series because of the size/setup of the PT.
This is being replaced by a newer version that uses teh currently displayed image as the base image for determining the cutoff, and uses a flood fill algorithm that is bounded to give reasonable performance for clicking.
Changes & Results
CS3D_REF: fix/grow-cut-suv-pt
Checkout the referenced branch and link/build/run
Mostly changed the growcut version tag to reference the new growcut algorithm.
Testing
If you are using speckled areas (like CT brain matter), check the checkbox to use the full area, otherwise select a bright OR
dark are (high contrast with an edge), and click the circle so there is some inside, some outside regions, and you click on an included point.
Using the full area one click, just click so the circle is entirely within the mottled area.
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Greptile Summary
This PR replaces the old growcut (
RegionSegmentPlusTool) implementation with a new flood-fill based tool (RegionSegmentPlusFloodFillTool) that works correctly with PT-type series, and adds CI tooling to free a stale dev-server port before Playwright runs.RegionSegmentPlusFloodFillToolis registered in place ofRegionSegmentPlusTooleverywhere; a newsetRegionSegmentPlusFloodFillConfigurationcommand exposes Max Delta K / IJ sliders so users can bound growth in the slice and in-plane directions; acancelMeasurementaction is wired intorejectPreviewso ESC also interrupts in-flight tool operations.free-ohif-e2e-port.mjsutility kills stale processes on the dev-server port (default 3335) on macOS, Linux, and Windows; it is invoked both as a dedicated workflow step and embedded in thewebServercommand inplaywright.config.ts, so it runs twice on CI (harmless but redundant).Confidence Score: 5/5
The changes are safe to merge — the tool swap is a clean rename, the new configuration command degrades gracefully when called without parameters, and the CI port-cleanup script handles all error paths quietly.
All changed code paths handle missing data gracefully, the flood fill tool is imported from the established @cornerstonejs/tools package, and the CI additions are additive with no risk of breaking existing test infrastructure.
No files require special attention beyond the two observations noted on commandsModule.ts and toolbarButtons.ts.
Important Files Changed
Prompt To Fix All With AI
Reviews (5): Last reviewed commit: "Move server kill to different phase" | Re-trigger Greptile