Skip to content

feat(paint): add fill between slice interpolation#726

Merged
floryst merged 4 commits intoKitware:mainfrom
PaulHax:interpolate
May 2, 2025
Merged

feat(paint): add fill between slice interpolation#726
floryst merged 4 commits intoKitware:mainfrom
PaulHax:interpolate

Conversation

@PaulHax
Copy link
Collaborator

@PaulHax PaulHax commented Mar 31, 2025

image

  • Do interpolation
  • Reset state on switching images, segment groups, and segment
  • Disable painting when in fill between mode

@netlify
Copy link

netlify bot commented Mar 31, 2025

Deploy Preview for volview-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bdecfcf
🔍 Latest deploy log https://app.netlify.com/sites/volview-dev/deploys/6813bbaa1bc98000076e2086
😎 Deploy Preview https://deploy-preview-726--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@PaulHax
Copy link
Collaborator Author

PaulHax commented Mar 31, 2025

Thoughts on this GUI? @floryst and/or anyone?

@floryst
Copy link
Contributor

floryst commented Apr 1, 2025

How does it compare to Slicer's paint interpolation UX? How will the preview/confirm/cancel functionality work?

@PaulHax
Copy link
Collaborator Author

PaulHax commented Apr 1, 2025

Here is how Slicer does it:
https://youtu.be/u93kI1MG6Ic?si=YY6uQeepcrtENOW0

  1. Preview will run the interpolation code, "stash" the original seg image while swapping in new seg image.
  2. Conferm keeps the new image, drops orignal.
  3. Cancel drops new, swaps in original.

A video:
https://youtu.be/snA5B1MCgew

@PaulHax PaulHax force-pushed the interpolate branch 4 times, most recently from 99149eb to 938e54b Compare April 16, 2025 17:21
@PaulHax PaulHax force-pushed the interpolate branch 2 times, most recently from 6e850d6 to b3c5e97 Compare April 24, 2025 15:56
@PaulHax PaulHax requested a review from Copilot April 24, 2025 16:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the "Fill Between" feature for painting by adding slice interpolation functionality and updating the paint tool behavior accordingly. Key changes include:

  • Adding a new pipeline configuration for morphological contour interpolation in vite.config.ts.
  • Introducing a new fillBetween store and updating the PaintMode enum and related logic in the paint tool code.
  • Modifying UI components to integrate the new Fill Between mode and its controls.

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vite.config.ts Adds pipeline configuration for morphological contour interpolation.
src/store/tools/paint.ts Removes the export of ensureActiveSegmentGroupForImage from the paint store.
src/store/tools/fillBetween.ts Introduces a new store for Fill Between functionality.
src/core/tools/paint/index.ts Updates PaintMode enum and modifies stroke handling for Fill Between.
src/components/tools/paint/PaintWidget2D.vue Adds reactive disabling of the widget for Fill Between mode.
src/components/tools/paint/PaintTool.vue Updates active mode computation to account for Fill Between mode.
src/components/PaintControls.vue Integrates a new Fill Between button and layout adjustments.
src/components/MiniExpansionPanel.vue Introduces a reusable expansion panel component.
src/components/FillBetweenControls.vue Provides controls for previewing, confirming, and canceling fill actions.
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (2)

src/store/tools/paint.ts:254

  • The removal of 'ensureActiveSegmentGroupForImage' from the store's returned API may impact dependent modules; please confirm that all consumers have been updated accordingly.
    ensureActiveSegmentGroupForImage,

src/core/tools/paint/index.ts:80

  • The early return for PaintMode.FillBetween bypasses brush value processing; please verify that this behavior is intentional and does not affect other expected fill operations.
if (this.brushValue == null || this.mode === PaintMode.FillBetween) return;

@PaulHax PaulHax marked this pull request as ready for review April 24, 2025 17:20
@PaulHax PaulHax requested a review from floryst April 24, 2025 18:30
@floryst floryst added this pull request to the merge queue May 2, 2025
Merged via the queue into Kitware:main with commit 40a07f7 May 2, 2025
7 checks passed
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.

3 participants