feat: Add multithreaded Real-Time Filter Preview#122
Open
PLakhmale wants to merge 2 commits intosumit3203:masterfrom
Open
feat: Add multithreaded Real-Time Filter Preview#122PLakhmale wants to merge 2 commits intosumit3203:masterfrom
PLakhmale wants to merge 2 commits intosumit3203:masterfrom
Conversation
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.
Summary
This PR engineers a new threaded infrastructure to support real-time filter previews within the
FilterPanel. Previously, modifying aJSpinneror threshold slider forced the user to manually trigger the filter cycle. This introduces a non-blocking UI implementation that applies filters live as the user types or adjusts parameters.Architecture & Implementation
To prevent the rapid mutation of
JSpinnercomponents from freezing the Swing Event Dispatch Thread (EDT) or exhausting system compute resources, I implemented the following architecture:PreviewManagerEngine: A centralized thread controller extendingSwingWorker<Void, Void>. Backgrounds all heavy 2D convolution matrix runs off the EDT.javax.swing.Timer(250ms) into theChangeListenerinfrastructure. Rapid spinner clicks do not trigger a filter pass until the user pauses holding the UI component.Gauss2D_Filter_pipeline to skip physical disk I/O when thefilterPathparameter is explicitly null, utilizingImageProcessor.duplicate()to run math entirely in memory for instant feedback.GSoC 2026 Context
I engineered this specifically to address the GSoC 2026 Ideas List requirements for the "Real-Time Preview" project track. This PR serves as a functional, structurally complete prototype of my proposed architecture.
If accepted for the summer, my battle-plan is to scale this
PreviewManagerto seamlessly support multi-slice 3DImageStacksand systematically patch theapplyFilterlogic across the remaining 14 filters to handle non-destructive memory-only modes.