4 quantus ceus mp4 analysis gui cannot proceed after roi drawing#63
4 quantus ceus mp4 analysis gui cannot proceed after roi drawing#63OmidChaghaneh wants to merge 19 commits into
Conversation
…ing signal and implementing preview transition
…4-quantus-ceus-mp4-analysis-gui-cannot-proceed-after-roi-drawing
There was a problem hiding this comment.
Pull request overview
Fixes QuantUS CEUS GUI workflow getting stuck after manual ROI/VOI drawing by wiring the “segmentation saved/loaded” flow through the model/controller and introducing the CEUS analysis-loading screens to allow navigation to continue.
Changes:
- Connect manual ROI/VOI save → segmentation load → segmentation confirmed, so the workflow can proceed past ROI drawing (Issue #4).
- Add CEUS analysis-loading MVC components and generated PyQt UI modules to support selecting/running analyses.
- Add ROI preview enhancements (CLAHE/gamma/width scaling + optional pseudocolor) and improve folder-vs-file validation in CEUS file selection.
Reviewed changes
Copilot reviewed 43 out of 44 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/qus/visualization_loading/ui/visualization_preview_2d_ui.py | Adds generated UI for 2D visualization preview screen. |
| src/qus/seg_loading/ui/seg_type_selection_ui.py | Adds generated UI for segmentation type selection. |
| src/qus/seg_loading/ui/roi_preview_ui.py | Adds generated UI for ROI preview/confirmation. |
| src/qus/seg_loading/ui/frame_selection_ui.py | Adds generated UI for frame selection. |
| src/qus/image_loading/ui/scan_type_ui.py | Adds generated UI for scan/data type selection. |
| src/qus/export_loading/ui/export_loading_ui.py | Adds generated UI for export configuration/loading. |
| src/qus/config_loading/ui/config_type_selection_ui.py | Adds generated UI for analysis config type selection. |
| src/qus/application_model.py | Adds debug prints for NIfTI load details (image/seg). |
| src/qus/analysis_loading/ui/analysis_params_ui.py | Adds generated UI for analysis params screen. |
| src/qus/analysis_loading/ui/analysis_function_selection_ui.py | Adds generated UI for analysis function selection. |
| src/ceus/seg_loading/views/draw_roi_widget.py | Adds enhancement controls + pseudocolor and enhanced-frame caching during ROI drawing. |
| src/ceus/seg_loading/ui/seg_type_selection_ui.py | Adds generated UI for CEUS segmentation type selection. |
| src/ceus/seg_loading/seg_loading_view_coordinator.py | Wires manual segmentation save to trigger loading; auto-confirms seg to unblock workflow. |
| src/ceus/seg_loading/seg_loading_controller.py | Re-enables model signal wiring to update views when segmentation loads. |
| src/ceus/image_loading/views/file_selection_widget.py | Improves “folder vs file” extension handling/validation. |
| src/ceus/image_loading/ui/scan_type_ui.py | Adds generated UI for CEUS scan type selection. |
| src/ceus/image_loading/ui/file_selection_ui.py | Adds generated UI for CEUS scan file selection. |
| src/ceus/application_model.py | Adds analysis support (worker + signals), preprocessing helpers, loader error-code handling, and NIfTI debug prints. |
| src/ceus/application_controller.py | Adds navigation into CEUS analysis-loading flow after segmentation confirmed. |
| src/ceus/analysis_loading/views/analysis_params_widget.py | Introduces CEUS analysis params widget scaffold (currently placeholder). |
| src/ceus/analysis_loading/views/analysis_function_selection_widget.py | Ports analysis function selection widget to CEUS types/imports. |
| src/ceus/analysis_loading/views/analysis_execution_widget.py | Ports analysis execution widget to CEUS types/imports. |
| src/ceus/analysis_loading/ui/analysis_params_ui.py | Adds generated UI for CEUS analysis params screen. |
| src/ceus/analysis_loading/ui/analysis_function_selection_ui.py | Adds generated UI for CEUS analysis function selection screen. |
| src/ceus/analysis_loading/ui/analysis_execution_ui.py | Adds generated UI for CEUS analysis execution screen. |
| src/ceus/analysis_loading/analysis_loading_view_coordinator.py | Ports/adjusts coordinator wiring for CEUS analysis flow and safer error handling. |
| src/ceus/analysis_loading/analysis_loading_controller.py | Selects an available CEUS analysis type and drives function/params/execution workflow. |
| .gitignore | Stops ignoring *_ui.py so generated UI modules can be committed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Enhancement parameters | ||
| self._clahe_clip_limit = 1.2 | ||
| self._gamma = 1.5 | ||
| self._use_philips_ceus = False | ||
| self._enhanced_cache = None # Cache for enhanced current frame |
There was a problem hiding this comment.
Duplicate initialization of enhancement fields (_clahe_clip_limit/_gamma) appears twice. This makes it unclear which defaults are intended and increases maintenance risk; remove the redundant block and keep a single source of truth for the default values.
| # Enhancement parameters | |
| self._clahe_clip_limit = 1.2 | |
| self._gamma = 1.5 | |
| self._use_philips_ceus = False | |
| self._enhanced_cache = None # Cache for enhanced current frame | |
| self._use_philips_ceus = False | |
| self._enhanced_cache = None # Cache for enhanced current frame |
|
|
||
| # Enhancement parameters | ||
| self._clahe_clip_limit = 1.2 | ||
| self._gamma = 1.5 |
There was a problem hiding this comment.
This second block redefines enhancement defaults that were already set a few lines above, which can easily lead to accidental divergence. Keep only one initialization block (and include _use_philips_ceus/cache fields there).
| # Enhancement parameters | |
| self._clahe_clip_limit = 1.2 | |
| self._gamma = 1.5 |
| def _create_parameter_inputs(self) -> None: | ||
| """Create input fields for each required parameter.""" | ||
| # This implementation is simplified compared to QUS for now | ||
| # Ideally would dynamically create inputs based on CEUS requirements | ||
| pass |
There was a problem hiding this comment.
_create_parameter_inputs() is currently a no-op (pass), so the UI will not render any required parameter inputs even when required_params are provided, and the widget will always emit an empty params dict. Implement this method (or remove required_params plumbing) so analysis functions that require parameters can be configured from the GUI.
|
Hey Omid, Is the goal for this PR to complete an end-to-end GUI analysis pipeline for CEUS MP4? After merging this branch with main and making some tweaks, it still appears not able to support this. Let me know what you're thinking for this PR and I can push the changes I've made so far if you think they would be helpful. Thanks, |
|
Hey David, Yes, the goal is indeed to finalize the end-to-end GUI analysis pipeline for CEUS MP4. Currently, the core pipeline is almost there and largely functional, but there are still a few refinements needed. The primary missing piece is the transition after the analysis menu. Right now, it has been tested until reaching to there. Best |
| @@ -0,0 +1,339 @@ | |||
| # Form implementation generated from reading ui file 'src\ceus\image_loading\ui\file_selection.ui' | |||
There was a problem hiding this comment.
Hey Omid, in the future, try not to add auto-generated *_ui.py files to your commits as it bloats things, the files are constantly being overwritten, and they don't contain any additional information than the source *.ui files. I'll add back to the .gitignore file to enforce this
…ckend from frontend for enhancement, put back .gitignore, updated ceus engines submodule commit ref
|
Hi Omid, I just made the view It looks like the analysis itself still has an error (specifically, I cannot generate a TIC after hitting run on the GUI without it crashing). Can you address this so that the pipeline works through analysis execution? Also, at the end of the newly implemented capabilities, if you can have a message saying that the rest of the pipeline still needs to be finished, that would be great. Thank you, |
|
Hi David, I’ve resolved the analysis execution error and refined the CEUS pipeline. The TIC crash has been fixed, and I’ve also added UI feedback to support continuation of the analysis and development. Best regards, |
#4