From e94b4eca833c7d3032709f4903e5ff7f0210f035 Mon Sep 17 00:00:00 2001 From: Anirudh Kannan <137168478+akannan05@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:18:28 -0800 Subject: [PATCH 01/61] pyradiomics fix + docs update --- README.md | 1 + requirements.txt | Bin 1504 -> 1464 bytes 2 files changed, 1 insertion(+) diff --git a/README.md b/README.md index efc6d38..c719c48 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ source .venv/bin/activate # Unix pip install --upgrade pip setuptools wheel pip install numpy pip install -r requirements.txt +pip install pyradiomics==3.0.1 --no-build-isolation ./saveQt.sh # Unix .\saveQt.sh # Windows (cmd) ``` diff --git a/requirements.txt b/requirements.txt index 72cc653137f7601af447957f3cb6862e104562e8..97b7a0728b83956946b21b276a6885c2b2128b61 100644 GIT binary patch delta 12 TcmaFBy@PwhGv>{FESDGoBisbw delta 40 tcmdnN{eXMJGiK=`hD3%GhD?ThhFl<-%uvi=3xviDdJG1eZ!+I!1OVzn3YY)@ From 96a8aaeee1c0c46d0c545d14c660b8952e7c7a13 Mon Sep 17 00:00:00 2001 From: Haseeb Garfinkel Date: Thu, 18 Dec 2025 15:42:31 -0800 Subject: [PATCH 02/61] readme update for new repo link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c719c48..b0dfdac 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Note that the GUI in this repository is incomplete. Specifically, the QUS GUI do To clone this repository, run ```shell -git clone --recurse-submodules https://github.com/TUL-Dev/QuantUS.git +git clone --recurse-submodules https://github.com/QuantUS-OpenSource/QuantUS.git ``` To set up the Python virtual environment and install dependencies to run QuantUS, run the following commands. Let `PYTHON311` be the path to your Python3.11 interpreter. From 9cae10cee792c03e35bb1dacac35f6b62d3b1ef9 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 12:40:02 +0100 Subject: [PATCH 03/61] Add DICOM overlay foundation for RF ultrasound imaging --- engines/qus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/qus b/engines/qus index d5adeb5..11e1923 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit d5adeb5f6bd5e8d323a5b45bfcc066e334e8ef4d +Subproject commit 11e1923adaba17f1c354f1e2e5f74900b25bfa32 From c05d84884b617d2bb4e58d3cf4f550fe1416d4fb Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 13:13:01 +0100 Subject: [PATCH 04/61] Reset to original state before DICOM overlay implementation --- engines/qus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/qus b/engines/qus index 11e1923..d5adeb5 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit 11e1923adaba17f1c354f1e2e5f74900b25bfa32 +Subproject commit d5adeb5f6bd5e8d323a5b45bfcc066e334e8ef4d From 402b54f4b9602587fd368d0f05c49a08d7c72657 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 13:17:23 +0100 Subject: [PATCH 05/61] Implement complete DICOM overlay functionality for ROI drawing --- src/qus/seg_loading/ui/roi_drawing.ui | 146 +++++++++++++++++ .../seg_loading/views/roi_drawing_widget.py | 147 +++++++++++++++++- 2 files changed, 291 insertions(+), 2 deletions(-) diff --git a/src/qus/seg_loading/ui/roi_drawing.ui b/src/qus/seg_loading/ui/roi_drawing.ui index c48c472..eadb145 100644 --- a/src/qus/seg_loading/ui/roi_drawing.ui +++ b/src/qus/seg_loading/ui/roi_drawing.ui @@ -874,6 +874,152 @@ + + + + 10 + + + + + + 200 + 41 + + + + + 200 + 41 + + + + QCheckBox { + color: rgb(255, 255, 255); + font-size: 15px; + background-color: rgba(255, 255, 255, 0); + border: 0px; +} +QCheckBox::indicator { + width: 20px; + height: 20px; + border-radius: 10px; + background-color: rgb(90, 37, 255); + border: 2px solid rgb(255, 255, 255); +} +QCheckBox::indicator:checked { + background-color: rgb(90, 37, 255); + border: 2px solid rgb(255, 255, 255); +} + + + Show DICOM Overlay + + + + + + + + 100 + 41 + + + + + 100 + 41 + + + + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + Transparency: + + + Qt::AlignRight|Qt::AlignVCenter + + + + + + + + 200 + 41 + + + + + 200 + 41 + + + + QSlider::groove:horizontal { + border: 1px solid #999999; + height: 8px; + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4); + margin: 2px 0; +} +QSlider::handle:horizontal { + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); + border: 1px solid #5c5c5c; + width: 18px; + margin: 2px 0; + border-radius: 3px; +} + + + 0 + + + 100 + + + 50 + + + Qt::Horizontal + + + + + + + + 40 + 41 + + + + + 40 + 41 + + + + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + 50 + + + Qt::AlignCenter + + + + + diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index 4667bad..54a5b95 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -12,7 +12,7 @@ import scipy.interpolate as interpolate from PyQt6.QtCore import pyqtSignal, Qt -from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QLabel, QVBoxLayout +from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QLabel, QVBoxLayout, QCheckBox from src.qus.mvc.base_view import BaseViewMixin from src.qus.seg_loading.ui.roi_drawing_ui import Ui_constructRoi @@ -65,6 +65,15 @@ def __init__(self, image_data: UltrasoundRfImage, frame: int = 0, brightness: in # Drawing parameters self._min_point_distance = 5.0 # Minimum distance between points in pixels + + # DICOM overlay control variables + self._dicom_overlay_checkbox: Optional[QCheckBox] = None + self._transparency_slider: Optional[QSlider] = None + self._transparency_label: Optional[QLabel] = None + self._transparency_value_label: Optional[QLabel] = None + self._overlay_enabled = False # Track if overlay is currently enabled + self._transparency_value = 50 # Default transparency (0-100) + self._original_bmode_im = None # Store original B-mode for overlay blending self._setup_ui() self._connect_signals() @@ -147,6 +156,65 @@ def get_min_point_distance(self) -> float: """ return self._min_point_distance + def _apply_dicom_overlay(self, bmode_image: np.ndarray) -> np.ndarray: + """ + Apply DICOM overlay with adjustable transparency to B-mode image. + + Args: + bmode_image: The RF-derived B-mode image to blend with DICOM + + Returns: + Blended image with DICOM overlay applied if enabled, otherwise original B-mode + """ + if not self._overlay_enabled or not self._image_data.dicom_available: + return bmode_image + + if self._image_data.dicom_image is None: + return bmode_image + + try: + # Get transparency value (0-100) and convert to alpha (0.0-1.0) + alpha = self._transparency_value / 100.0 + + # Ensure both images have the same shape + dicom_im = self._image_data.dicom_image + if dicom_im.shape != bmode_image.shape: + # Resize DICOM to match B-mode if needed + from skimage.transform import resize + dicom_im = resize(dicom_im, bmode_image.shape, preserve_range=True, anti_aliasing=True) + dicom_im = dicom_im.astype(np.uint8) + + # Normalize both images to 0-255 range if needed + bmode_norm = bmode_image.astype(np.float32) + dicom_norm = dicom_im.astype(np.float32) + + # Apply alpha blending: output = (1-alpha) * Bmode + alpha * DICOM + blended = (1.0 - alpha) * bmode_norm + alpha * dicom_norm + + # Clip and convert back to uint8 + blended = np.clip(blended, 0, 255).astype(np.uint8) + + return blended + + except Exception as e: + print(f"Warning: Failed to apply DICOM overlay: {e}") + return bmode_image + + def _update_overlay_display(self) -> None: + """ + Update the display when overlay settings change. + This method handles the real-time overlay updates. + """ + if self._original_bmode_im is not None: + # Apply overlay to the original B-mode image + self._displayed_im = self._apply_dicom_overlay(self._original_bmode_im.copy()) + + # Apply brightness adjustment on top of the blended image + self._apply_brightness_adjustment() + + # Update the display + self._update_display() + def _update_drawing_status(self) -> None: """Update the drawing status to show current settings.""" if self._current_drawing_mode == 'points': @@ -223,6 +291,9 @@ def _setup_ui(self) -> None: # Add brightness control self._setup_brightness_control() + # Add DICOM overlay control + self._setup_dicom_overlay_control() + # Display image for ROI drawing self._display_image_for_roi() @@ -306,6 +377,43 @@ def _setup_brightness_control(self) -> None: # Insert it at the beginning of the layout (after the title) self._ui.draw_roi_layout.insertLayout(1, brightness_layout) + def _setup_dicom_overlay_control(self) -> None: + """Setup DICOM overlay control checkbox and transparency slider.""" + # Get references to the UI controls from the .ui file + self._dicom_overlay_checkbox = self._ui.findChild(QCheckBox, "dicom_overlay_checkbox") + self._transparency_slider = self._ui.findChild(QSlider, "transparency_slider") + self._transparency_label = self._ui.findChild(QLabel, "transparency_label") + self._transparency_value_label = self._ui.findChild(QLabel, "transparency_value_label") + + # Check if DICOM overlay is available and show/hide controls accordingly + if not self._image_data.dicom_available: + # Hide overlay controls if DICOM is not available + if self._dicom_overlay_checkbox: + self._dicom_overlay_checkbox.hide() + if self._transparency_slider: + self._transparency_slider.hide() + if self._transparency_label: + self._transparency_label.hide() + if self._transparency_value_label: + self._transparency_value_label.hide() + else: + # Show overlay controls and set initial values + if self._dicom_overlay_checkbox: + self._dicom_overlay_checkbox.show() + self._dicom_overlay_checkbox.setChecked(False) # Start with overlay disabled + + if self._transparency_slider: + self._transparency_slider.show() + self._transparency_slider.setValue(50) # Default transparency + self._transparency_slider.setEnabled(False) # Disabled until overlay is enabled + + if self._transparency_label: + self._transparency_label.show() + + if self._transparency_value_label: + self._transparency_value_label.show() + self._transparency_value_label.setText("50") + def _connect_signals(self) -> None: """Connect UI signals to internal handlers.""" self._ui.back_button.clicked.connect(self.back_requested.emit) @@ -324,6 +432,12 @@ def _connect_signals(self) -> None: # Connect brightness slider if self._brightness_slider: self._brightness_slider.valueChanged.connect(self._on_brightness_changed) + + # Connect DICOM overlay controls + if self._dicom_overlay_checkbox: + self._dicom_overlay_checkbox.toggled.connect(self._on_overlay_toggled) + if self._transparency_slider: + self._transparency_slider.valueChanged.connect(self._on_transparency_changed) def _on_brightness_changed(self, value: int) -> None: """Handle brightness slider change.""" @@ -333,6 +447,27 @@ def _on_brightness_changed(self, value: int) -> None: self._apply_brightness_adjustment() self._update_display() + def _on_overlay_toggled(self, checked: bool) -> None: + """Handle DICOM overlay checkbox toggle.""" + self._overlay_enabled = checked + + # Enable/disable transparency slider based on overlay state + if self._transparency_slider: + self._transparency_slider.setEnabled(checked) + + # Update display with new overlay state + self._update_overlay_display() + + def _on_transparency_changed(self, value: int) -> None: + """Handle transparency slider change.""" + self._transparency_value = value + if self._transparency_value_label: + self._transparency_value_label.setText(str(value)) + + # Update display if overlay is enabled + if self._overlay_enabled: + self._update_overlay_display() + def _apply_brightness_adjustment(self) -> None: """Apply brightness adjustment to the displayed image using exponential function.""" if self._original_displayed_im is None: @@ -415,12 +550,20 @@ def _display_image_for_roi(self) -> None: im = self._image_data.sc_bmode if self._image_data.sc_bmode is not None else self._image_data.bmode if im.ndim == 2: self._original_displayed_im = im.copy() + self._original_bmode_im = im.copy() # Store original B-mode for overlay else: if self._frame < 0 or self._frame >= im.shape[0]: raise ValueError(f"Frame {self._frame} is out of bounds for image with {im.shape[0]} frames") self._original_displayed_im = im[self._frame].copy() + self._original_bmode_im = im[self._frame].copy() # Store original B-mode for overlay + + # Apply DICOM overlay first (if enabled) + if self._overlay_enabled: + self._displayed_im = self._apply_dicom_overlay(self._original_bmode_im.copy()) + else: + self._displayed_im = self._original_bmode_im.copy() - # Apply initial brightness adjustment + # Apply brightness adjustment on top self._apply_brightness_adjustment() self._plot_im_on_ax(self._ax) From 7c1c66a3c2a8f792546d09c7ab4f006f757050d4 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 13:18:10 +0100 Subject: [PATCH 06/61] Update submodule with DICOM overlay functionality --- engines/qus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/qus b/engines/qus index d5adeb5..70c4d35 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit d5adeb5f6bd5e8d323a5b45bfcc066e334e8ef4d +Subproject commit 70c4d35576a8786e3c8b608814f9dc6683e68c2f From fd1271f0d314f08cd0562d8d0ba69e5e20294128 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 13:21:07 +0100 Subject: [PATCH 07/61] Fix DICOM overlay control access error --- src/qus/seg_loading/views/roi_drawing_widget.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index 54a5b95..9e4104c 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -380,10 +380,10 @@ def _setup_brightness_control(self) -> None: def _setup_dicom_overlay_control(self) -> None: """Setup DICOM overlay control checkbox and transparency slider.""" # Get references to the UI controls from the .ui file - self._dicom_overlay_checkbox = self._ui.findChild(QCheckBox, "dicom_overlay_checkbox") - self._transparency_slider = self._ui.findChild(QSlider, "transparency_slider") - self._transparency_label = self._ui.findChild(QLabel, "transparency_label") - self._transparency_value_label = self._ui.findChild(QLabel, "transparency_value_label") + self._dicom_overlay_checkbox = self._ui.dicom_overlay_checkbox + self._transparency_slider = self._ui.transparency_slider + self._transparency_label = self._ui.transparency_label + self._transparency_value_label = self._ui.transparency_value_label # Check if DICOM overlay is available and show/hide controls accordingly if not self._image_data.dicom_available: From ad887dd677b71ff380a204592934b521246b0fc4 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 13:23:18 +0100 Subject: [PATCH 08/61] Create DICOM overlay controls programmatically to fix UI access issue --- .../seg_loading/views/roi_drawing_widget.py | 127 ++++++++++++++---- 1 file changed, 99 insertions(+), 28 deletions(-) diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index 9e4104c..d55e9bb 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -379,40 +379,111 @@ def _setup_brightness_control(self) -> None: def _setup_dicom_overlay_control(self) -> None: """Setup DICOM overlay control checkbox and transparency slider.""" - # Get references to the UI controls from the .ui file - self._dicom_overlay_checkbox = self._ui.dicom_overlay_checkbox - self._transparency_slider = self._ui.transparency_slider - self._transparency_label = self._ui.transparency_label - self._transparency_value_label = self._ui.transparency_value_label + # Create DICOM overlay controls programmatically since they're not in the UI file + from PyQt6.QtWidgets import QCheckBox, QSlider, QLabel + + # Create checkbox + self._dicom_overlay_checkbox = QCheckBox("Show DICOM Overlay") + self._dicom_overlay_checkbox.setMinimumSize(200, 41) + self._dicom_overlay_checkbox.setMaximumSize(200, 41) + self._dicom_overlay_checkbox.setStyleSheet(""" + QCheckBox { + color: rgb(255, 255, 255); + font-size: 15px; + background-color: rgba(255, 255, 255, 0); + border: 0px; + } + QCheckBox::indicator { + width: 20px; + height: 20px; + border-radius: 10px; + background-color: rgb(90, 37, 255); + border: 2px solid rgb(255, 255, 255); + } + QCheckBox::indicator:checked { + background-color: rgb(90, 37, 255); + border: 2px solid rgb(255, 255, 255); + } + """) + + # Create transparency label + self._transparency_label = QLabel("Transparency:") + self._transparency_label.setMinimumSize(100, 41) + self._transparency_label.setMaximumSize(100, 41) + self._transparency_label.setStyleSheet(""" + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + } + """) + self._transparency_label.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter) + + # Create transparency slider + self._transparency_slider = QSlider() + self._transparency_slider.setMinimumSize(200, 41) + self._transparency_slider.setMaximumSize(200, 41) + self._transparency_slider.setOrientation(Qt.Orientation.Horizontal) + self._transparency_slider.setMinimum(0) + self._transparency_slider.setMaximum(100) + self._transparency_slider.setValue(50) + self._transparency_slider.setStyleSheet(""" + QSlider::groove:horizontal { + border: 1px solid #999999; + height: 8px; + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4); + margin: 2px 0; + } + QSlider::handle:horizontal { + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); + border: 1px solid #5c5c5c; + width: 18px; + margin: 2px 0; + border-radius: 3px; + } + """) + + # Create transparency value label + self._transparency_value_label = QLabel("50") + self._transparency_value_label.setMinimumSize(40, 41) + self._transparency_value_label.setMaximumSize(40, 41) + self._transparency_value_label.setStyleSheet(""" + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + } + """) + self._transparency_value_label.setAlignment(Qt.AlignmentFlag.AlignCenter) + + # Create layout for overlay controls + overlay_layout = QHBoxLayout() + overlay_layout.setSpacing(10) + overlay_layout.addWidget(self._dicom_overlay_checkbox) + overlay_layout.addWidget(self._transparency_label) + overlay_layout.addWidget(self._transparency_slider) + overlay_layout.addWidget(self._transparency_value_label) + + # Insert the overlay layout into the main ROI layout + self._ui.draw_roi_layout.insertLayout(2, overlay_layout) # Check if DICOM overlay is available and show/hide controls accordingly if not self._image_data.dicom_available: # Hide overlay controls if DICOM is not available - if self._dicom_overlay_checkbox: - self._dicom_overlay_checkbox.hide() - if self._transparency_slider: - self._transparency_slider.hide() - if self._transparency_label: - self._transparency_label.hide() - if self._transparency_value_label: - self._transparency_value_label.hide() + self._dicom_overlay_checkbox.hide() + self._transparency_slider.hide() + self._transparency_label.hide() + self._transparency_value_label.hide() else: # Show overlay controls and set initial values - if self._dicom_overlay_checkbox: - self._dicom_overlay_checkbox.show() - self._dicom_overlay_checkbox.setChecked(False) # Start with overlay disabled - - if self._transparency_slider: - self._transparency_slider.show() - self._transparency_slider.setValue(50) # Default transparency - self._transparency_slider.setEnabled(False) # Disabled until overlay is enabled - - if self._transparency_label: - self._transparency_label.show() - - if self._transparency_value_label: - self._transparency_value_label.show() - self._transparency_value_label.setText("50") + self._dicom_overlay_checkbox.show() + self._dicom_overlay_checkbox.setChecked(False) # Start with overlay disabled + self._transparency_slider.show() + self._transparency_slider.setValue(50) # Default transparency + self._transparency_slider.setEnabled(False) # Disabled until overlay is enabled + self._transparency_label.show() + self._transparency_value_label.show() + self._transparency_value_label.setText("50") def _connect_signals(self) -> None: """Connect UI signals to internal handlers.""" From 0b913bce28c726c4ce201c907cc98e3c1140eb49 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 13:25:52 +0100 Subject: [PATCH 09/61] Add fallback approach for DICOM overlay controls with UI file support --- .../seg_loading/views/roi_drawing_widget.py | 43 ++++++++++++++++--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index d55e9bb..36b1b46 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -379,7 +379,38 @@ def _setup_brightness_control(self) -> None: def _setup_dicom_overlay_control(self) -> None: """Setup DICOM overlay control checkbox and transparency slider.""" - # Create DICOM overlay controls programmatically since they're not in the UI file + # Get references to the UI controls from the .ui file + # These should be available after we add them to the UI file + try: + self._dicom_overlay_checkbox = self._ui.dicom_overlay_checkbox + self._transparency_slider = self._ui.transparency_slider + self._transparency_label = self._ui.transparency_label + self._transparency_value_label = self._ui.transparency_value_label + except AttributeError: + # If controls don't exist in UI, create them programmatically as fallback + self._create_overlay_controls_programmatically() + return + + # Check if DICOM overlay is available and show/hide controls accordingly + if not self._image_data.dicom_available: + # Hide overlay controls if DICOM is not available + self._dicom_overlay_checkbox.hide() + self._transparency_slider.hide() + self._transparency_label.hide() + self._transparency_value_label.hide() + else: + # Show overlay controls and set initial values + self._dicom_overlay_checkbox.show() + self._dicom_overlay_checkbox.setChecked(False) # Start with overlay disabled + self._transparency_slider.show() + self._transparency_slider.setValue(50) # Default transparency + self._transparency_slider.setEnabled(False) # Disabled until overlay is enabled + self._transparency_label.show() + self._transparency_value_label.show() + self._transparency_value_label.setText("50") + + def _create_overlay_controls_programmatically(self) -> None: + """Create DICOM overlay controls programmatically as fallback.""" from PyQt6.QtWidgets import QCheckBox, QSlider, QLabel # Create checkbox @@ -467,20 +498,18 @@ def _setup_dicom_overlay_control(self) -> None: # Insert the overlay layout into the main ROI layout self._ui.draw_roi_layout.insertLayout(2, overlay_layout) - # Check if DICOM overlay is available and show/hide controls accordingly + # Apply visibility logic if not self._image_data.dicom_available: - # Hide overlay controls if DICOM is not available self._dicom_overlay_checkbox.hide() self._transparency_slider.hide() self._transparency_label.hide() self._transparency_value_label.hide() else: - # Show overlay controls and set initial values self._dicom_overlay_checkbox.show() - self._dicom_overlay_checkbox.setChecked(False) # Start with overlay disabled + self._dicom_overlay_checkbox.setChecked(False) self._transparency_slider.show() - self._transparency_slider.setValue(50) # Default transparency - self._transparency_slider.setEnabled(False) # Disabled until overlay is enabled + self._transparency_slider.setValue(50) + self._transparency_slider.setEnabled(False) self._transparency_label.show() self._transparency_value_label.show() self._transparency_value_label.setText("50") From 9708164d842bef9ddeace4f20d8debb532f39c96 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 15:05:38 +0100 Subject: [PATCH 10/61] Add manual DICOM file loading with transparent overlay - Add 'Load DICOM File' button in ROI selection menu - Implement file dialog for DICOM selection - Add transparency slider with 0-100% control - 0% shows pure B-mode, 100% shows pure DICOM - Fix brightness adjustment to preserve overlay - Remove debug print statements --- src/qus/seg_loading/ui/roi_drawing.ui | 34 ++++++ .../seg_loading/views/roi_drawing_widget.py | 112 +++++++++++++++--- 2 files changed, 132 insertions(+), 14 deletions(-) diff --git a/src/qus/seg_loading/ui/roi_drawing.ui b/src/qus/seg_loading/ui/roi_drawing.ui index eadb145..9f0c58c 100644 --- a/src/qus/seg_loading/ui/roi_drawing.ui +++ b/src/qus/seg_loading/ui/roi_drawing.ui @@ -1020,6 +1020,40 @@ QSlider::handle:horizontal { + + + + + 200 + 41 + + + + + 200 + 41 + + + + QPushButton { + background-color: rgb(90, 37, 255); + color: rgb(255, 255, 255); + border-radius: 10px; + font-size: 14px; + font-weight: bold; +} +QPushButton:hover { + background-color: rgb(120, 67, 255); +} +QPushButton:pressed { + background-color: rgb(60, 17, 195); +} + + + Load DICOM File + + + diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index 36b1b46..7b7454c 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -12,7 +12,7 @@ import scipy.interpolate as interpolate from PyQt6.QtCore import pyqtSignal, Qt -from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QLabel, QVBoxLayout, QCheckBox +from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QLabel, QVBoxLayout, QCheckBox, QPushButton from src.qus.mvc.base_view import BaseViewMixin from src.qus.seg_loading.ui.roi_drawing_ui import Ui_constructRoi @@ -71,6 +71,7 @@ def __init__(self, image_data: UltrasoundRfImage, frame: int = 0, brightness: in self._transparency_slider: Optional[QSlider] = None self._transparency_label: Optional[QLabel] = None self._transparency_value_label: Optional[QLabel] = None + self._load_dicom_button: Optional[QPushButton] = None self._overlay_enabled = False # Track if overlay is currently enabled self._transparency_value = 50 # Default transparency (0-100) self._original_bmode_im = None # Store original B-mode for overlay blending @@ -178,6 +179,7 @@ def _apply_dicom_overlay(self, bmode_image: np.ndarray) -> np.ndarray: # Ensure both images have the same shape dicom_im = self._image_data.dicom_image + if dicom_im.shape != bmode_image.shape: # Resize DICOM to match B-mode if needed from skimage.transform import resize @@ -188,7 +190,9 @@ def _apply_dicom_overlay(self, bmode_image: np.ndarray) -> np.ndarray: bmode_norm = bmode_image.astype(np.float32) dicom_norm = dicom_im.astype(np.float32) - # Apply alpha blending: output = (1-alpha) * Bmode + alpha * DICOM + # Apply direct alpha blending: output = (1-alpha) * Bmode + alpha * DICOM + # At alpha=0 (transparency=0): output = Bmode (only B-mode visible) + # At alpha=1 (transparency=100): output = DICOM (only DICOM visible) blended = (1.0 - alpha) * bmode_norm + alpha * dicom_norm # Clip and convert back to uint8 @@ -386,6 +390,7 @@ def _setup_dicom_overlay_control(self) -> None: self._transparency_slider = self._ui.transparency_slider self._transparency_label = self._ui.transparency_label self._transparency_value_label = self._ui.transparency_value_label + self._load_dicom_button = self._ui.load_dicom_button except AttributeError: # If controls don't exist in UI, create them programmatically as fallback self._create_overlay_controls_programmatically() @@ -398,6 +403,8 @@ def _setup_dicom_overlay_control(self) -> None: self._transparency_slider.hide() self._transparency_label.hide() self._transparency_value_label.hide() + # Show Load DICOM button + self._load_dicom_button.show() else: # Show overlay controls and set initial values self._dicom_overlay_checkbox.show() @@ -408,10 +415,12 @@ def _setup_dicom_overlay_control(self) -> None: self._transparency_label.show() self._transparency_value_label.show() self._transparency_value_label.setText("50") + # Hide Load DICOM button since DICOM is already loaded + self._load_dicom_button.hide() def _create_overlay_controls_programmatically(self) -> None: """Create DICOM overlay controls programmatically as fallback.""" - from PyQt6.QtWidgets import QCheckBox, QSlider, QLabel + from PyQt6.QtWidgets import QCheckBox, QSlider, QLabel, QPushButton # Create checkbox self._dicom_overlay_checkbox = QCheckBox("Show DICOM Overlay") @@ -437,6 +446,26 @@ def _create_overlay_controls_programmatically(self) -> None: } """) + # Create Load DICOM button + self._load_dicom_button = QPushButton("Load DICOM File") + self._load_dicom_button.setMinimumSize(200, 41) + self._load_dicom_button.setMaximumSize(200, 41) + self._load_dicom_button.setStyleSheet(""" + QPushButton { + background-color: rgb(90, 37, 255); + color: rgb(255, 255, 255); + border-radius: 10px; + font-size: 14px; + font-weight: bold; + } + QPushButton:hover { + background-color: rgb(120, 67, 255); + } + QPushButton:pressed { + background-color: rgb(60, 17, 195); + } + """) + # Create transparency label self._transparency_label = QLabel("Transparency:") self._transparency_label.setMinimumSize(100, 41) @@ -487,16 +516,29 @@ def _create_overlay_controls_programmatically(self) -> None: """) self._transparency_value_label.setAlignment(Qt.AlignmentFlag.AlignCenter) - # Create layout for overlay controls - overlay_layout = QHBoxLayout() - overlay_layout.setSpacing(10) - overlay_layout.addWidget(self._dicom_overlay_checkbox) - overlay_layout.addWidget(self._transparency_label) - overlay_layout.addWidget(self._transparency_slider) - overlay_layout.addWidget(self._transparency_value_label) + # Create layout for overlay controls (vertical layout) + overlay_main_layout = QVBoxLayout() + overlay_main_layout.setSpacing(10) + + # First row: checkbox and load button + overlay_button_layout = QHBoxLayout() + overlay_button_layout.setSpacing(10) + overlay_button_layout.addWidget(self._dicom_overlay_checkbox) + overlay_button_layout.addWidget(self._load_dicom_button) + + # Second row: transparency controls + overlay_transparency_layout = QHBoxLayout() + overlay_transparency_layout.setSpacing(10) + overlay_transparency_layout.addWidget(self._transparency_label) + overlay_transparency_layout.addWidget(self._transparency_slider) + overlay_transparency_layout.addWidget(self._transparency_value_label) + + # Add both layouts to main overlay layout + overlay_main_layout.addLayout(overlay_button_layout) + overlay_main_layout.addLayout(overlay_transparency_layout) # Insert the overlay layout into the main ROI layout - self._ui.draw_roi_layout.insertLayout(2, overlay_layout) + self._ui.draw_roi_layout.insertLayout(2, overlay_main_layout) # Apply visibility logic if not self._image_data.dicom_available: @@ -504,6 +546,7 @@ def _create_overlay_controls_programmatically(self) -> None: self._transparency_slider.hide() self._transparency_label.hide() self._transparency_value_label.hide() + self._load_dicom_button.show() else: self._dicom_overlay_checkbox.show() self._dicom_overlay_checkbox.setChecked(False) @@ -513,6 +556,7 @@ def _create_overlay_controls_programmatically(self) -> None: self._transparency_label.show() self._transparency_value_label.show() self._transparency_value_label.setText("50") + self._load_dicom_button.hide() def _connect_signals(self) -> None: """Connect UI signals to internal handlers.""" @@ -538,6 +582,8 @@ def _connect_signals(self) -> None: self._dicom_overlay_checkbox.toggled.connect(self._on_overlay_toggled) if self._transparency_slider: self._transparency_slider.valueChanged.connect(self._on_transparency_changed) + if self._load_dicom_button: + self._load_dicom_button.clicked.connect(self._on_load_dicom_clicked) def _on_brightness_changed(self, value: int) -> None: """Handle brightness slider change.""" @@ -567,18 +613,56 @@ def _on_transparency_changed(self, value: int) -> None: # Update display if overlay is enabled if self._overlay_enabled: self._update_overlay_display() + + def _on_load_dicom_clicked(self) -> None: + """Handle Load DICOM button click.""" + # Open file dialog to select DICOM file + dicom_file, _ = QFileDialog.getOpenFileName( + self, + "Select DICOM File", + "", + "DICOM Files (*.dcm *.dicom *.DICOM);;All Files (*)" + ) + + if dicom_file: + # Try to load the DICOM file + if self._image_data.load_dicom_file(dicom_file): + # Successfully loaded - update UI + if self._load_dicom_button: + self._load_dicom_button.hide() + if self._dicom_overlay_checkbox: + self._dicom_overlay_checkbox.show() + self._dicom_overlay_checkbox.setChecked(False) + if self._transparency_slider: + self._transparency_slider.show() + self._transparency_slider.setValue(50) + self._transparency_slider.setEnabled(False) + if self._transparency_label: + self._transparency_label.show() + if self._transparency_value_label: + self._transparency_value_label.show() + self._transparency_value_label.setText("50") + else: + # Failed to load - show error message + from PyQt6.QtWidgets import QMessageBox + QMessageBox.warning( + self, + "DICOM Load Error", + "Failed to load the selected DICOM file. Please check the file format and try again." + ) def _apply_brightness_adjustment(self) -> None: """Apply brightness adjustment to the displayed image using exponential function.""" - if self._original_displayed_im is None: + if self._displayed_im is None: return # Calculate exponential coefficient based on brightness slider (0-100) # Map 0-100 to 0.05-5.0 for more intense exponential range exp_coefficient = 0.05 + (self._brightness_value / 100.0) * 4.95 - # Apply exponential brightness adjustment - adjusted_im = self._original_displayed_im.astype(np.float32) + # Apply exponential brightness adjustment to the current displayed image + # This preserves any overlay that has already been applied + adjusted_im = self._displayed_im.astype(np.float32) # Normalize to 0-1 range for exponential operation normalized_im = adjusted_im / 255.0 From dd5e9447636213e98add241e745fb0280b640f4a Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 15:06:26 +0100 Subject: [PATCH 11/61] Update QUS engine submodule --- engines/qus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/qus b/engines/qus index 70c4d35..cec2266 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit 70c4d35576a8786e3c8b608814f9dc6683e68c2f +Subproject commit cec2266ce10d123a3eff9d9cb596e52ae196316f From 45dbe63ca240120b5e70d4693deca46757fb2109 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 8 Jan 2026 15:14:46 +0100 Subject: [PATCH 12/61] Update QUS engine submodule with DICOM cropping --- engines/qus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/qus b/engines/qus index cec2266..6b78e76 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit cec2266ce10d123a3eff9d9cb596e52ae196316f +Subproject commit 6b78e76168ae959f4a2a32cdf9918998dd938181 From bcf271490a56bbf95614d0d3ea99cd815fc88a5c Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 13:23:05 +0100 Subject: [PATCH 13/61] config: update submodules to track main branch --- .gitmodules | 2 ++ engines/qus | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 52d9cfe..0edd8b7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,8 @@ [submodule "engines/ceus"] path = engines/ceus url = https://github.com/QuantUS-OpenSource/QuantUS-Backend-CEUS + branch = main [submodule "engines/qus"] path = engines/qus url = https://github.com/QuantUS-OpenSource/QuantUS-Backend-QUS + branch = main diff --git a/engines/qus b/engines/qus index 6b78e76..12411aa 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit 6b78e76168ae959f4a2a32cdf9918998dd938181 +Subproject commit 12411aa2b6f90391a68da93073a2363ff186ec19 From 76ba2fbfa1b78fade85c9b6479bc7263d97a1c80 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 13:23:09 +0100 Subject: [PATCH 14/61] chore: update dependencies including pydicom --- requirements.txt | Bin 1464 -> 1496 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/requirements.txt b/requirements.txt index 97b7a0728b83956946b21b276a6885c2b2128b61..1922355f5e0c5dc5fb309e9c138301e36b456ab2 100644 GIT binary patch delta 36 rcmdnNeS>?$HWu*$hDwGMhD?TJhJ1!x20I2@24e<227}FOS-2SiyDJEp delta 12 Tcmcb?y@PwhHkQrTSeO_ABeDdc From 43080806748f07770ff72383a826ce4e3149b85d Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 13:23:17 +0100 Subject: [PATCH 15/61] feat: migrate DICOM loading logic to application model --- src/qus/application_model.py | 46 +++++++++++++ src/qus/image_loading/__init__.py | 3 +- src/qus/image_loading/dicom_loader.py | 97 +++++++++++++++++++++++++++ 3 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 src/qus/image_loading/dicom_loader.py diff --git a/src/qus/application_model.py b/src/qus/application_model.py index c84ffec..c945f0d 100644 --- a/src/qus/application_model.py +++ b/src/qus/application_model.py @@ -201,6 +201,10 @@ def __init__(self): self._analysis_data: Optional[ParamapAnalysis] = None self._analysis_worker: Optional[AnalysisWorker] = None + # DICOM state + self._dicom_image: Optional[np.ndarray] = None + self._dicom_file_path: Optional[str] = None + # Visualization state self._visualization_types: Dict[str, Any] = {} self._visualization_functions: Dict[str, Any] = {} @@ -263,6 +267,48 @@ def image_data(self) -> Optional[UltrasoundRfImage]: """Get the currently loaded image data.""" return self._image_data + # DICOM Properties and Methods + @property + def dicom_available(self) -> bool: + """Check if DICOM data is available.""" + return self._dicom_image is not None + + @property + def dicom_image(self) -> Optional[np.ndarray]: + """Get the processed DICOM image data.""" + return self._dicom_image + + def load_dicom_file(self, dicom_file_path: str) -> bool: + """ + Load a DICOM file using DicomLoader. + + Args: + dicom_file_path: Path to the DICOM file + + Returns: + bool: True if loaded successfully, False otherwise + """ + from src.qus.image_loading.dicom_loader import DicomLoader + + try: + dicom_pixels = DicomLoader.load_dicom_file(dicom_file_path) + if dicom_pixels is not None: + self._dicom_image = dicom_pixels + self._dicom_file_path = dicom_file_path + return True + return False + except Exception as e: + self._emit_error(f"Error loading DICOM: {e}") + return False + + def get_dicom_data(self) -> dict: + """Get processed DICOM data for display.""" + return { + 'image': self._dicom_image, + 'file_path': self._dicom_file_path, + 'available': self.dicom_available + } + def set_scan_type(self, scan_type_display_name: str) -> bool: """ Set the selected scan type. diff --git a/src/qus/image_loading/__init__.py b/src/qus/image_loading/__init__.py index 56cec46..bd3884d 100644 --- a/src/qus/image_loading/__init__.py +++ b/src/qus/image_loading/__init__.py @@ -3,5 +3,6 @@ """ from .image_loading_controller import ImageLoadingController +from .dicom_loader import DicomLoader -__all__ = ['ImageLoadingController'] +__all__ = ['ImageLoadingController', 'DicomLoader'] diff --git a/src/qus/image_loading/dicom_loader.py b/src/qus/image_loading/dicom_loader.py new file mode 100644 index 0000000..dbeaa42 --- /dev/null +++ b/src/qus/image_loading/dicom_loader.py @@ -0,0 +1,97 @@ +import numpy as np +from pathlib import Path +from typing import Optional + +try: + import pydicom + PYDICOM_AVAILABLE = True +except ImportError: + PYDICOM_AVAILABLE = False + +class DicomLoader: + """ + Utility class for loading and processing DICOM files for ultrasound imaging. + """ + + @staticmethod + def load_dicom_file(dicom_file_path: str) -> Optional[np.ndarray]: + """ + Load a DICOM file and return the processed pixel data. + + Args: + dicom_file_path (str): Path to the DICOM file to load + + Returns: + np.ndarray: Processed pixel data as a 2D numpy array, or None if failed + """ + if not PYDICOM_AVAILABLE: + print("pydicom is not installed. Cannot load DICOM files.") + return None + + try: + dicom_path = Path(dicom_file_path) + if not dicom_path.exists() or not dicom_path.is_file(): + print(f"DICOM file not found: {dicom_file_path}") + return None + + # Read the DICOM file + dicom_data = pydicom.dcmread(str(dicom_path)) + + # Extract pixel data + if hasattr(dicom_data, 'pixel_array'): + dicom_pixels = dicom_data.pixel_array + + # Convert to grayscale if needed (handle different DICOM formats) + if len(dicom_pixels.shape) == 4: + # 4D DICOM (frames, height, width, channels) - take first frame + dicom_pixels = dicom_pixels[0] + if len(dicom_pixels.shape) == 3: + # RGB or multi-frame DICOM - convert to grayscale + if dicom_pixels.shape[2] == 3: # RGB + dicom_pixels = np.dot(dicom_pixels[...,:3], [0.2989, 0.5870, 0.1140]) + elif dicom_pixels.shape[0] < dicom_pixels.shape[2]: # Multi-frame + dicom_pixels = dicom_pixels[0] # Take first frame + + # Normalize to 0-255 range + if dicom_pixels.dtype != np.uint8: + dicom_pixels = ((dicom_pixels - dicom_pixels.min()) / + (max(1, dicom_pixels.max() - dicom_pixels.min())) * 255).astype(np.uint8) + + # Crop black regions from top and bottom + dicom_pixels = DicomLoader.crop_black_regions(dicom_pixels) + + return dicom_pixels + else: + print("No pixel data found in DICOM file") + return None + + except Exception as e: + print(f"Failed to load DICOM file: {e}") + return None + + @staticmethod + def crop_black_regions(image: np.ndarray) -> np.ndarray: + """ + Crop a fixed number of rows from top and bottom of the image. + + Args: + image: Input image as numpy array + + Returns: + Cropped image with specified rows removed + """ + # Define fixed number of rows to crop from top and bottom + crop_top = 175 # Number of rows to crop from top + crop_bottom = 175 # Number of rows to crop from bottom + + # Ensure we don't crop more than the image height + height = image.shape[0] + if crop_top + crop_bottom >= height: + # If we try to crop too much, crop half from each side + crop_top = crop_bottom = height // 4 + + # Crop the image + cropped_image = image[crop_top:height - crop_bottom, :] + + print(f"DICOM cropped: {image.shape} -> {cropped_image.shape} (removed {crop_top} from top, {crop_bottom} from bottom)") + return cropped_image From 96dd2fe1bf3d20383829265f3a15b249751342d0 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 13:23:22 +0100 Subject: [PATCH 16/61] refactor: decouple ROI drawing UI and integrate application-level DICOM loading --- src/qus/seg_loading/ui/roi_drawing.ui | 108 +++ src/qus/seg_loading/ui/roi_drawing_ui.py | 917 ++++++++++++++++++ .../seg_loading/views/roi_drawing_widget.py | 275 +----- 3 files changed, 1075 insertions(+), 225 deletions(-) create mode 100644 src/qus/seg_loading/ui/roi_drawing_ui.py diff --git a/src/qus/seg_loading/ui/roi_drawing.ui b/src/qus/seg_loading/ui/roi_drawing.ui index 9f0c58c..181f870 100644 --- a/src/qus/seg_loading/ui/roi_drawing.ui +++ b/src/qus/seg_loading/ui/roi_drawing.ui @@ -874,6 +874,114 @@ + + + + 10 + + + + + + 80 + 41 + + + + + 80 + 41 + + + + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + Brightness: + + + Qt::AlignRight|Qt::AlignVCenter + + + + + + + + 200 + 41 + + + + + 200 + 41 + + + + QSlider::groove:horizontal { + border: 1px solid #999999; + height: 8px; + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4); + margin: 2px 0; +} +QSlider::handle:horizontal { + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); + border: 1px solid #5c5c5c; + width: 18px; + margin: 2px 0; + border-radius: 3px; +} + + + 0 + + + 100 + + + 0 + + + Qt::Horizontal + + + + + + + + 40 + 41 + + + + + 40 + 41 + + + + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + 0 + + + Qt::AlignCenter + + + + + diff --git a/src/qus/seg_loading/ui/roi_drawing_ui.py b/src/qus/seg_loading/ui/roi_drawing_ui.py new file mode 100644 index 0000000..fdbf8e9 --- /dev/null +++ b/src/qus/seg_loading/ui/roi_drawing_ui.py @@ -0,0 +1,917 @@ +# Form implementation generated from reading ui file 'src/qus/seg_loading/ui/roi_drawing.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_constructRoi(object): + def setupUi(self, constructRoi): + constructRoi.setObjectName("constructRoi") + constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) + constructRoi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(constructRoi) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=constructRoi) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.draw_roi_layout = QtWidgets.QVBoxLayout() + self.draw_roi_layout.setContentsMargins(30, 10, 30, 10) + self.draw_roi_layout.setSpacing(10) + self.draw_roi_layout.setObjectName("draw_roi_layout") + self.draw_roi_heading_layout = QtWidgets.QVBoxLayout() + self.draw_roi_heading_layout.setSpacing(5) + self.draw_roi_heading_layout.setObjectName("draw_roi_heading_layout") + self.draw_roi_title_layout = QtWidgets.QHBoxLayout() + self.draw_roi_title_layout.setObjectName("draw_roi_title_layout") + self.pix_dim_layout_cm = QtWidgets.QVBoxLayout() + self.pix_dim_layout_cm.setObjectName("pix_dim_layout_cm") + self.physical_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_dims_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_dims_label.setScaledContents(False) + self.physical_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.physical_dims_label.setWordWrap(True) + self.physical_dims_label.setObjectName("physical_dims_label") + self.pix_dim_layout_cm.addWidget(self.physical_dims_label) + self.pix_dim_grid_cm = QtWidgets.QGridLayout() + self.pix_dim_grid_cm.setObjectName("pix_dim_grid_cm") + self.physical_depth_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_depth_label.setMinimumSize(QtCore.QSize(129, 0)) + self.physical_depth_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_depth_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_depth_label.setScaledContents(False) + self.physical_depth_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_depth_label.setWordWrap(True) + self.physical_depth_label.setObjectName("physical_depth_label") + self.pix_dim_grid_cm.addWidget(self.physical_depth_label, 1, 0, 1, 1) + self.physical_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_width_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_width_val.setScaledContents(False) + self.physical_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_width_val.setWordWrap(True) + self.physical_width_val.setObjectName("physical_width_val") + self.pix_dim_grid_cm.addWidget(self.physical_width_val, 0, 1, 1, 1) + self.physical_depth_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_depth_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_depth_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_depth_val.setScaledContents(False) + self.physical_depth_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_depth_val.setWordWrap(True) + self.physical_depth_val.setObjectName("physical_depth_val") + self.pix_dim_grid_cm.addWidget(self.physical_depth_val, 1, 1, 1, 1) + self.physical_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_width_label.setMinimumSize(QtCore.QSize(129, 0)) + self.physical_width_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_width_label.setScaledContents(False) + self.physical_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_width_label.setWordWrap(True) + self.physical_width_label.setObjectName("physical_width_label") + self.pix_dim_grid_cm.addWidget(self.physical_width_label, 0, 0, 1, 1) + self.pix_dim_layout_cm.addLayout(self.pix_dim_grid_cm) + self.pix_dim_layout_cm.setStretch(0, 1) + self.pix_dim_layout_cm.setStretch(1, 2) + self.draw_roi_title_layout.addLayout(self.pix_dim_layout_cm) + self.construct_roi_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.construct_roi_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.construct_roi_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.construct_roi_label.setScaledContents(False) + self.construct_roi_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.construct_roi_label.setWordWrap(True) + self.construct_roi_label.setObjectName("construct_roi_label") + self.draw_roi_title_layout.addWidget(self.construct_roi_label) + self.pix_dim_layout = QtWidgets.QVBoxLayout() + self.pix_dim_layout.setObjectName("pix_dim_layout") + self.pixel_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_dims_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_dims_label.setScaledContents(False) + self.pixel_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.pixel_dims_label.setWordWrap(True) + self.pixel_dims_label.setObjectName("pixel_dims_label") + self.pix_dim_layout.addWidget(self.pixel_dims_label) + self.pix_dim_grid = QtWidgets.QGridLayout() + self.pix_dim_grid.setObjectName("pix_dim_grid") + self.pixel_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_width_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_width_label.setScaledContents(False) + self.pixel_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_width_label.setWordWrap(True) + self.pixel_width_label.setObjectName("pixel_width_label") + self.pix_dim_grid.addWidget(self.pixel_width_label, 0, 0, 1, 1) + self.pixel_depth_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_depth_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_depth_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_depth_label.setScaledContents(False) + self.pixel_depth_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_depth_label.setWordWrap(True) + self.pixel_depth_label.setObjectName("pixel_depth_label") + self.pix_dim_grid.addWidget(self.pixel_depth_label, 1, 0, 1, 1) + self.pixel_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_width_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_width_val.setScaledContents(False) + self.pixel_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_width_val.setWordWrap(True) + self.pixel_width_val.setObjectName("pixel_width_val") + self.pix_dim_grid.addWidget(self.pixel_width_val, 0, 1, 1, 1) + self.pixel_depth_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_depth_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_depth_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_depth_val.setScaledContents(False) + self.pixel_depth_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_depth_val.setWordWrap(True) + self.pixel_depth_val.setObjectName("pixel_depth_val") + self.pix_dim_grid.addWidget(self.pixel_depth_val, 1, 1, 1, 1) + self.pix_dim_layout.addLayout(self.pix_dim_grid) + self.pix_dim_layout.setStretch(0, 1) + self.pix_dim_layout.setStretch(1, 2) + self.draw_roi_title_layout.addLayout(self.pix_dim_layout) + self.draw_roi_title_layout.setStretch(0, 1) + self.draw_roi_title_layout.setStretch(1, 2) + self.draw_roi_title_layout.setStretch(2, 1) + self.draw_roi_heading_layout.addLayout(self.draw_roi_title_layout) + self.draw_roi_layout.addLayout(self.draw_roi_heading_layout) + self.brightness_control_layout = QtWidgets.QHBoxLayout() + self.brightness_control_layout.setSpacing(10) + self.brightness_control_layout.setObjectName("brightness_control_layout") + self.brightness_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.brightness_label.setMinimumSize(QtCore.QSize(80, 41)) + self.brightness_label.setMaximumSize(QtCore.QSize(80, 41)) + self.brightness_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.brightness_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.brightness_label.setObjectName("brightness_label") + self.brightness_control_layout.addWidget(self.brightness_label) + self.brightness_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.brightness_slider.setMinimumSize(QtCore.QSize(200, 41)) + self.brightness_slider.setMaximumSize(QtCore.QSize(200, 41)) + self.brightness_slider.setStyleSheet("QSlider::groove:horizontal {\n" +" border: 1px solid #999999;\n" +" height: 8px;\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4);\n" +" margin: 2px 0;\n" +"}\n" +"QSlider::handle:horizontal {\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);\n" +" border: 1px solid #5c5c5c;\n" +" width: 18px;\n" +" margin: 2px 0;\n" +" border-radius: 3px;\n" +"}") + self.brightness_slider.setMinimum(0) + self.brightness_slider.setMaximum(100) + self.brightness_slider.setProperty("value", 0) + self.brightness_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.brightness_slider.setObjectName("brightness_slider") + self.brightness_control_layout.addWidget(self.brightness_slider) + self.brightness_value_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.brightness_value_label.setMinimumSize(QtCore.QSize(40, 41)) + self.brightness_value_label.setMaximumSize(QtCore.QSize(40, 41)) + self.brightness_value_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.brightness_value_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.brightness_value_label.setObjectName("brightness_value_label") + self.brightness_control_layout.addWidget(self.brightness_value_label) + self.draw_roi_layout.addLayout(self.brightness_control_layout) + self.overlay_control_layout = QtWidgets.QHBoxLayout() + self.overlay_control_layout.setSpacing(10) + self.overlay_control_layout.setObjectName("overlay_control_layout") + self.dicom_overlay_checkbox = QtWidgets.QCheckBox(parent=self.horizontalLayoutWidget_4) + self.dicom_overlay_checkbox.setMinimumSize(QtCore.QSize(200, 41)) + self.dicom_overlay_checkbox.setMaximumSize(QtCore.QSize(200, 41)) + self.dicom_overlay_checkbox.setStyleSheet("QCheckBox {\n" +" color: rgb(255, 255, 255);\n" +" font-size: 15px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}\n" +"QCheckBox::indicator {\n" +" width: 20px;\n" +" height: 20px;\n" +" border-radius: 10px;\n" +" background-color: rgb(90, 37, 255);\n" +" border: 2px solid rgb(255, 255, 255);\n" +"}\n" +"QCheckBox::indicator:checked {\n" +" background-color: rgb(90, 37, 255);\n" +" border: 2px solid rgb(255, 255, 255);\n" +"}") + self.dicom_overlay_checkbox.setObjectName("dicom_overlay_checkbox") + self.overlay_control_layout.addWidget(self.dicom_overlay_checkbox) + self.transparency_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.transparency_label.setMinimumSize(QtCore.QSize(100, 41)) + self.transparency_label.setMaximumSize(QtCore.QSize(100, 41)) + self.transparency_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.transparency_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.transparency_label.setObjectName("transparency_label") + self.overlay_control_layout.addWidget(self.transparency_label) + self.transparency_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.transparency_slider.setMinimumSize(QtCore.QSize(200, 41)) + self.transparency_slider.setMaximumSize(QtCore.QSize(200, 41)) + self.transparency_slider.setStyleSheet("QSlider::groove:horizontal {\n" +" border: 1px solid #999999;\n" +" height: 8px;\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4);\n" +" margin: 2px 0;\n" +"}\n" +"QSlider::handle:horizontal {\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);\n" +" border: 1px solid #5c5c5c;\n" +" width: 18px;\n" +" margin: 2px 0;\n" +" border-radius: 3px;\n" +"}") + self.transparency_slider.setMinimum(0) + self.transparency_slider.setMaximum(100) + self.transparency_slider.setProperty("value", 50) + self.transparency_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.transparency_slider.setObjectName("transparency_slider") + self.overlay_control_layout.addWidget(self.transparency_slider) + self.transparency_value_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.transparency_value_label.setMinimumSize(QtCore.QSize(40, 41)) + self.transparency_value_label.setMaximumSize(QtCore.QSize(40, 41)) + self.transparency_value_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.transparency_value_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.transparency_value_label.setObjectName("transparency_value_label") + self.overlay_control_layout.addWidget(self.transparency_value_label) + self.draw_roi_layout.addLayout(self.overlay_control_layout) + self.load_dicom_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.load_dicom_button.setMinimumSize(QtCore.QSize(200, 41)) + self.load_dicom_button.setMaximumSize(QtCore.QSize(200, 41)) + self.load_dicom_button.setStyleSheet("QPushButton {\n" +" background-color: rgb(90, 37, 255);\n" +" color: rgb(255, 255, 255);\n" +" border-radius: 10px;\n" +" font-size: 14px;\n" +" font-weight: bold;\n" +"}\n" +"QPushButton:hover {\n" +" background-color: rgb(120, 67, 255);\n" +"}\n" +"QPushButton:pressed {\n" +" background-color: rgb(60, 17, 195);\n" +"}") + self.load_dicom_button.setObjectName("load_dicom_button") + self.draw_roi_layout.addWidget(self.load_dicom_button) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.back_from_drag_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_drag_button.setMinimumSize(QtCore.QSize(241, 41)) + self.back_from_drag_button.setMaximumSize(QtCore.QSize(241, 41)) + self.back_from_drag_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.back_from_drag_button.setCheckable(True) + self.back_from_drag_button.setChecked(False) + self.back_from_drag_button.setObjectName("back_from_drag_button") + self.horizontalLayout_4.addWidget(self.back_from_drag_button) + self.save_drag_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_drag_button.setMinimumSize(QtCore.QSize(241, 41)) + self.save_drag_button.setMaximumSize(QtCore.QSize(241, 41)) + self.save_drag_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.save_drag_button.setCheckable(True) + self.save_drag_button.setChecked(False) + self.save_drag_button.setObjectName("save_drag_button") + self.horizontalLayout_4.addWidget(self.save_drag_button) + self.draw_roi_layout.addLayout(self.horizontalLayout_4) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.draw_pts_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_pts_type_button.setMinimumSize(QtCore.QSize(221, 41)) + self.draw_pts_type_button.setMaximumSize(QtCore.QSize(221, 41)) + self.draw_pts_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_pts_type_button.setCheckable(True) + self.draw_pts_type_button.setChecked(False) + self.draw_pts_type_button.setObjectName("draw_pts_type_button") + self.horizontalLayout.addWidget(self.draw_pts_type_button) + self.draw_freehand_drag_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_freehand_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) + self.draw_freehand_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) + self.draw_freehand_drag_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_freehand_drag_type_button.setCheckable(False) + self.draw_freehand_drag_type_button.setChecked(False) + self.draw_freehand_drag_type_button.setObjectName("draw_freehand_drag_type_button") + self.horizontalLayout.addWidget(self.draw_freehand_drag_type_button) + self.draw_rect_drag_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_rect_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) + self.draw_rect_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) + self.draw_rect_drag_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_rect_drag_type_button.setCheckable(False) + self.draw_rect_drag_type_button.setChecked(False) + self.draw_rect_drag_type_button.setObjectName("draw_rect_drag_type_button") + self.horizontalLayout.addWidget(self.draw_rect_drag_type_button) + self.draw_roi_layout.addLayout(self.horizontalLayout) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.clear_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_roi_button.setMinimumSize(QtCore.QSize(141, 41)) + self.clear_roi_button.setMaximumSize(QtCore.QSize(141, 41)) + self.clear_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_roi_button.setCheckable(False) + self.clear_roi_button.setObjectName("clear_roi_button") + self.horizontalLayout_3.addWidget(self.clear_roi_button) + self.undo_last_pt_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.undo_last_pt_button.setMinimumSize(QtCore.QSize(141, 41)) + self.undo_last_pt_button.setMaximumSize(QtCore.QSize(141, 41)) + self.undo_last_pt_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.undo_last_pt_button.setCheckable(False) + self.undo_last_pt_button.setObjectName("undo_last_pt_button") + self.horizontalLayout_3.addWidget(self.undo_last_pt_button) + self.close_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.close_roi_button.setMinimumSize(QtCore.QSize(141, 41)) + self.close_roi_button.setMaximumSize(QtCore.QSize(141, 41)) + self.close_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.close_roi_button.setCheckable(False) + self.close_roi_button.setObjectName("close_roi_button") + self.horizontalLayout_3.addWidget(self.close_roi_button) + self.back_from_pts_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_pts_button.setMinimumSize(QtCore.QSize(141, 41)) + self.back_from_pts_button.setMaximumSize(QtCore.QSize(141, 41)) + self.back_from_pts_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_pts_button.setCheckable(False) + self.back_from_pts_button.setObjectName("back_from_pts_button") + self.horizontalLayout_3.addWidget(self.back_from_pts_button) + self.save_pts_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_pts_button.setMinimumSize(QtCore.QSize(141, 41)) + self.save_pts_button.setMaximumSize(QtCore.QSize(141, 41)) + self.save_pts_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_pts_button.setCheckable(False) + self.save_pts_button.setObjectName("save_pts_button") + self.horizontalLayout_3.addWidget(self.save_pts_button) + self.draw_roi_layout.addLayout(self.horizontalLayout_3) + self.save_roi_layout = QtWidgets.QGridLayout() + self.save_roi_layout.setContentsMargins(-1, -1, -1, 10) + self.save_roi_layout.setSpacing(10) + self.save_roi_layout.setObjectName("save_roi_layout") + self.save_folder_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_folder_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_folder_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_folder_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_folder_input.setObjectName("save_folder_input") + self.save_roi_layout.addWidget(self.save_folder_input, 0, 1, 1, 1) + self.dest_folder_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.dest_folder_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.dest_folder_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.dest_folder_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.dest_folder_label.setObjectName("dest_folder_label") + self.save_roi_layout.addWidget(self.dest_folder_label, 0, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.roi_name_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.roi_name_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.roi_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roi_name_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.roi_name_label.setObjectName("roi_name_label") + self.save_roi_layout.addWidget(self.roi_name_label, 2, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.save_name_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_name_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_name_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_name_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_name_input.setObjectName("save_name_input") + self.save_roi_layout.addWidget(self.save_name_input, 2, 1, 1, 1) + self.chooseImageButtonsLayout_2 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_2.setSpacing(10) + self.chooseImageButtonsLayout_2.setObjectName("chooseImageButtonsLayout_2") + self.choose_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_save_folder_button.setObjectName("choose_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.choose_save_folder_button) + self.clear_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_save_folder_button.setObjectName("clear_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.clear_save_folder_button) + self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_2, 0, 2, 1, 1) + self.chooseImageButtonsLayout_4 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_4.setObjectName("chooseImageButtonsLayout_4") + self.save_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_roi_button.setMinimumSize(QtCore.QSize(131, 41)) + self.save_roi_button.setMaximumSize(QtCore.QSize(131, 41)) + self.save_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_roi_button.setObjectName("save_roi_button") + self.chooseImageButtonsLayout_4.addWidget(self.save_roi_button) + self.back_from_save_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_save_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_save_button.setObjectName("back_from_save_button") + self.chooseImageButtonsLayout_4.addWidget(self.back_from_save_button) + self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_4, 2, 2, 1, 1) + self.save_roi_layout.setColumnStretch(0, 1) + self.save_roi_layout.setColumnStretch(1, 10) + self.save_roi_layout.setColumnStretch(2, 10) + self.save_roi_layout.setRowStretch(0, 1) + self.save_roi_layout.setRowStretch(1, 10) + self.save_roi_layout.setRowStretch(2, 10) + self.draw_roi_layout.addLayout(self.save_roi_layout) + self.im_display_frame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(10) + sizePolicy.setVerticalStretch(10) + sizePolicy.setHeightForWidth(self.im_display_frame.sizePolicy().hasHeightForWidth()) + self.im_display_frame.setSizePolicy(sizePolicy) + self.im_display_frame.setMinimumSize(QtCore.QSize(501, 321)) + self.im_display_frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.im_display_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.im_display_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.im_display_frame.setObjectName("im_display_frame") + self.draw_roi_layout.addWidget(self.im_display_frame) + self.rect_dims_layout = QtWidgets.QHBoxLayout() + self.rect_dims_layout.setObjectName("rect_dims_layout") + self.physical_roi_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_dims_label.setMinimumSize(QtCore.QSize(200, 0)) + self.physical_roi_dims_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_dims_label.setScaledContents(False) + self.physical_roi_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.physical_roi_dims_label.setWordWrap(True) + self.physical_roi_dims_label.setObjectName("physical_roi_dims_label") + self.rect_dims_layout.addWidget(self.physical_roi_dims_label) + self.physical_roi_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_width_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_width_label.setScaledContents(False) + self.physical_roi_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_width_label.setWordWrap(True) + self.physical_roi_width_label.setObjectName("physical_roi_width_label") + self.rect_dims_layout.addWidget(self.physical_roi_width_label, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.physical_roi_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_width_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_width_val.setScaledContents(False) + self.physical_roi_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_width_val.setWordWrap(True) + self.physical_roi_width_val.setObjectName("physical_roi_width_val") + self.rect_dims_layout.addWidget(self.physical_roi_width_val) + self.physical_roi_height_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_height_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_height_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_height_label.setScaledContents(False) + self.physical_roi_height_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_height_label.setWordWrap(True) + self.physical_roi_height_label.setObjectName("physical_roi_height_label") + self.rect_dims_layout.addWidget(self.physical_roi_height_label, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.physical_roi_height_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_height_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_height_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_height_val.setScaledContents(False) + self.physical_roi_height_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_height_val.setWordWrap(True) + self.physical_roi_height_val.setObjectName("physical_roi_height_val") + self.rect_dims_layout.addWidget(self.physical_roi_height_val) + spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.rect_dims_layout.addItem(spacerItem2) + self.rect_dims_layout.setStretch(0, 1) + self.rect_dims_layout.setStretch(1, 1) + self.rect_dims_layout.setStretch(2, 2) + self.rect_dims_layout.setStretch(3, 1) + self.rect_dims_layout.setStretch(4, 2) + self.draw_roi_layout.addLayout(self.rect_dims_layout) + self.draw_roi_layout.setStretch(0, 1) + self.full_screen_layout.addLayout(self.draw_roi_layout) + self.main_layout.addWidget(self.horizontalLayoutWidget_4) + + self.retranslateUi(constructRoi) + QtCore.QMetaObject.connectSlotsByName(constructRoi) + + def retranslateUi(self, constructRoi): + _translate = QtCore.QCoreApplication.translate + constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("constructRoi", "


")) + self.imageSelectionLabelSidebar.setText(_translate("constructRoi", "Image Selection:")) + self.imageLabel.setText(_translate("constructRoi", "Image:")) + self.phantomLabel.setText(_translate("constructRoi", "Phantom:")) + self.image_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.phantom_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("constructRoi", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) + self.back_button.setText(_translate("constructRoi", "Back")) + self.physical_dims_label.setText(_translate("constructRoi", "Physical Dims (cm):")) + self.physical_depth_label.setText(_translate("constructRoi", "Depth:")) + self.physical_width_val.setText(_translate("constructRoi", "0")) + self.physical_depth_val.setText(_translate("constructRoi", "0")) + self.physical_width_label.setText(_translate("constructRoi", "Width:")) + self.construct_roi_label.setText(_translate("constructRoi", "Construct Region of Interest (ROI):")) + self.pixel_dims_label.setText(_translate("constructRoi", "Pixel Dims:")) + self.pixel_width_label.setText(_translate("constructRoi", "Width:")) + self.pixel_depth_label.setText(_translate("constructRoi", "Depth:")) + self.pixel_width_val.setText(_translate("constructRoi", "0")) + self.pixel_depth_val.setText(_translate("constructRoi", "0")) + self.brightness_label.setText(_translate("constructRoi", "Brightness:")) + self.brightness_value_label.setText(_translate("constructRoi", "0")) + self.dicom_overlay_checkbox.setText(_translate("constructRoi", "Show DICOM Overlay")) + self.transparency_label.setText(_translate("constructRoi", "Transparency:")) + self.transparency_value_label.setText(_translate("constructRoi", "50")) + self.load_dicom_button.setText(_translate("constructRoi", "Load DICOM File")) + self.back_from_drag_button.setText(_translate("constructRoi", "Back")) + self.save_drag_button.setText(_translate("constructRoi", "Save ROI")) + self.draw_pts_type_button.setText(_translate("constructRoi", "Draw Freehand w Points")) + self.draw_freehand_drag_type_button.setText(_translate("constructRoi", "Draw Freehand by Dragging")) + self.draw_rect_drag_type_button.setText(_translate("constructRoi", "Draw Rectangle by Dragging")) + self.clear_roi_button.setText(_translate("constructRoi", "Clear ROI")) + self.undo_last_pt_button.setText(_translate("constructRoi", "Undo Last Point")) + self.close_roi_button.setText(_translate("constructRoi", "Close ROI")) + self.back_from_pts_button.setText(_translate("constructRoi", "Back")) + self.save_pts_button.setText(_translate("constructRoi", "Save ROI")) + self.dest_folder_label.setText(_translate("constructRoi", "Dest Folder")) + self.roi_name_label.setText(_translate("constructRoi", "ROI Name")) + self.choose_save_folder_button.setText(_translate("constructRoi", "Choose Folder")) + self.clear_save_folder_button.setText(_translate("constructRoi", "Clear Path")) + self.save_roi_button.setText(_translate("constructRoi", "Save")) + self.back_from_save_button.setText(_translate("constructRoi", "Back")) + self.physical_roi_dims_label.setText(_translate("constructRoi", "Rect. Dims (cm):")) + self.physical_roi_width_label.setText(_translate("constructRoi", "Width:")) + self.physical_roi_width_val.setText(_translate("constructRoi", "0")) + self.physical_roi_height_label.setText(_translate("constructRoi", "Depth")) + self.physical_roi_height_val.setText(_translate("constructRoi", "0")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + constructRoi = QtWidgets.QWidget() + ui = Ui_constructRoi() + ui.setupUi(constructRoi) + constructRoi.show() + sys.exit(app.exec()) diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index 7b7454c..f43e50c 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -12,7 +12,7 @@ import scipy.interpolate as interpolate from PyQt6.QtCore import pyqtSignal, Qt -from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QLabel, QVBoxLayout, QCheckBox, QPushButton +from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QLabel, QCheckBox, QPushButton from src.qus.mvc.base_view import BaseViewMixin from src.qus.seg_loading.ui.roi_drawing_ui import Ui_constructRoi @@ -167,10 +167,20 @@ def _apply_dicom_overlay(self, bmode_image: np.ndarray) -> np.ndarray: Returns: Blended image with DICOM overlay applied if enabled, otherwise original B-mode """ - if not self._overlay_enabled or not self._image_data.dicom_available: + if not self._overlay_enabled: + return bmode_image + + # Access DICOM data from model via parent controller + dicom_data = None + if hasattr(self, '_parent_controller') and self._parent_controller: + if hasattr(self._parent_controller, 'model'): + dicom_data = self._parent_controller.model.get_dicom_data() + + if not dicom_data or not dicom_data.get('available'): return bmode_image - if self._image_data.dicom_image is None: + dicom_image = dicom_data.get('image') + if dicom_image is None: return bmode_image try: @@ -178,7 +188,7 @@ def _apply_dicom_overlay(self, bmode_image: np.ndarray) -> np.ndarray: alpha = self._transparency_value / 100.0 # Ensure both images have the same shape - dicom_im = self._image_data.dicom_image + dicom_im = dicom_image if dicom_im.shape != bmode_image.shape: # Resize DICOM to match B-mode if needed @@ -320,84 +330,30 @@ def _setup_matplotlib_canvas(self) -> None: def _setup_brightness_control(self) -> None: """Setup brightness control slider and label.""" - # Create a horizontal layout for brightness control - brightness_layout = QHBoxLayout() + self._brightness_label = self._ui.brightness_label + self._brightness_slider = self._ui.brightness_slider + self._brightness_value_label = self._ui.brightness_value_label - # Create brightness label - self._brightness_label = QLabel("Brightness:") - self._brightness_label.setStyleSheet(""" - QLabel { - font-size: 15px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - } - """) - self._brightness_label.setMinimumSize(80, 41) - self._brightness_label.setMaximumSize(80, 41) - self._brightness_label.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter) - - # Create brightness slider - self._brightness_slider = QSlider() - self._brightness_slider.setOrientation(Qt.Orientation.Horizontal) - self._brightness_slider.setRange(0, 100) + # Initialize values self._brightness_slider.setValue(self._brightness_value) - self._brightness_slider.setMinimumSize(200, 41) - self._brightness_slider.setMaximumSize(200, 41) - self._brightness_slider.setStyleSheet(""" - QSlider::groove:horizontal { - border: 1px solid #999999; - height: 8px; - background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4); - margin: 2px 0; - } - QSlider::handle:horizontal { - background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); - border: 1px solid #5c5c5c; - width: 18px; - margin: 2px 0; - border-radius: 3px; - } - """) - - # Create brightness value label - self._brightness_value_label = QLabel(str(self._brightness_value)) - self._brightness_value_label.setStyleSheet(""" - QLabel { - font-size: 15px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - } - """) - self._brightness_value_label.setMinimumSize(30, 41) - self._brightness_value_label.setMaximumSize(30, 41) - self._brightness_value_label.setAlignment(Qt.AlignmentFlag.AlignCenter) - - # Add widgets to layout - brightness_layout.addWidget(self._brightness_label) - brightness_layout.addWidget(self._brightness_slider) - brightness_layout.addWidget(self._brightness_value_label) - - # Add brightness control to the draw_roi_layout - # Insert it at the beginning of the layout (after the title) - self._ui.draw_roi_layout.insertLayout(1, brightness_layout) + self._brightness_value_label.setText(str(self._brightness_value)) def _setup_dicom_overlay_control(self) -> None: """Setup DICOM overlay control checkbox and transparency slider.""" # Get references to the UI controls from the .ui file - # These should be available after we add them to the UI file - try: - self._dicom_overlay_checkbox = self._ui.dicom_overlay_checkbox - self._transparency_slider = self._ui.transparency_slider - self._transparency_label = self._ui.transparency_label - self._transparency_value_label = self._ui.transparency_value_label - self._load_dicom_button = self._ui.load_dicom_button - except AttributeError: - # If controls don't exist in UI, create them programmatically as fallback - self._create_overlay_controls_programmatically() - return + self._dicom_overlay_checkbox = self._ui.dicom_overlay_checkbox + self._transparency_slider = self._ui.transparency_slider + self._transparency_label = self._ui.transparency_label + self._transparency_value_label = self._ui.transparency_value_label + self._load_dicom_button = self._ui.load_dicom_button + + # Check model for DICOM availability + dicom_available = False + if hasattr(self, '_parent_controller') and self._parent_controller: + if hasattr(self._parent_controller, 'model'): + dicom_available = self._parent_controller.model.dicom_available - # Check if DICOM overlay is available and show/hide controls accordingly - if not self._image_data.dicom_available: + if not dicom_available: # Hide overlay controls if DICOM is not available self._dicom_overlay_checkbox.hide() self._transparency_slider.hide() @@ -417,146 +373,6 @@ def _setup_dicom_overlay_control(self) -> None: self._transparency_value_label.setText("50") # Hide Load DICOM button since DICOM is already loaded self._load_dicom_button.hide() - - def _create_overlay_controls_programmatically(self) -> None: - """Create DICOM overlay controls programmatically as fallback.""" - from PyQt6.QtWidgets import QCheckBox, QSlider, QLabel, QPushButton - - # Create checkbox - self._dicom_overlay_checkbox = QCheckBox("Show DICOM Overlay") - self._dicom_overlay_checkbox.setMinimumSize(200, 41) - self._dicom_overlay_checkbox.setMaximumSize(200, 41) - self._dicom_overlay_checkbox.setStyleSheet(""" - QCheckBox { - color: rgb(255, 255, 255); - font-size: 15px; - background-color: rgba(255, 255, 255, 0); - border: 0px; - } - QCheckBox::indicator { - width: 20px; - height: 20px; - border-radius: 10px; - background-color: rgb(90, 37, 255); - border: 2px solid rgb(255, 255, 255); - } - QCheckBox::indicator:checked { - background-color: rgb(90, 37, 255); - border: 2px solid rgb(255, 255, 255); - } - """) - - # Create Load DICOM button - self._load_dicom_button = QPushButton("Load DICOM File") - self._load_dicom_button.setMinimumSize(200, 41) - self._load_dicom_button.setMaximumSize(200, 41) - self._load_dicom_button.setStyleSheet(""" - QPushButton { - background-color: rgb(90, 37, 255); - color: rgb(255, 255, 255); - border-radius: 10px; - font-size: 14px; - font-weight: bold; - } - QPushButton:hover { - background-color: rgb(120, 67, 255); - } - QPushButton:pressed { - background-color: rgb(60, 17, 195); - } - """) - - # Create transparency label - self._transparency_label = QLabel("Transparency:") - self._transparency_label.setMinimumSize(100, 41) - self._transparency_label.setMaximumSize(100, 41) - self._transparency_label.setStyleSheet(""" - QLabel { - font-size: 15px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - } - """) - self._transparency_label.setAlignment(Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter) - - # Create transparency slider - self._transparency_slider = QSlider() - self._transparency_slider.setMinimumSize(200, 41) - self._transparency_slider.setMaximumSize(200, 41) - self._transparency_slider.setOrientation(Qt.Orientation.Horizontal) - self._transparency_slider.setMinimum(0) - self._transparency_slider.setMaximum(100) - self._transparency_slider.setValue(50) - self._transparency_slider.setStyleSheet(""" - QSlider::groove:horizontal { - border: 1px solid #999999; - height: 8px; - background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4); - margin: 2px 0; - } - QSlider::handle:horizontal { - background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); - border: 1px solid #5c5c5c; - width: 18px; - margin: 2px 0; - border-radius: 3px; - } - """) - - # Create transparency value label - self._transparency_value_label = QLabel("50") - self._transparency_value_label.setMinimumSize(40, 41) - self._transparency_value_label.setMaximumSize(40, 41) - self._transparency_value_label.setStyleSheet(""" - QLabel { - font-size: 15px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - } - """) - self._transparency_value_label.setAlignment(Qt.AlignmentFlag.AlignCenter) - - # Create layout for overlay controls (vertical layout) - overlay_main_layout = QVBoxLayout() - overlay_main_layout.setSpacing(10) - - # First row: checkbox and load button - overlay_button_layout = QHBoxLayout() - overlay_button_layout.setSpacing(10) - overlay_button_layout.addWidget(self._dicom_overlay_checkbox) - overlay_button_layout.addWidget(self._load_dicom_button) - - # Second row: transparency controls - overlay_transparency_layout = QHBoxLayout() - overlay_transparency_layout.setSpacing(10) - overlay_transparency_layout.addWidget(self._transparency_label) - overlay_transparency_layout.addWidget(self._transparency_slider) - overlay_transparency_layout.addWidget(self._transparency_value_label) - - # Add both layouts to main overlay layout - overlay_main_layout.addLayout(overlay_button_layout) - overlay_main_layout.addLayout(overlay_transparency_layout) - - # Insert the overlay layout into the main ROI layout - self._ui.draw_roi_layout.insertLayout(2, overlay_main_layout) - - # Apply visibility logic - if not self._image_data.dicom_available: - self._dicom_overlay_checkbox.hide() - self._transparency_slider.hide() - self._transparency_label.hide() - self._transparency_value_label.hide() - self._load_dicom_button.show() - else: - self._dicom_overlay_checkbox.show() - self._dicom_overlay_checkbox.setChecked(False) - self._transparency_slider.show() - self._transparency_slider.setValue(50) - self._transparency_slider.setEnabled(False) - self._transparency_label.show() - self._transparency_value_label.show() - self._transparency_value_label.setText("50") - self._load_dicom_button.hide() def _connect_signals(self) -> None: """Connect UI signals to internal handlers.""" @@ -574,16 +390,12 @@ def _connect_signals(self) -> None: self._ui.back_from_save_button.clicked.connect(self._show_draw_type_selection) # Connect brightness slider - if self._brightness_slider: - self._brightness_slider.valueChanged.connect(self._on_brightness_changed) + self._brightness_slider.valueChanged.connect(self._on_brightness_changed) # Connect DICOM overlay controls - if self._dicom_overlay_checkbox: - self._dicom_overlay_checkbox.toggled.connect(self._on_overlay_toggled) - if self._transparency_slider: - self._transparency_slider.valueChanged.connect(self._on_transparency_changed) - if self._load_dicom_button: - self._load_dicom_button.clicked.connect(self._on_load_dicom_clicked) + self._dicom_overlay_checkbox.toggled.connect(self._on_overlay_toggled) + self._transparency_slider.valueChanged.connect(self._on_transparency_changed) + self._load_dicom_button.clicked.connect(self._on_load_dicom_clicked) def _on_brightness_changed(self, value: int) -> None: """Handle brightness slider change.""" @@ -625,8 +437,21 @@ def _on_load_dicom_clicked(self) -> None: ) if dicom_file: - # Try to load the DICOM file - if self._image_data.load_dicom_file(dicom_file): + # Check if we have access to the model + model = None + if hasattr(self, '_parent_controller') and self._parent_controller: + if hasattr(self._parent_controller, 'model'): + model = self._parent_controller.model + + # Try to load the DICOM file via model if available, else fallback to DicomLoader + if model: + success = model.load_dicom_file(dicom_file) + else: + from src.qus.image_loading.dicom_loader import DicomLoader + dicom_pixels = DicomLoader.load_dicom_file(dicom_file) + success = dicom_pixels is not None + + if success: # Successfully loaded - update UI if self._load_dicom_button: self._load_dicom_button.hide() From 4689fe349c8386b6553f56f0c14bd3726bdf7f34 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 15:36:08 +0100 Subject: [PATCH 17/61] chore: update qus engine submodule to include B-mode analysis plugins --- engines/qus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/qus b/engines/qus index 12411aa..8fbc1bb 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit 12411aa2b6f90391a68da93073a2363ff186ec19 +Subproject commit 8fbc1bb488484a7483947e42460b262621368e82 From 4adadf69bd2e6dce7749d9fa133899f9a88f2f78 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 15:36:08 +0100 Subject: [PATCH 18/61] refactor: integrate application model with view coordinators for unified DICOM access --- src/qus/application_model.py | 1 + src/qus/seg_loading/seg_loading_controller.py | 1 + src/qus/seg_loading/seg_loading_view_coordinator.py | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/src/qus/application_model.py b/src/qus/application_model.py index c945f0d..1930593 100644 --- a/src/qus/application_model.py +++ b/src/qus/application_model.py @@ -6,6 +6,7 @@ """ import os +import numpy as np from typing import Dict, Any, Optional, Tuple from PyQt6.QtCore import QThread, pyqtSignal diff --git a/src/qus/seg_loading/seg_loading_controller.py b/src/qus/seg_loading/seg_loading_controller.py index 3ccd4fd..cedf85c 100644 --- a/src/qus/seg_loading/seg_loading_controller.py +++ b/src/qus/seg_loading/seg_loading_controller.py @@ -32,6 +32,7 @@ def __init__(self, model: Optional[ApplicationModel] = None, custom_view=None): if not image_data: raise ValueError("No image loaded in ApplicationModel") view = SegLoadingViewCoordinator(image_data) + view.controller = self super().__init__(model, view) diff --git a/src/qus/seg_loading/seg_loading_view_coordinator.py b/src/qus/seg_loading/seg_loading_view_coordinator.py index 6a46f58..dadbcbe 100644 --- a/src/qus/seg_loading/seg_loading_view_coordinator.py +++ b/src/qus/seg_loading/seg_loading_view_coordinator.py @@ -46,6 +46,7 @@ class SegLoadingViewCoordinator(QStackedWidget): def __init__(self, image_data: UltrasoundRfImage, parent: Optional[QWidget] = None): super().__init__(parent) self._image_data = image_data + self.controller = None # Widget instances self._seg_type_widget: Optional[SegTypeSelectionWidget] = None @@ -193,6 +194,10 @@ def show_roi_drawing(self, frame=0) -> None: # Create ROI drawing widget with brightness value self._roi_drawing_widget = RoiDrawingWidget(self._image_data, frame, self._frame_brightness) + # Pass controller reference for DICOM loading via model + if hasattr(self, 'controller') and self.controller: + self._roi_drawing_widget._parent_controller = self.controller + # Connect signals self._roi_drawing_widget.seg_file_selected.connect(self._on_file_selected) self._roi_drawing_widget.back_requested.connect(self._on_roi_draw_back) From c112498266b712c13ee38f1ac4e860189dc573d2 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 15:36:08 +0100 Subject: [PATCH 19/61] ui: modernize ROI drawing interface and add standard loading indicator --- src/qus/seg_loading/ui/roi_drawing.ui | 29 ++++++++++++++++----- src/qus/seg_loading/ui/roi_drawing_ui.py | 32 ++++++++++++------------ 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/src/qus/seg_loading/ui/roi_drawing.ui b/src/qus/seg_loading/ui/roi_drawing.ui index 181f870..a77aec3 100644 --- a/src/qus/seg_loading/ui/roi_drawing.ui +++ b/src/qus/seg_loading/ui/roi_drawing.ui @@ -530,6 +530,23 @@
+ + + + QLabel { + color: rgb(0, 255, 0); + font-size: 20px; + background-color: rgba(255, 255, 255, 0); +} + + + LOADING.... + + + Qt::AlignCenter + + + @@ -1132,22 +1149,22 @@ QSlider::handle:horizontal { - 200 + 241 41 - 200 + 241 41 QPushButton { - background-color: rgb(90, 37, 255); - color: rgb(255, 255, 255); - border-radius: 10px; - font-size: 14px; + color: white; + font-size: 16px; + background: rgb(90, 37, 255); + border-radius: 15px; font-weight: bold; } QPushButton:hover { diff --git a/src/qus/seg_loading/ui/roi_drawing_ui.py b/src/qus/seg_loading/ui/roi_drawing_ui.py index fdbf8e9..7317dcb 100644 --- a/src/qus/seg_loading/ui/roi_drawing_ui.py +++ b/src/qus/seg_loading/ui/roi_drawing_ui.py @@ -211,6 +211,15 @@ def setupUi(self, constructRoi): self.back_button.setObjectName("back_button") self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) self.side_bar_layout.addWidget(self.gridFrame) + self.loading_screen_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.loading_screen_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_screen_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_screen_label.setObjectName("loading_screen_label") + self.side_bar_layout.addWidget(self.loading_screen_label) self.full_screen_layout.addLayout(self.side_bar_layout) self.draw_roi_layout = QtWidgets.QVBoxLayout() self.draw_roi_layout.setContentsMargins(30, 10, 30, 10) @@ -495,13 +504,13 @@ def setupUi(self, constructRoi): self.overlay_control_layout.addWidget(self.transparency_value_label) self.draw_roi_layout.addLayout(self.overlay_control_layout) self.load_dicom_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.load_dicom_button.setMinimumSize(QtCore.QSize(200, 41)) - self.load_dicom_button.setMaximumSize(QtCore.QSize(200, 41)) + self.load_dicom_button.setMinimumSize(QtCore.QSize(241, 41)) + self.load_dicom_button.setMaximumSize(QtCore.QSize(241, 41)) self.load_dicom_button.setStyleSheet("QPushButton {\n" -" background-color: rgb(90, 37, 255);\n" -" color: rgb(255, 255, 255);\n" -" border-radius: 10px;\n" -" font-size: 14px;\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" " font-weight: bold;\n" "}\n" "QPushButton:hover {\n" @@ -867,6 +876,7 @@ def retranslateUi(self, constructRoi): self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) self.back_button.setText(_translate("constructRoi", "Back")) + self.loading_screen_label.setText(_translate("constructRoi", "LOADING....")) self.physical_dims_label.setText(_translate("constructRoi", "Physical Dims (cm):")) self.physical_depth_label.setText(_translate("constructRoi", "Depth:")) self.physical_width_val.setText(_translate("constructRoi", "0")) @@ -905,13 +915,3 @@ def retranslateUi(self, constructRoi): self.physical_roi_width_val.setText(_translate("constructRoi", "0")) self.physical_roi_height_label.setText(_translate("constructRoi", "Depth")) self.physical_roi_height_val.setText(_translate("constructRoi", "0")) - - -if __name__ == "__main__": - import sys - app = QtWidgets.QApplication(sys.argv) - constructRoi = QtWidgets.QWidget() - ui = Ui_constructRoi() - ui.setupUi(constructRoi) - constructRoi.show() - sys.exit(app.exec()) From 10998466067d0ff01d550faa8ad8acab515ee699 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 12 Jan 2026 15:36:09 +0100 Subject: [PATCH 20/61] feat: implement real-time DICOM overlay and brightness adjustment in ROI drawing --- .../seg_loading/views/roi_drawing_widget.py | 107 +++++++++++++----- 1 file changed, 78 insertions(+), 29 deletions(-) diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index f43e50c..ef39bf9 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -75,6 +75,7 @@ def __init__(self, image_data: UltrasoundRfImage, frame: int = 0, brightness: in self._overlay_enabled = False # Track if overlay is currently enabled self._transparency_value = 50 # Default transparency (0-100) self._original_bmode_im = None # Store original B-mode for overlay blending + self._parent_controller = None # Reference to controller for model access self._setup_ui() self._connect_signals() @@ -148,6 +149,18 @@ def set_min_point_distance(self, distance: float) -> None: raise ValueError("Minimum distance must be non-negative") self._min_point_distance = distance + def show_loading(self) -> None: + """Show the loading screen label.""" + super().show_loading() + if hasattr(self._ui, 'loading_screen_label'): + self._ui.loading_screen_label.show() + + def hide_loading(self) -> None: + """Hide the loading screen label.""" + super().hide_loading() + if hasattr(self._ui, 'loading_screen_label'): + self._ui.loading_screen_label.hide() + def get_min_point_distance(self) -> float: """ Get the current minimum distance between points. @@ -220,13 +233,13 @@ def _update_overlay_display(self) -> None: This method handles the real-time overlay updates. """ if self._original_bmode_im is not None: - # Apply overlay to the original B-mode image - self._displayed_im = self._apply_dicom_overlay(self._original_bmode_im.copy()) + # 1. Apply overlay to a copy of the original B-mode image + blended_im = self._apply_dicom_overlay(self._original_bmode_im.copy()) - # Apply brightness adjustment on top of the blended image - self._apply_brightness_adjustment() + # 2. Apply brightness adjustment to the blended result + self._displayed_im = self._apply_brightness_adjustment(blended_im) - # Update the display + # 3. Update the matplotlib display self._update_display() def _update_drawing_status(self) -> None: @@ -298,6 +311,11 @@ def _setup_ui(self) -> None: 'physical_roi_dims_label', 'physical_roi_height_label', 'physical_roi_height_val', 'physical_roi_width_label', 'physical_roi_width_val' ] + self._dicom_menu_objects = [ + 'dicom_overlay_checkbox', 'transparency_slider', + 'transparency_label', 'transparency_value_label', + 'load_dicom_button' + ] # Setup matplotlib canvas for ROI drawing self._setup_matplotlib_canvas() @@ -311,6 +329,7 @@ def _setup_ui(self) -> None: # Display image for ROI drawing self._display_image_for_roi() + self._ui.loading_screen_label.hide() self._hide_save_menu() self._show_draw_type_selection() self._hide_roi_dims() @@ -402,8 +421,9 @@ def _on_brightness_changed(self, value: int) -> None: self._brightness_value = value if self._brightness_value_label: self._brightness_value_label.setText(str(value)) - self._apply_brightness_adjustment() - self._update_display() + + # Refresh the entire image display pipeline + self._update_overlay_display() def _on_overlay_toggled(self, checked: bool) -> None: """Handle DICOM overlay checkbox toggle.""" @@ -437,6 +457,11 @@ def _on_load_dicom_clicked(self) -> None: ) if dicom_file: + # Show loading text + self.show_loading() + from PyQt6.QtWidgets import QApplication + QApplication.processEvents() + # Check if we have access to the model model = None if hasattr(self, '_parent_controller') and self._parent_controller: @@ -451,6 +476,9 @@ def _on_load_dicom_clicked(self) -> None: dicom_pixels = DicomLoader.load_dicom_file(dicom_file) success = dicom_pixels is not None + # Hide loading text + self.hide_loading() + if success: # Successfully loaded - update UI if self._load_dicom_button: @@ -467,6 +495,9 @@ def _on_load_dicom_clicked(self) -> None: if self._transparency_value_label: self._transparency_value_label.show() self._transparency_value_label.setText("50") + + # Update display to refresh overlay visibility state + self._update_overlay_display() else: # Failed to load - show error message from PyQt6.QtWidgets import QMessageBox @@ -476,30 +507,35 @@ def _on_load_dicom_clicked(self) -> None: "Failed to load the selected DICOM file. Please check the file format and try again." ) - def _apply_brightness_adjustment(self) -> None: - """Apply brightness adjustment to the displayed image using exponential function.""" - if self._displayed_im is None: - return - - # Calculate exponential coefficient based on brightness slider (0-100) - # Map 0-100 to 0.05-5.0 for more intense exponential range - exp_coefficient = 0.05 + (self._brightness_value / 100.0) * 4.95 + def _apply_brightness_adjustment(self, image: np.ndarray) -> np.ndarray: + """ + Apply brightness adjustment to an image using a gamma/power function. - # Apply exponential brightness adjustment to the current displayed image - # This preserves any overlay that has already been applied - adjusted_im = self._displayed_im.astype(np.float32) + Args: + image: Input image (0-255 uint8) + + Returns: + Adjusted image (0-255 uint8) + """ + if image is None: + return None + + # Map brightness slider (0-100) to gamma value + # 50 is the identity (no change) + # Higher than 50 increases brightness (lower gamma) + # Lower than 50 decreases brightness (higher gamma) + # Range: ~0.1 to ~10.0 + exponent = 10.0 ** ((50 - self._brightness_value) / 50.0) - # Normalize to 0-1 range for exponential operation - normalized_im = adjusted_im / 255.0 + # Normalize to 0-1 range for power operation + normalized_im = image.astype(np.float32) / 255.0 - # Apply exponential function: I_out = I_in^exp_coefficient - # This will make the image brighter as exp_coefficient increases - adjusted_im = np.power(normalized_im, 1.0 / exp_coefficient) + # Apply power function: I_out = I_in^exponent + adjusted_im = np.power(normalized_im, exponent) # Scale back to 0-255 range and clip - adjusted_im = adjusted_im * 255.0 - adjusted_im = np.clip(adjusted_im, 0, 255) - self._displayed_im = adjusted_im.astype(np.uint8) + adjusted_im = np.clip(adjusted_im * 255.0, 0, 255).astype(np.uint8) + return adjusted_im def _update_display(self) -> None: """Update the image display with current brightness.""" @@ -568,12 +604,12 @@ def _display_image_for_roi(self) -> None: # Apply DICOM overlay first (if enabled) if self._overlay_enabled: - self._displayed_im = self._apply_dicom_overlay(self._original_bmode_im.copy()) + blended_im = self._apply_dicom_overlay(self._original_bmode_im.copy()) else: - self._displayed_im = self._original_bmode_im.copy() + blended_im = self._original_bmode_im.copy() # Apply brightness adjustment on top - self._apply_brightness_adjustment() + self._displayed_im = self._apply_brightness_adjustment(blended_im) self._plot_im_on_ax(self._ax) self._matplotlib_canvas.draw() @@ -867,6 +903,9 @@ def _show_save_menu(self) -> None: self._hide_draw_freehand_drag() self._hide_draw_rect_drag() self._hide_draw_pts() + self._hide_draw_type_selection() + self._hide_dicom_controls() + try: self._ax.figure.canvas.mpl_disconnect(self._cid_press) except Exception: @@ -905,6 +944,15 @@ def _hide_draw_type_selection(self) -> None: else: print(f"Warning: Widget '{obj_name}' not found in UI") + def _hide_dicom_controls(self) -> None: + """Hide the DICOM controls.""" + for obj_name in self._dicom_menu_objects: + widget = getattr(self._ui, obj_name, None) + if widget: + widget.hide() + else: + print(f"Warning: Widget '{obj_name}' not found in UI") + def _show_draw_type_selection(self) -> None: """Show the draw type selection layout.""" # Remove the current ROI @@ -946,6 +994,7 @@ def _show_draw_type_selection(self) -> None: self._hide_draw_freehand_drag() self._hide_draw_rect_drag() self._hide_draw_pts() + self._setup_dicom_overlay_control() for obj_name in self._draw_types_objects: widget = getattr(self._ui, obj_name, None) From 4ace72c8eefa0d5fc9beaf608c8c5f29e9abed96 Mon Sep 17 00:00:00 2001 From: omid Date: Tue, 13 Jan 2026 09:58:27 +0100 Subject: [PATCH 21/61] UI: make 'Load DICOM File' button text normal instead of bold --- src/qus/seg_loading/ui/roi_drawing.ui | 1 - src/qus/seg_loading/ui/roi_drawing_ui.py | 1 - 2 files changed, 2 deletions(-) diff --git a/src/qus/seg_loading/ui/roi_drawing.ui b/src/qus/seg_loading/ui/roi_drawing.ui index a77aec3..3217608 100644 --- a/src/qus/seg_loading/ui/roi_drawing.ui +++ b/src/qus/seg_loading/ui/roi_drawing.ui @@ -1165,7 +1165,6 @@ QSlider::handle:horizontal { font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; - font-weight: bold; } QPushButton:hover { background-color: rgb(120, 67, 255); diff --git a/src/qus/seg_loading/ui/roi_drawing_ui.py b/src/qus/seg_loading/ui/roi_drawing_ui.py index 7317dcb..024639d 100644 --- a/src/qus/seg_loading/ui/roi_drawing_ui.py +++ b/src/qus/seg_loading/ui/roi_drawing_ui.py @@ -511,7 +511,6 @@ def setupUi(self, constructRoi): " font-size: 16px;\n" " background: rgb(90, 37, 255);\n" " border-radius: 15px;\n" -" font-weight: bold;\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(120, 67, 255);\n" From 0d2636e38dc3a6eb695f4c10f50f9101cd0f8f69 Mon Sep 17 00:00:00 2001 From: Haseeb Garfinkel Date: Sun, 18 Jan 2026 12:40:06 -0800 Subject: [PATCH 22/61] Updated readme for windows users --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b0dfdac..100bca7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ To clone this repository, run git clone --recurse-submodules https://github.com/QuantUS-OpenSource/QuantUS.git ``` -To set up the Python virtual environment and install dependencies to run QuantUS, run the following commands. Let `PYTHON311` be the path to your Python3.11 interpreter. +To set up the Python virtual environment and install dependencies to run QuantUS, run the following commands. Let `PYTHON311` be the path to your Python3.11 interpreter. Note that if you are using Windows, the pyradiomics install below may fail without an additional installation (more on this below). ```shell cd QuantUS @@ -42,6 +42,10 @@ source .venv/bin/activate # Unix python qus_gui.py | ceus_gui.py # Run QUS or CEUS GUI ``` +### Note for Windows users + +If you encounter an error during the pyradiomics install above, you will need to first install Microsoft C++ Build Tools, which can be found here: https://visualstudio.microsoft.com/visual-cpp-build-tools/ + ### Keeping your version up to date To keep your local copy of all QuantUS backends up to date, run the following commands from the root `QuantUS` directory to update all backends to their latest versions: From ff88ced47b55a592f418fcde8a4815c72ef178b9 Mon Sep 17 00:00:00 2001 From: Haseeb Garfinkel Date: Sun, 18 Jan 2026 14:27:58 -0800 Subject: [PATCH 23/61] Updated gui for qus to qus analysis on sidebar --- .../ui/analysis_function_selection.ui | 56 +- .../analysis_loading/ui/analysis_params.ui | 64 +- .../ui/config_file_selection.ui | 72 +- src/qus/config_loading/ui/config_preview.ui | 80 +- .../ui/config_type_selection.ui | 60 +- src/qus/config_loading/ui/custom_params.ui | 56 +- src/qus/export_loading/ui/export_loading.ui | 904 +++--- src/qus/image_loading/ui/file_selection.ui | 78 +- src/qus/image_loading/ui/scan_type.ui | 52 +- src/qus/seg_loading/ui/frame_selection.ui | 1138 +++---- src/qus/seg_loading/ui/roi_drawing.ui | 2642 +++++++++-------- src/qus/seg_loading/ui/roi_preview.ui | 1164 ++++---- src/qus/seg_loading/ui/seg_file_selection.ui | 1272 ++++---- src/qus/seg_loading/ui/seg_type_selection.ui | 980 +++--- src/qus/seg_loading/ui/voi_drawing.ui | 196 +- src/qus/seg_loading/ui/voi_preview.ui | 178 +- .../ui/visualization_function_selection.ui | 72 +- .../ui/visualization_preview_2d.ui | 60 +- 18 files changed, 4579 insertions(+), 4545 deletions(-) diff --git a/src/qus/analysis_loading/ui/analysis_function_selection.ui b/src/qus/analysis_loading/ui/analysis_function_selection.ui index 31cd0fa..ddeaa92 100644 --- a/src/qus/analysis_loading/ui/analysis_function_selection.ui +++ b/src/qus/analysis_loading/ui/analysis_function_selection.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -296,10 +296,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -323,7 +323,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -355,10 +355,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -379,10 +379,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -479,7 +479,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -492,7 +492,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -564,13 +564,13 @@ Select analysis methods to run: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -580,7 +580,7 @@ - + @@ -610,7 +610,7 @@ - Qt::Vertical + Qt::Orientation::Vertical diff --git a/src/qus/analysis_loading/ui/analysis_params.ui b/src/qus/analysis_loading/ui/analysis_params.ui index f556e39..b14eb9e 100644 --- a/src/qus/analysis_loading/ui/analysis_params.ui +++ b/src/qus/analysis_loading/ui/analysis_params.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -296,10 +296,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -323,7 +323,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -355,10 +355,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -379,10 +379,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -479,7 +479,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -492,7 +492,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -564,13 +564,13 @@ Analysis in Progress... - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -590,13 +590,13 @@ Configure Analysis Parameters: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -614,7 +614,7 @@ 0 0 409 - 295 + 284 @@ -634,11 +634,11 @@ Running Analysis.... - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - + @@ -668,7 +668,7 @@ - Qt::Vertical + Qt::Orientation::Vertical diff --git a/src/qus/config_loading/ui/config_file_selection.ui b/src/qus/config_loading/ui/config_file_selection.ui index 02d0888..ddbbaf8 100644 --- a/src/qus/config_loading/ui/config_file_selection.ui +++ b/src/qus/config_loading/ui/config_file_selection.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -296,10 +296,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -323,7 +323,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -355,10 +355,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -379,10 +379,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -479,7 +479,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -492,7 +492,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -564,13 +564,13 @@ Select Configuration File: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -588,7 +588,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -612,14 +612,14 @@ (.rf, .rfd, .mat, .bin) - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -646,7 +646,7 @@ 1 - + @@ -673,7 +673,7 @@ - + @@ -705,7 +705,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -731,13 +731,13 @@ Configuration Loading Options: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -769,7 +769,7 @@ Configuration Loading Options: - + diff --git a/src/qus/config_loading/ui/config_preview.ui b/src/qus/config_loading/ui/config_preview.ui index dc958de..b67483c 100644 --- a/src/qus/config_loading/ui/config_preview.ui +++ b/src/qus/config_loading/ui/config_preview.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -296,10 +296,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -323,7 +323,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -355,10 +355,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -379,10 +379,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -479,7 +479,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -492,7 +492,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -564,13 +564,13 @@ Configuration Preview - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -589,7 +589,7 @@ Review the analysis configuration parameters below. These settings will be used for the quantitative ultrasound analysis. - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -625,10 +625,10 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { } - Qt::ScrollBarAsNeeded + Qt::ScrollBarPolicy::ScrollBarAsNeeded - Qt::ScrollBarAsNeeded + Qt::ScrollBarPolicy::ScrollBarAsNeeded true @@ -639,7 +639,7 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { 0 0 586 - 449 + 476 @@ -1039,7 +1039,7 @@ QGroupBox::title { - Qt::Vertical + Qt::Orientation::Vertical @@ -1053,7 +1053,7 @@ QGroupBox::title { - + @@ -1110,7 +1110,7 @@ QGroupBox::title { - + QLabel { @@ -1123,14 +1123,14 @@ QGroupBox::title { Dest Folder - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + QLabel { @@ -1143,10 +1143,10 @@ QGroupBox::title { Config Name - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1293,7 +1293,7 @@ QGroupBox::title { - + @@ -1323,7 +1323,7 @@ QGroupBox::title { - Qt::Vertical + Qt::Orientation::Vertical diff --git a/src/qus/config_loading/ui/config_type_selection.ui b/src/qus/config_loading/ui/config_type_selection.ui index 4a09751..b595eb4 100644 --- a/src/qus/config_loading/ui/config_type_selection.ui +++ b/src/qus/config_loading/ui/config_type_selection.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -296,10 +296,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -323,7 +323,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -355,10 +355,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -379,10 +379,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -479,7 +479,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -492,7 +492,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -545,7 +545,7 @@ 30 - + QLabel { @@ -558,13 +558,13 @@ Select Configuration Type: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -597,7 +597,7 @@ - + @@ -627,7 +627,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -644,4 +644,4 @@ - \ No newline at end of file + diff --git a/src/qus/config_loading/ui/custom_params.ui b/src/qus/config_loading/ui/custom_params.ui index 09c93b0..0eb8c97 100644 --- a/src/qus/config_loading/ui/custom_params.ui +++ b/src/qus/config_loading/ui/custom_params.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -296,10 +296,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -323,7 +323,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -355,10 +355,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -379,10 +379,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -479,7 +479,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -492,7 +492,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -564,13 +564,13 @@ Custom Parameters Configuration - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -721,7 +721,7 @@ - + @@ -751,7 +751,7 @@ - Qt::Vertical + Qt::Orientation::Vertical diff --git a/src/qus/export_loading/ui/export_loading.ui b/src/qus/export_loading/ui/export_loading.ui index 96a7c06..52bfe9d 100644 --- a/src/qus/export_loading/ui/export_loading.ui +++ b/src/qus/export_loading/ui/export_loading.ui @@ -2,6 +2,14 @@ exportLoading + + + 0 + 0 + 1400 + 713 + + 1400 @@ -30,553 +38,551 @@ 0 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - - - QLayout::SetMaximumSize - - - - - - 341 - 601 - - - - - 241 - 601 - - - - <html><head/><body><p><br/></p></body></html> - - - QWidget { - background-color: rgb(28, 0, 101); -} - - - - - 0 - 0 - 341 - 121 - - + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + QLayout::SizeConstraint::SetMaximumSize + + + 341 - 121 + 601 - 341 - 121 + 241 + 601 + + <html><head/><body><p><br/></p></body></html> + - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; + QWidget { + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - + - 70 + 0 0 - 191 - 51 + 341 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 70 + 0 + 191 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image Selection: - - - Qt::AlignCenter - - - - - - -60 - 40 - 191 - 51 - - - - QLabel { + + + Image Selection: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -60 + 40 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image: - - - Qt::AlignCenter - - - - - - -50 - 70 - 191 - 51 - - - - QLabel { + + + Image: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -50 + 70 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold } - - - Phantom: - - - Qt::AlignCenter - - - - - - 100 - 40 - 241 - 51 - - - - QLabel { + + + Phantom: + + + Qt::AlignmentFlag::AlignCenter + + + + + + 100 + 40 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 100 - 70 - 241 - 51 - - - - QLabel { + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + 100 + 70 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + - - - - - 0 - 120 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 40 + 120 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 40 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Segmentation Selection - - - Qt::AlignCenter - + + + Segmentation Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 240 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 240 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight:bold; } - - - Analysis Parameter Selection - - - Qt::AlignCenter - + + + Analysis Parameter Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 360 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 360 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Radio Frequency Data Analysis - - - Qt::AlignCenter - + + + QUS Analysis + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 480 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + - 20 - 30 - 301 - 51 + 0 + 480 + 341 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 301 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Visualization / Export - - - Qt::AlignCenter - + + + Visualization / Export + + + Qt::AlignmentFlag::AlignCenter + + - - - - - - - - 341 - 16777215 - - - - QFrame { + + + + + + 341 + 16777215 + + + + QFrame { background-color: rgb(28, 0, 101); } - - - - QLayout::SetMinAndMaxSize - - - 10 - - - 10 - - - 10 - - 10 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 200 - 41 - - - - - 200 - 41 - - - - QPushButton { + + + QLayout::SizeConstraint::SetMinAndMaxSize + + + 10 + + + 10 + + + 10 + + + 10 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 200 + 41 + + + + + 200 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Back - - - - - - - - - - - - 10 - - - 20 - - - 20 - - - 20 - - - 20 - - - - - QLabel { + + + Back + + + + + + + + + + + + 10 + + + 20 + + + 20 + + + 20 + + + 20 + + + + + QLabel { font-size: 29px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Data Export Configuration - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - false - - - - + + + Data Export Configuration + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + false + + + + QStackedWidget { @@ -585,7 +591,6 @@ - @@ -614,22 +619,21 @@ - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + diff --git a/src/qus/image_loading/ui/file_selection.ui b/src/qus/image_loading/ui/file_selection.ui index 553aa6a..f546274 100644 --- a/src/qus/image_loading/ui/file_selection.ui +++ b/src/qus/image_loading/ui/file_selection.ui @@ -46,7 +46,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -98,10 +98,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -125,7 +125,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -150,7 +150,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -175,7 +175,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -201,10 +201,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -228,7 +228,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -260,10 +260,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -284,10 +284,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -319,10 +319,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -346,7 +346,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -372,10 +372,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -399,7 +399,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -426,7 +426,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -443,7 +443,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -456,7 +456,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -528,13 +528,13 @@ Select Data and Phantom Files to Generate Ultrasound Image: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -554,7 +554,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -578,14 +578,14 @@ (.rf, .rfd, .mat, .bin) - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -668,7 +668,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -691,7 +691,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -715,14 +715,14 @@ (.rf, .rfd, .mat, .bin) - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -805,7 +805,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -833,13 +833,13 @@ Image Loading Options: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -871,7 +871,7 @@ Image Loading Options: - + @@ -911,7 +911,7 @@ Image Loading Options: LOADING.... - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -930,7 +930,7 @@ smaller than corresponding dimension of image data - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter diff --git a/src/qus/image_loading/ui/scan_type.ui b/src/qus/image_loading/ui/scan_type.ui index 3650a4f..b6af561 100644 --- a/src/qus/image_loading/ui/scan_type.ui +++ b/src/qus/image_loading/ui/scan_type.ui @@ -46,7 +46,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -98,10 +98,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -125,7 +125,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -150,7 +150,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -175,7 +175,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -201,10 +201,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -228,7 +228,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -260,10 +260,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -284,10 +284,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -319,10 +319,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -346,7 +346,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -372,10 +372,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -399,7 +399,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -426,7 +426,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -443,7 +443,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -469,7 +469,7 @@ 30 - + QLabel { @@ -482,13 +482,13 @@ Select Data Type: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -521,7 +521,7 @@ - + @@ -551,7 +551,7 @@ - Qt::Vertical + Qt::Orientation::Vertical diff --git a/src/qus/seg_loading/ui/frame_selection.ui b/src/qus/seg_loading/ui/frame_selection.ui index c4feee0..e5290c2 100644 --- a/src/qus/seg_loading/ui/frame_selection.ui +++ b/src/qus/seg_loading/ui/frame_selection.ui @@ -2,6 +2,14 @@ constructRoi + + + 0 + 0 + 1400 + 713 + + 1400 @@ -30,487 +38,691 @@ 0 - - - - - - 0 - - - QLayout::SetMaximumSize - - - - - - 341 - 601 - - - - - 241 - 601 - - - - <html><head/><body><p><br/></p></body></html> - - - QWidget { - background-color: rgb(28, 0, 101); -} - - - - - 0 - 0 - 341 - 121 - - + + + + + 0 + + + QLayout::SizeConstraint::SetMaximumSize + + + 341 - 121 + 601 - 341 - 121 + 241 + 601 + + <html><head/><body><p><br/></p></body></html> + - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; + QWidget { + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - + - 70 + 0 0 - 191 - 51 + 341 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 70 + 0 + 191 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image Selection: - - - Qt::AlignCenter - - - - - - -60 - 40 - 191 - 51 - - - - QLabel { + + + Image Selection: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -60 + 40 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image: - - - Qt::AlignCenter - - - - - - -50 - 70 - 191 - 51 - - - - QLabel { + + + Image: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -50 + 70 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold } - - - Phantom: - - - Qt::AlignCenter - - - - - - 100 - 40 - 241 - 51 - - - - QLabel { + + + Phantom: + + + Qt::AlignmentFlag::AlignCenter + + + + + + 100 + 40 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 100 - 70 - 241 - 51 - - - - QLabel { + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + 100 + 70 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + - - - - - 0 - 120 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 40 + 120 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 40 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Segmentation Selection - - - Qt::AlignCenter - + + + Segmentation Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 360 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 360 341 - 51 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } + + + QUS Analysis + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 480 + 341 + 121 + - - Radio Frequency Data Analysis + + + 341 + 121 + - - Qt::AlignCenter + + + 341 + 121 + - - - - - - 0 - 480 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { + + QFrame { background-color: rgb(49, 0, 124); border: 1px solid black; } - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 20 - 30 - 301 - 51 - - - QLabel { + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 301 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Visualization / Export - - - Qt::AlignCenter - + + + Visualization / Export + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 240 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 240 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight:bold; } - - - Analysis Parameter Selection - - - Qt::AlignCenter - + + + Analysis Parameter Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - - - 341 - 16777215 - - - - QFrame { + + + + + + 341 + 16777215 + + + + QFrame { background-color: rgb(28, 0, 101); } - - - - QLayout::SetMinAndMaxSize - - 10 + + + QLayout::SizeConstraint::SetMinAndMaxSize + + + 10 + + + 10 + + + 10 + + + 10 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { + color: white; + font-size: 16px; + background: rgb(90, 37, 255); + border-radius: 15px; +} + + + Back + + + + + + + + + + + + 10 + + + 30 + + + 30 + + + 30 + + + 30 + + + + + QLabel { + font-size: 29px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} - - 10 + + Select Frame to Segment: - - 10 + + Qt::TextFormat::AutoText - + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + 10 + 10 + + + + + 501 + 321 + + + + + 16777215 + 16777215 + + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + + 10 - - - - Qt::Vertical + + + + + 251 + 41 + - + - 20 - 40 + 251 + 41 - - - - - Qt::Horizontal + Qt::Orientation::Horizontal - - - 40 - 20 - + + + + + + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter + + + true - + - - + + + + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + of + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + QLabel { + font-size: 15px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + - 131 + 201 41 - 131 + 201 41 @@ -523,221 +735,15 @@ } - Back + Accept Frame - - - - - - - - 10 - - - 30 - - - 30 - - - 30 - - - 30 - - - - - QLabel { - font-size: 29px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); -} - - - Select Frame to Segment: - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - - 10 - 10 - - - - - 501 - 321 - - - - - 16777215 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - 10 - - - - - - 251 - 41 - - - - - 251 - 41 - - - - Qt::Horizontal - - - - - - - QLabel { - font-size: 15px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); -} - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - - - - - QLabel { - font-size: 15px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); -} - - - of - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - QLabel { - font-size: 15px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); -} - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - - 201 - 41 - - - - - 201 - 41 - - - - QPushButton { - color: white; - font-size: 16px; - background: rgb(90, 37, 255); - border-radius: 15px; -} - - - Accept Frame - - - - - - - - - + + + + diff --git a/src/qus/seg_loading/ui/roi_drawing.ui b/src/qus/seg_loading/ui/roi_drawing.ui index c48c472..fb3989b 100644 --- a/src/qus/seg_loading/ui/roi_drawing.ui +++ b/src/qus/seg_loading/ui/roi_drawing.ui @@ -2,6 +2,14 @@ constructRoi + + + 0 + 0 + 1400 + 749 + + 1400 @@ -30,975 +38,974 @@ 0 - - - - - - 0 - - - QLayout::SetMaximumSize - - - - - - 341 - 601 - - - - - 241 - 601 - - - - <html><head/><body><p><br/></p></body></html> - - - QWidget { - background-color: rgb(28, 0, 101); -} - - - - - 0 - 0 - 341 - 121 - - + + + + + 0 + + + QLayout::SizeConstraint::SetMaximumSize + + + 341 - 121 + 601 - 341 - 121 + 241 + 601 + + <html><head/><body><p><br/></p></body></html> + - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; + QWidget { + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - + - 70 + 0 0 - 191 - 51 + 341 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 70 + 0 + 191 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image Selection: - - - Qt::AlignCenter - - - - - - -60 - 40 - 191 - 51 - - - - QLabel { + + + Image Selection: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -60 + 40 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image: - - - Qt::AlignCenter - - - - - - -50 - 70 - 191 - 51 - - - - QLabel { + + + Image: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -50 + 70 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold } - - - Phantom: - - - Qt::AlignCenter - - - - - - 100 - 40 - 241 - 51 - - - - QLabel { + + + Phantom: + + + Qt::AlignmentFlag::AlignCenter + + + + + + 100 + 40 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + 100 + 70 + 241 + 51 + + + + QLabel { + font-size: 14px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; +} + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + - + - 100 - 70 - 241 - 51 + 0 + 120 + 341 + 121 + + + 341 + 121 + + - QLabel { - font-size: 14px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - border: 0px; + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; } - - Sample filename + + QFrame::Shape::StyledPanel - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + QFrame::Shadow::Raised - - - - - - 0 - 120 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; + + + + 0 + 40 + 341 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold; } - - - QFrame::StyledPanel - - - QFrame::Raised - - + + + Segmentation Selection + + + Qt::AlignmentFlag::AlignCenter + + + + 0 - 40 + 360 341 - 51 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } + + + QUS Analysis + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 480 + 341 + 121 + - - Segmentation Selection + + + 341 + 121 + - - Qt::AlignCenter + + + 341 + 121 + - - - - - - 0 - 360 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { + + QFrame { background-color: rgb(49, 0, 124); border: 1px solid black; } - - - QFrame::StyledPanel - - - QFrame::Raised - - + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 301 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold; +} + + + Visualization / Export + + + Qt::AlignmentFlag::AlignCenter + + + + 0 - 30 + 240 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; - font-weight: bold; + font-weight:bold; } - - - Radio Frequency Data Analysis - - - Qt::AlignCenter - + + + Analysis Parameter Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - 0 - 480 - 341 - 121 - - - - - 341 - 121 - - + + + 341 - 121 + 16777215 QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 20 - 30 - 301 - 51 - - - - QLabel { - font-size: 21px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - border: 0px; - font-weight: bold; -} + + + QLayout::SizeConstraint::SetMinAndMaxSize - - Visualization / Export - - - Qt::AlignCenter - - - - - - - 0 - 240 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 0 - 30 - 341 - 51 - + + 10 - - QLabel { - font-size: 21px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - border: 0px; - font-weight:bold; -} + + 10 - - Analysis Parameter Selection + + 10 - - Qt::AlignCenter + + 10 - - - - - - - - - 341 - 16777215 - - - - QFrame { - background-color: rgb(28, 0, 101); -} - - - - QLayout::SetMinAndMaxSize - - - 10 - - - 10 - - - 10 - - - 10 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Back - - - - - - - - - - - - 10 - - - 30 - - - 10 - - - 30 - - - 10 - - - - - 5 - - - - - - - - - QLabel { + + + Back + + + + + + + + + + + + 10 + + + 30 + + + 10 + + + 30 + + + 10 + + + + + 5 + + + + + + + + + QLabel { font-size: 18px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Physical Dims (cm): - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - - - - 129 - 0 - - - - QLabel { + + + Physical Dims (cm): + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + + + 129 + 0 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Depth: - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + Depth: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - - 129 - 0 - - - - QLabel { + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + + 129 + 0 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Width: - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - - - - - QLabel { + + + Width: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + + + + + QLabel { font-size: 29px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Construct Region of Interest (ROI): - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - - - QLabel { + + + Construct Region of Interest (ROI): + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + + QLabel { font-size: 18px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Pixel Dims: - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - - - QLabel { + + + Pixel Dims: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Width: - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + Width: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Depth: - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + Depth: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - - - - - - - - - - - - 241 - 41 - - - - - 241 - 41 - - - - QPushButton { + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + + + + + + + + + + + + 241 + 41 + + + + + 241 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Back - - - true - - - false - - - - - - - - 241 - 41 - - - - - 241 - 41 - - - - QPushButton { + + + Back + + + true + + + false + + + + + + + + 241 + 41 + + + + + 241 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Save ROI - - - true - - - false - - - - - - - - - - - - 221 - 41 - - - - - 221 - 41 - - - - QPushButton { + + + Save ROI + + + true + + + false + + + + + + + + + + + + 221 + 41 + + + + + 221 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Draw Freehand w Points - - - true - - - false - - - - - - - - 241 - 41 - - - - - 241 - 41 - - - - QPushButton { - color: white; + + + Draw Freehand w Points + + + true + + + false + + + + + + + + 241 + 41 + + + + + 241 + 41 + + + + QPushButton { + color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; @@ -1010,34 +1017,34 @@ QPushButton:checked { border-radius: 15px; } - - - Draw Freehand by Dragging - - - false - - - false - - - - - - - - 241 - 41 - - - - - 241 - 41 - - - - QPushButton { + + + Draw Freehand by Dragging + + + false + + + false + + + + + + + + 241 + 41 + + + + + 241 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); @@ -1050,572 +1057,571 @@ QPushButton:checked { border-radius: 15px; } - - - Draw Rectangle by Dragging - - - false - - - false - - - - - - - - - - - - 141 - 41 - - - - - 141 - 41 - - - - QPushButton { + + + Draw Rectangle by Dragging + + + false + + + false + + + + + + + + + + + + 141 + 41 + + + + + 141 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Clear ROI - - - false - - - - - - - - 141 - 41 - - - - - 141 - 41 - - - - QPushButton { + + + Clear ROI + + + false + + + + + + + + 141 + 41 + + + + + 141 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Undo Last Point - - - false - - - - - - - - 141 - 41 - - - - - 141 - 41 - - - - QPushButton { + + + Undo Last Point + + + false + + + + + + + + 141 + 41 + + + + + 141 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Close ROI - - - false - - - - - - - - 141 - 41 - - - - - 141 - 41 - - - - QPushButton { + + + Close ROI + + + false + + + + + + + + 141 + 41 + + + + + 141 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Back - - - false - - - - - - - - 141 - 41 - - - - - 141 - 41 - - - - QPushButton { + + + Back + + + false + + + + + + + + 141 + 41 + + + + + 141 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Save ROI - - - false - - - - - - - - - 10 - - - 10 - - - - - - 201 - 31 - - - - - 401 - 31 - - - - QLineEdit { + + + Save ROI + + + false + + + + + + + + + 10 + + + 10 + + + + + + 201 + 31 + + + + + 401 + 31 + + + + QLineEdit { background-color: rgb(249, 249, 249); color: black; } - - - - - - - QLabel { + + + + + + + QLabel { background-color: rgba(255, 255, 255, 0); color: white; font-size: 17px; } - - - Dest Folder - - - Qt::AlignCenter - - - Qt::NoTextInteraction - - - - - - - QLabel { + + + Dest Folder + + + Qt::AlignmentFlag::AlignCenter + + + Qt::TextInteractionFlag::NoTextInteraction + + + + + + + QLabel { background-color: rgba(255, 255, 255, 0); color: white; font-size: 17px; } - - - ROI Name - - - Qt::AlignCenter - - - Qt::NoTextInteraction - - - - - - - - 201 - 31 - - - - - 401 - 31 - - - - QLineEdit { + + + ROI Name + + + Qt::AlignmentFlag::AlignCenter + + + Qt::TextInteractionFlag::NoTextInteraction + + + + + + + + 201 + 31 + + + + + 401 + 31 + + + + QLineEdit { background-color: rgb(249, 249, 249); color: black; } - - - - - - - 10 - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + + + + + 10 + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Choose Folder - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + Choose Folder + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Clear Path - - - - - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + Clear Path + + + + + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Save - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + Save + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Back - - - - - - - - - - - - 10 - 10 - - - - - 501 - 321 - - - - - 16777215 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - - - - 200 - 0 - - - - QLabel { + + + Back + + + + + + + + + + + + 10 + 10 + + + + + 501 + 321 + + + + + 16777215 + 16777215 + + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + + + + + + 200 + 0 + + + + QLabel { font-size: 18px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Rect. Dims (cm): - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - QLabel { + + + Rect. Dims (cm): + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Width: - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + Width: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Depth - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - QLabel { + + + Depth + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - 0 - - - Qt::AutoText - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - + + + 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + true + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + diff --git a/src/qus/seg_loading/ui/roi_preview.ui b/src/qus/seg_loading/ui/roi_preview.ui index a581455..96b36cd 100644 --- a/src/qus/seg_loading/ui/roi_preview.ui +++ b/src/qus/seg_loading/ui/roi_preview.ui @@ -2,6 +2,14 @@ constructRoi + + + 0 + 0 + 1400 + 665 + + 1400 @@ -30,634 +38,633 @@ 0 - - - - - - 0 - - - QLayout::SetMaximumSize - - - - - - 341 - 601 - - - - - 241 - 601 - - - - <html><head/><body><p><br/></p></body></html> - - - QWidget { - background-color: rgb(28, 0, 101); -} - - - - - 0 - 0 - 341 - 121 - - + + + + + 0 + + + QLayout::SizeConstraint::SetMaximumSize + + + 341 - 121 + 601 - 341 - 121 + 241 + 601 + + <html><head/><body><p><br/></p></body></html> + - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; + QWidget { + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - + - 70 + 0 0 - 191 - 51 + 341 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 70 + 0 + 191 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image Selection: - - - Qt::AlignCenter - - - - - - -60 - 40 - 191 - 51 - - - - QLabel { + + + Image Selection: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -60 + 40 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image: - - - Qt::AlignCenter - - - - - - -50 - 70 - 191 - 51 - - - - QLabel { + + + Image: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -50 + 70 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold } - - - Phantom: - - - Qt::AlignCenter - - - - - - 100 - 40 - 241 - 51 - - - - QLabel { + + + Phantom: + + + Qt::AlignmentFlag::AlignCenter + + + + + + 100 + 40 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 100 - 70 - 241 - 51 - - - - QLabel { + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + 100 + 70 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + - - - - - 0 - 120 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 40 + 120 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 40 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Segmentation Selection - - - Qt::AlignCenter - + + + Segmentation Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 360 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 360 341 - 51 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } + + + QUS Analysis + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 480 + 341 + 121 + - - Radio Frequency Data Analysis + + + 341 + 121 + - - Qt::AlignCenter + + + 341 + 121 + - - - - - - 0 - 480 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { + + QFrame { background-color: rgb(49, 0, 124); border: 1px solid black; } - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 20 - 30 - 301 - 51 - - - QLabel { + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 301 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Visualization / Export - - - Qt::AlignCenter - + + + Visualization / Export + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 240 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 240 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight:bold; } - - - Analysis Parameter Selection - - - Qt::AlignCenter - + + + Analysis Parameter Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - - - 341 - 16777215 - - - - QFrame { + + + + + + 341 + 16777215 + + + + QFrame { background-color: rgb(28, 0, 101); } - - - - QLayout::SetMinAndMaxSize - - - 10 - - - 10 - - 10 - - - 10 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 10 - - - 30 - - - 10 - - - 30 - - - 10 - - - - - QLabel { + + + QLayout::SizeConstraint::SetMinAndMaxSize + + + 10 + + + 10 + + + 10 + + + 10 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + + + + 10 + + + 30 + + + 10 + + + 30 + + + 10 + + + + + QLabel { font-size: 29px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Segmentation: - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - - 16777215 - 16777215 - - - - - - - QLabel { + + + Segmentation: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + 16777215 + 16777215 + + + + + + + QLabel { font-size: 18px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Segmentation Name: - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - false - - - - - - - QLabel { + + + Segmentation Name: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + false + + + + + + + QLabel { font-size: 18px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - NAME - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - - - - - 16777215 - 16777215 - - - - - - - - 221 - 41 - - - - - 221 - 41 - - - - QPushButton { + + + NAME + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + + + + 16777215 + 16777215 + + + + + + + + 221 + 41 + + + + + 221 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Confirm - - - true - - - false - - - - - - - - 241 - 41 - - - - - 241 - 41 - - - - QPushButton { + + + Confirm + + + true + + + false + + + + + + + + 241 + 41 + + + + + 241 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); @@ -670,85 +677,84 @@ QPushButton:checked { border-radius: 15px; } - - - Back - - - false - - - false - - - - - - - - - - - 10 - 10 - - - - - 501 - 321 - - - - - 16777215 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - - 200 - 0 - - - - QLabel { + + + Back + + + false + + + false + + + + + + + + + + + 10 + 10 + + + + + 501 + 321 + + + + + 16777215 + 16777215 + + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + + + + 200 + 0 + + + + QLabel { font-size: 18px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Frame: 0 - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - + + + Frame: 0 + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + diff --git a/src/qus/seg_loading/ui/seg_file_selection.ui b/src/qus/seg_loading/ui/seg_file_selection.ui index a21e9b7..8bc8beb 100644 --- a/src/qus/seg_loading/ui/seg_file_selection.ui +++ b/src/qus/seg_loading/ui/seg_file_selection.ui @@ -2,6 +2,14 @@ constructRoi + + + 0 + 0 + 1400 + 838 + + 1400 @@ -30,454 +38,562 @@ 0 - - - - - - 0 - - - QLayout::SetMaximumSize - - - - - - 341 - 601 - - - - - 241 - 601 - - - - <html><head/><body><p><br/></p></body></html> - - - QWidget { - background-color: rgb(28, 0, 101); -} - - - - - 0 - 0 - 341 - 121 - - + + + + + 0 + + + QLayout::SizeConstraint::SetMaximumSize + + + 341 - 121 + 601 - 341 - 121 + 241 + 601 + + <html><head/><body><p><br/></p></body></html> + - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; + QWidget { + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - + - 70 + 0 0 - 191 - 51 + 341 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 70 + 0 + 191 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image Selection: - - - Qt::AlignCenter - - - - - - -60 - 40 - 191 - 51 - - - - QLabel { + + + Image Selection: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -60 + 40 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image: - - - Qt::AlignCenter - - - - - - -50 - 70 - 191 - 51 - - - - QLabel { + + + Image: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -50 + 70 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold } - - - Phantom: - - - Qt::AlignCenter - - - - - - 100 - 40 - 241 - 51 - - - - QLabel { + + + Phantom: + + + Qt::AlignmentFlag::AlignCenter + + + + + + 100 + 40 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 100 - 70 - 241 - 51 - - - - QLabel { + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + 100 + 70 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + - - - - - 0 - 120 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 40 + 120 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 40 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Segmentation Selection - - - Qt::AlignCenter - + + + Segmentation Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 360 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 360 341 - 51 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } + + + QUS Analysis + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 480 + 341 + 121 + - - Radio Frequency Data Analysis + + + 341 + 121 + - - Qt::AlignCenter + + + 341 + 121 + - - - - - - 0 - 480 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { + + QFrame { background-color: rgb(49, 0, 124); border: 1px solid black; } - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 20 - 30 - 301 - 51 - - - QLabel { + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 301 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } + + + Visualization / Export + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 240 + 341 + 121 + - - Visualization / Export + + + 341 + 121 + + + + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} - - Qt::AlignCenter + + QFrame::Shape::StyledPanel + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight:bold; +} + + + Analysis Parameter Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - 0 - 240 - 341 - 121 - - + + + 341 - 121 + 16777215 QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 0 - 30 - 341 - 51 - + + + QLayout::SizeConstraint::SetMinAndMaxSize - - QLabel { - font-size: 21px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); - border: 0px; - font-weight:bold; -} + + 10 - - Analysis Parameter Selection + + 10 - - Qt::AlignCenter + + 10 - + + 10 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { + color: white; + font-size: 16px; + background: rgb(90, 37, 255); + border-radius: 15px; +} + + + Back + + + + - - - - - - - 341 - 16777215 - - - - QFrame { - background-color: rgb(28, 0, 101); + + + + + + + 20 + + + 30 + + + 30 + + + 30 + + + 30 + + + + + QLabel { + font-size: 29px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); } - - - - QLayout::SetMinAndMaxSize - - 10 + + Select Segmentation File to Load: - - 10 + + Qt::TextFormat::AutoText - - 10 + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + 20 - - 10 + + 20 - - + + - Qt::Vertical + Qt::Orientation::Vertical @@ -487,353 +603,243 @@ - - - - Qt::Horizontal + + + + QLabel { + background-color: rgba(255, 255, 255, 0); + color: white; + font-size: 17px; +} - - - 40 - 20 - + + Input Path to Image file + (.rf, .rfd, .mat, .bin) - + + Qt::AlignmentFlag::AlignCenter + + + Qt::TextInteractionFlag::NoTextInteraction + + - - + + - 131 - 41 + 201 + 31 - 131 - 41 + 401 + 31 - QPushButton { - color: white; - font-size: 16px; - background: rgb(90, 37, 255); - border-radius: 15px; + QLineEdit { + background-color: rgb(249, 249, 249); + color: black; } - - Back - - - - - - - - - - 20 - - - 30 - - - 30 - - - 30 - - - 30 - - - - - QLabel { - font-size: 29px; - color: rgb(255, 255, 255); - background-color: rgba(255, 255, 255, 0); -} - - - Select Segmentation File to Load: - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - 20 - - - 20 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - QLabel { - background-color: rgba(255, 255, 255, 0); - color: white; - font-size: 17px; -} - - - Input Path to Image file - (.rf, .rfd, .mat, .bin) - - - Qt::AlignCenter - - - Qt::NoTextInteraction - - - - - - - - 201 - 31 - - - - - 401 - 31 - - - - QLineEdit { - background-color: rgb(249, 249, 249); - color: black; -} - - - - - - - 1 - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + + 1 + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Choose File - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + Choose File + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Clear Path - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - QLabel { + + + Clear Path + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + QLabel { font-size: 18px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - + + + Segmentation Loading Options: - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - QTableWidget { + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + QTableWidget { background: rgb(108, 108, 108); color: white; } - - - false - - - false - - - 0 - - - 0 - - - false - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + false + + + false + + + 0 + + + 0 + + + false + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Accept - - - - - - - QLabel { + + + Accept + + + + + + + QLabel { color: rgb(0, 255, 0); font-size: 20px; background-color: rgba(255, 255, 255, 0); } - - - LOADING.... - - - Qt::AlignCenter - - - - - - - QLabel { + + + LOADING.... + + + Qt::AlignmentFlag::AlignCenter + + + + + + + QLabel { color: rgb(255, 0, 23); font-size: 20px; background-color: rgba(255, 255, 255, 0); } - - - ERROR: At least one dimension of phantom data + + + ERROR: At least one dimension of phantom data smaller than corresponding dimension of image data - - - Qt::AlignCenter - - - - - - - + + + Qt::AlignmentFlag::AlignCenter + + + + + + diff --git a/src/qus/seg_loading/ui/seg_type_selection.ui b/src/qus/seg_loading/ui/seg_type_selection.ui index a698ce8..38366d6 100644 --- a/src/qus/seg_loading/ui/seg_type_selection.ui +++ b/src/qus/seg_loading/ui/seg_type_selection.ui @@ -2,6 +2,14 @@ constructRoi + + + 0 + 0 + 1400 + 713 + + 1400 @@ -30,615 +38,613 @@ 0 - - - - - - 0 - - - QLayout::SetMaximumSize - - - - - - 341 - 601 - - - - - 241 - 601 - - - - <html><head/><body><p><br/></p></body></html> - - - QWidget { - background-color: rgb(28, 0, 101); -} - - - - - 0 - 0 - 341 - 121 - - + + + + + 0 + + + QLayout::SizeConstraint::SetMaximumSize + + + 341 - 121 + 601 - 341 - 121 + 241 + 601 + + <html><head/><body><p><br/></p></body></html> + - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; + QWidget { + background-color: rgb(28, 0, 101); } - - QFrame::StyledPanel - - - QFrame::Raised - - + - 70 + 0 0 - 191 - 51 + 341 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 70 + 0 + 191 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image Selection: - - - Qt::AlignCenter - - - - - - -60 - 40 - 191 - 51 - - - - QLabel { + + + Image Selection: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -60 + 40 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Image: - - - Qt::AlignCenter - - - - - - -50 - 70 - 191 - 51 - - - - QLabel { + + + Image: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -50 + 70 + 191 + 51 + + + + QLabel { font-size: 16px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold } - - - Phantom: - - - Qt::AlignCenter - - - - - - 100 - 40 - 241 - 51 - - - - QLabel { + + + Phantom: + + + Qt::AlignmentFlag::AlignCenter + + + + + + 100 + 40 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 100 - 70 - 241 - 51 - - - - QLabel { + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + 100 + 70 + 241 + 51 + + + + QLabel { font-size: 14px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; } - - - Sample filename - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + - - - - - 0 - 120 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(99, 0, 174); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 40 + 120 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 40 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Segmentation Selection - - - Qt::AlignCenter - + + + Segmentation Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 360 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 360 341 - 51 + 121 + + + 341 + 121 + + + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } + + + QUS Analysis + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 480 + 341 + 121 + - - Radio Frequency Data Analysis + + + 341 + 121 + - - Qt::AlignCenter + + + 341 + 121 + - - - - - - 0 - 480 - 341 - 121 - - - - - 341 - 121 - - - - - 341 - 121 - - - - QFrame { + + QFrame { background-color: rgb(49, 0, 124); border: 1px solid black; } - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - 20 - 30 - 301 - 51 - - - QLabel { + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 301 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight: bold; } - - - Visualization / Export - - - Qt::AlignCenter - + + + Visualization / Export + + + Qt::AlignmentFlag::AlignCenter + + - - - - - 0 - 240 - 341 - 121 - - - - - 341 - 121 - - - - QFrame { - background-color: rgb(49, 0, 124); - border: 1px solid black; -} - - - QFrame::StyledPanel - - - QFrame::Raised - - + 0 - 30 + 240 341 - 51 + 121 + + + 341 + 121 + + - QLabel { + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { font-size: 21px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); border: 0px; font-weight:bold; } - - - Analysis Parameter Selection - - - Qt::AlignCenter - + + + Analysis Parameter Selection + + + Qt::AlignmentFlag::AlignCenter + + - - - - - - - 341 - 16777215 - - - - QFrame { + + + + + + 341 + 16777215 + + + + QFrame { background-color: rgb(28, 0, 101); } - - - - QLayout::SetMinAndMaxSize - - 10 - - - 10 - - - 10 - - - 10 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + QLayout::SizeConstraint::SetMinAndMaxSize + + + 10 + + + 10 + + + 10 + + + 10 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Back - - - - - - - - - - - - 50 - - - 30 - - - 30 - - - - - QLabel { + + + Back + + + + + + + + + + + + 50 + + + 30 + + + 30 + + + + + QLabel { font-size: 29px; color: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0); } - - - Select Segmentation Type: - - - Qt::AutoText - - - false - - - Qt::AlignCenter - - - true - - - - - - - - 180 - 41 - - - - - 16777215 - 16777215 - - - - - 16 - - - - QComboBox { + + + Select Segmentation Type: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + 180 + 41 + + + + + 16777215 + 16777215 + + + + + 16 + + + + QComboBox { color: white; } - - - - - - - - 131 - 41 - - - - - 131 - 41 - - - - QPushButton { + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { color: white; font-size: 16px; background: rgb(90, 37, 255); border-radius: 15px; } - - - Accept - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - + + + Accept + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + diff --git a/src/qus/seg_loading/ui/voi_drawing.ui b/src/qus/seg_loading/ui/voi_drawing.ui index c24c0b1..6617d02 100644 --- a/src/qus/seg_loading/ui/voi_drawing.ui +++ b/src/qus/seg_loading/ui/voi_drawing.ui @@ -30,7 +30,7 @@ 10 -200 1636 - 951 + 1640 @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -302,10 +302,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -326,10 +326,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -361,10 +361,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -388,7 +388,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -485,7 +485,7 @@ Observing! - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -519,7 +519,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -532,7 +532,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -551,7 +551,7 @@ Navigating! - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -591,7 +591,7 @@ - + @@ -610,10 +610,10 @@ Sagittal Plane - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -638,7 +638,7 @@ true - QFrame::Box + QFrame::Shape::Box @@ -650,7 +650,7 @@ 5 - + @@ -669,14 +669,14 @@ 0 - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -695,14 +695,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -721,10 +721,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -734,7 +734,7 @@ - + @@ -753,10 +753,10 @@ Axial Plane - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -781,7 +781,7 @@ true - QFrame::Box + QFrame::Shape::Box @@ -794,9 +794,9 @@ 5 - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint - + @@ -815,14 +815,14 @@ 0 - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -841,14 +841,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -867,10 +867,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -880,7 +880,7 @@ - + @@ -899,10 +899,10 @@ Coronal Plane - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -927,7 +927,7 @@ true - QFrame::Box + QFrame::Shape::Box @@ -939,7 +939,7 @@ 5 - + @@ -958,14 +958,14 @@ 0 - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -984,14 +984,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -1010,10 +1010,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1047,13 +1047,13 @@ Current Slice (in seconds): - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1062,7 +1062,7 @@ - + @@ -1082,11 +1082,11 @@ } - Qt::Horizontal + Qt::Orientation::Horizontal - + @@ -1102,7 +1102,7 @@ - + QLabel { @@ -1115,14 +1115,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + QLabel { @@ -1135,10 +1135,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1161,13 +1161,13 @@ VOI Alpha: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1176,7 +1176,7 @@ - + @@ -1195,7 +1195,7 @@ - + @@ -1209,7 +1209,7 @@ - + QLabel { @@ -1222,14 +1222,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + QLabel { @@ -1242,10 +1242,10 @@ 255 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1267,13 +1267,13 @@ For best results, draw 1 ROI in each plane before interpolating - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1501,13 +1501,13 @@ QPushButton:checked { Interpolation Loading... - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1527,13 +1527,13 @@ QPushButton:checked { Saving VOI... - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1577,10 +1577,10 @@ QPushButton:checked { Dest Folder - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1658,10 +1658,10 @@ QPushButton:checked { VOI Name - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction diff --git a/src/qus/seg_loading/ui/voi_preview.ui b/src/qus/seg_loading/ui/voi_preview.ui index ec42e6a..c5eedb1 100644 --- a/src/qus/seg_loading/ui/voi_preview.ui +++ b/src/qus/seg_loading/ui/voi_preview.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -302,10 +302,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -326,10 +326,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -361,10 +361,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -388,7 +388,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -485,14 +485,14 @@ Observing! - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::Horizontal + Qt::Orientation::Horizontal @@ -505,7 +505,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -524,7 +524,7 @@ Navigating! - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -564,7 +564,7 @@ - + @@ -583,10 +583,10 @@ Sagittal Plane - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -611,7 +611,7 @@ true - QFrame::Box + QFrame::Shape::Box @@ -623,7 +623,7 @@ 5 - + @@ -642,14 +642,14 @@ 0 - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -668,14 +668,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -694,10 +694,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -707,7 +707,7 @@ - + @@ -726,10 +726,10 @@ Axial Plane - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -754,7 +754,7 @@ true - QFrame::Box + QFrame::Shape::Box @@ -767,9 +767,9 @@ 5 - QLayout::SetDefaultConstraint + QLayout::SizeConstraint::SetDefaultConstraint - + @@ -788,14 +788,14 @@ 0 - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -814,14 +814,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -840,10 +840,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -853,7 +853,7 @@ - + @@ -872,10 +872,10 @@ Coronal Plane - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -900,7 +900,7 @@ true - QFrame::Box + QFrame::Shape::Box @@ -912,7 +912,7 @@ 5 - + @@ -931,14 +931,14 @@ 0 - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -957,14 +957,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -983,10 +983,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1020,13 +1020,13 @@ Current Slice (in seconds): - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1035,7 +1035,7 @@ - + @@ -1055,11 +1055,11 @@ } - Qt::Horizontal + Qt::Orientation::Horizontal - + @@ -1075,7 +1075,7 @@ - + QLabel { @@ -1088,14 +1088,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + QLabel { @@ -1108,10 +1108,10 @@ 0 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1134,13 +1134,13 @@ VOI Alpha: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -1149,7 +1149,7 @@ - + @@ -1168,7 +1168,7 @@ - + @@ -1182,7 +1182,7 @@ - + QLabel { @@ -1195,14 +1195,14 @@ of - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + QLabel { @@ -1215,10 +1215,10 @@ 255 - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction @@ -1251,13 +1251,13 @@ Frame: 0 - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true diff --git a/src/qus/visualization_loading/ui/visualization_function_selection.ui b/src/qus/visualization_loading/ui/visualization_function_selection.ui index a553fa3..38a6043 100644 --- a/src/qus/visualization_loading/ui/visualization_function_selection.ui +++ b/src/qus/visualization_loading/ui/visualization_function_selection.ui @@ -40,7 +40,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -92,10 +92,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -119,7 +119,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -144,7 +144,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -169,7 +169,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -193,7 +193,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -217,7 +217,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -243,10 +243,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -270,7 +270,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -296,10 +296,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -323,7 +323,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -355,10 +355,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -379,10 +379,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -414,10 +414,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -441,7 +441,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -462,7 +462,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -479,7 +479,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -492,7 +492,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -564,13 +564,13 @@ Select visualization functions to run: - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -593,7 +593,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -616,14 +616,14 @@ Destination folder: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - + @@ -650,7 +650,7 @@ 1 - + @@ -722,17 +722,17 @@ saves results internally. Modify for persistent exporting. - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter - Qt::NoTextInteraction + Qt::TextInteractionFlag::NoTextInteraction - Qt::Vertical + Qt::Orientation::Vertical @@ -746,7 +746,7 @@ Modify for persistent exporting. - + @@ -776,7 +776,7 @@ Modify for persistent exporting. - Qt::Vertical + Qt::Orientation::Vertical diff --git a/src/qus/visualization_loading/ui/visualization_preview_2d.ui b/src/qus/visualization_loading/ui/visualization_preview_2d.ui index 8fa63a7..f065f02 100644 --- a/src/qus/visualization_loading/ui/visualization_preview_2d.ui +++ b/src/qus/visualization_loading/ui/visualization_preview_2d.ui @@ -45,7 +45,7 @@ 0 - QLayout::SetMaximumSize + QLayout::SizeConstraint::SetMaximumSize @@ -97,10 +97,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -124,7 +124,7 @@ Image Selection: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -149,7 +149,7 @@ Image: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -174,7 +174,7 @@ Phantom: - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -198,7 +198,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -222,7 +222,7 @@ Sample filename - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter @@ -248,10 +248,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -275,7 +275,7 @@ Segmentation Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -307,10 +307,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -331,10 +331,10 @@ } - Radio Frequency Data Analysis + QUS Analysis - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -366,10 +366,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -393,7 +393,7 @@ Visualization / Export - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -419,10 +419,10 @@ } - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised @@ -446,7 +446,7 @@ Analysis Parameter Selection - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -467,7 +467,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -502,7 +502,7 @@ - QLayout::SetMinAndMaxSize + QLayout::SizeConstraint::SetMinAndMaxSize 10 @@ -519,7 +519,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -532,7 +532,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -607,13 +607,13 @@ Visualization Previews - Qt::AutoText + Qt::TextFormat::AutoText false - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter true @@ -667,14 +667,14 @@ - QFrame::StyledPanel + QFrame::Shape::StyledPanel - QFrame::Raised + QFrame::Shadow::Raised - + From 19be9e46976d0c8f785f292c3514fe5a64cb53eb Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 22 Jan 2026 11:41:07 +0100 Subject: [PATCH 24/61] Merge feature/Philips_Quality and cleanup redundant logic in Images/ --- Images/README.md | 65 -- Images/application_controller.py | 245 -------- Images/draw_voi_widget.py | 985 ------------------------------- Images/functions.py | 131 ---- Images/requirements.txt | Bin 1504 -> 0 bytes engines/ceus | 2 +- engines/qus | 2 +- 7 files changed, 2 insertions(+), 1428 deletions(-) delete mode 100644 Images/README.md delete mode 100644 Images/application_controller.py delete mode 100644 Images/draw_voi_widget.py delete mode 100644 Images/functions.py delete mode 100644 Images/requirements.txt diff --git a/Images/README.md b/Images/README.md deleted file mode 100644 index efc6d38..0000000 --- a/Images/README.md +++ /dev/null @@ -1,65 +0,0 @@ -

- drawing -

- -# - -QuantUS is an open-source quantitative analysis tool designed for ultrasonic tissue characterization and contrast enhanced imaging analysis. This software provides an ultrasound system-independent platform for standardized, interactive, and scalable quantitative ultrasound research. QuantUS follows a two-tier architecture that separates core functionality in its backend engines from user interaction support in the frontend. The software is compatible on Mac OS X, Windows, and Linux. - -Currently developed backends support quantitative ultrasound (QUS) backscatter analysis and dynamic contrast-enhanced ultrasound (CEUS) perfusion imaging analysis in both 2D and 3D. However, the plugin-based architecture allows for easy extension to additional QUS methods and analysis types in the future. - -Note that the GUI in this repository is incomplete. Specifically, the QUS GUI does not support numerical data exporting and the CEUS GUI only supports manual segmentation (i.e. no viewing of pre-existing segmentations, no analysis, no visualizations). Please refer to the legacy version of the QuantUS GUI for more complete frontend support. More information about each backend can be found in their respective repositories. Also, support for batch processing is exclusively supported in the backend repositories at this time. - -## Installation - -To clone this repository, run - -```shell -git clone --recurse-submodules https://github.com/TUL-Dev/QuantUS.git -``` - -To set up the Python virtual environment and install dependencies to run QuantUS, run the following commands. Let `PYTHON311` be the path to your Python3.11 interpreter. - -```shell -cd QuantUS -$PYTHON311 -m pip install virtualenv -$PYTHON311 -m virtualenv .venv -source .venv/bin/activate # Unix -.venv\Scripts\activate # Windows (cmd) -pip install --upgrade pip setuptools wheel -pip install numpy -pip install -r requirements.txt -./saveQt.sh # Unix -.\saveQt.sh # Windows (cmd) -``` - -To run the GUI, use - -```shell -source .venv/bin/activate # Unix -.venv\Scripts\activate # Windows (cmd) -python qus_gui.py | ceus_gui.py # Run QUS or CEUS GUI -``` - -### Keeping your version up to date - -To keep your local copy of all QuantUS backends up to date, run the following commands from the root `QuantUS` directory to update all backends to their latest versions: - -```shell -git submodule update --remote --merge -``` - -## Developer notes - -### Remaining things to do for this repository - -- [ ] Support plugin inputs from the GUI directly. Since we're using submodules, - we don't want users copying and pasting files directly into the backend. - Thus, there should be a new folder `engines/plugins` which can contain all - plugin-related files and resources. Note each backend will need to be modified - to look for plugins in this new folder. -- [ ] Use Github Actions to automatically update the submodules to their latest versions - on a regular basis (e.g., weekly, daily, or whenever a commit is completed via webhook). -- [ ] Implement all missing GUI features from Legacy QuantUS. This won't be trivial as - it will require significant additions to the MVC architecture to support - more complex interactions. diff --git a/Images/application_controller.py b/Images/application_controller.py deleted file mode 100644 index 86f6cbf..0000000 --- a/Images/application_controller.py +++ /dev/null @@ -1,245 +0,0 @@ -""" -Main Application Controller for QuantUS GUI MVC architecture -""" - -import sys -import qdarktheme -from typing import Optional -from PyQt6.QtWidgets import QApplication, QStackedWidget -from PyQt6.QtCore import QObject, pyqtSignal - -from .application_model import ApplicationModel -from .image_loading.image_loading_view_coordinator import ImageLoadingViewCoordinator -from .image_loading.image_loading_controller import ImageLoadingController -from .seg_loading.seg_loading_controller import SegmentationLoadingController -from engines.ceus.src.data_objs import UltrasoundImage, CeusSeg - - -class ApplicationController(QObject): - """ - Main application controller that manages navigation between different screens - and coordinates the overall application workflow using a unified application model. - - Follows MVC architecture with a single application-wide model. - """ - - # Signals for application-level events - application_exit = pyqtSignal() - - def __init__(self, app: QApplication): - super().__init__() - self._app = app - self._widget_stack = QStackedWidget() - self._widget_stack.setStyleSheet("QWidget {\n" - " background: rgb(42, 42, 42);\n" - "}") - - # Unified application model - self._model = ApplicationModel() - - # Controllers for different screens (using the same model) - self._image_loading_controller: Optional[ImageLoadingController] = None - self._segmentation_controller: Optional[SegmentationLoadingController] = None - - # Setup main widget - self._setup_main_widget() - - # Connect model signals - self._connect_model_signals() - - # Initialize first screen - self._initialize_image_loading() - - def _setup_main_widget(self) -> None: - """Setup the main stacked widget for screen navigation.""" - self._widget_stack.setMinimumWidth(1400) - self._widget_stack.setWindowTitle("QuantUS - Ultrasound Analysis") - - def _connect_model_signals(self) -> None: - """Connect unified model signals to application controller.""" - self._model.image_loaded.connect(self._initialize_segmentation_loading) - self._model.error_occurred.connect(self._on_model_error) - - def _initialize_image_loading(self) -> None: - """Initialize the image loading screen.""" - if self._image_loading_controller: - self._cleanup_image_loading() - - # Create controller with unified model - self._image_loading_controller = ImageLoadingController(self._model) - - # Connect to handle image loading completion - self._image_loading_controller.view.user_action.connect(self._on_image_action) - - # Add the coordinator widget to the main stack - self._widget_stack.addWidget(self._image_loading_controller.view) - self._widget_stack.setCurrentWidget(self._image_loading_controller.view) - - def _initialize_segmentation_loading(self, image_data: UltrasoundImage) -> None: - """ - Initialize the segmentation loading screen. - - Args: - image_data: Loaded image data from previous screen - """ - if self._segmentation_controller: - self._cleanup_segmentation_loading() - - # Create controller with the unified model (automatically creates modular coordinator) - self._segmentation_controller = SegmentationLoadingController(self._model) - - # Connect to handle segmentation actions - self._segmentation_controller.view.user_action.connect(self._on_segmentation_action) - self._segmentation_controller.view.back_requested.connect(self._navigate_to_image_loading) - - # Add to stack and show - self._widget_stack.addWidget(self._segmentation_controller.view) - self._widget_stack.setCurrentWidget(self._segmentation_controller.view) - - def _on_model_error(self, error_message: str) -> None: - """ - Handle errors from unified model. - - Args: - error_message: Error message from model - """ - print(f"DEBUG: Application model error: {error_message}") - # The individual view controllers will handle displaying the error to the user - - def _on_image_action(self, action_name: str, action_data) -> None: - """ - Handle actions from the image loading screen. - - Args: - action_name: Name of the action - action_data: Data associated with the action - """ - if action_name == 'image_loaded': - self._image_data = action_data - self._initialize_segmentation_loading(self._image_data) - - def _on_segmentation_action(self, action_name: str, action_data) -> None: - """ - Handle actions from the segmentation loading screen. - - Args: - action_name: Name of the action - action_data: Data associated with the action - """ - if action_name == 'segmentation_confirmed': - self._seg_data = self._segmentation_controller.get_loaded_segmentation() - # TODO: Navigate to analysis screen when implemented - print("Analysis screen coming soon...") - self._app.quit() - - def _navigate_to_image_loading(self) -> None: - """Navigate to image loading screen.""" - # Reset image loading controller to initial state - if self._image_loading_controller: - self._image_loading_controller.reset_view() - - # Clean up segmentation controller - if self._segmentation_controller: - self._cleanup_segmentation_loading() - - # Show image loading screen - if self._image_loading_controller: - self._widget_stack.setCurrentWidget(self._image_loading_controller.view) - else: - self._initialize_image_loading() - - # Reset current data - self._image_data = None - self._seg_data = None - - def _cleanup_image_loading(self) -> None: - """Clean up image loading controller resources.""" - if self._image_loading_controller: - # Remove from widget stack and clean up - self._widget_stack.removeWidget(self._image_loading_controller.view) - self._image_loading_controller.cleanup() - self._image_loading_controller.view.deleteLater() - self._image_loading_controller = None - - def _cleanup_segmentation_loading(self) -> None: - """Clean up segmentation loading controller resources.""" - if self._segmentation_controller: - self._widget_stack.removeWidget(self._segmentation_controller.view) - self._segmentation_controller.cleanup() - self._segmentation_controller.view.deleteLater() - self._segmentation_controller = None - - def show(self) -> None: - """Show the main application window.""" - self._widget_stack.show() - - def run(self) -> None: - """ - Run the main application event loop. - - This replaces the original complex event loop logic with clean MVC navigation. - """ - self.show() - - # Run Qt event loop - try: - sys.exit(self._app.exec()) - except SystemExit: - # Clean shutdown - self._cleanup() - - def _cleanup(self) -> None: - """Clean up all resources before application exit.""" - self._cleanup_image_loading() - self._cleanup_segmentation_loading() - - @property - def image_data(self) -> Optional[UltrasoundImage]: - """Get the currently loaded image data.""" - return self._image_data - - @property - def seg_data(self) -> Optional[CeusSeg]: - """Get the currently loaded segmentation data.""" - return self._seg_data - - -def create_application(): - """ - Create and configure the QuantUS application with unified MVC architecture. - - Returns: - ApplicationController: Configured application controller - """ - import sys - from PyQt6.QtWidgets import QApplication - - # Create QApplication if it doesn't exist - app = QApplication.instance() - if app is None: - app = QApplication(sys.argv) - - qdarktheme.setup_theme() - - # Create and configure application controller - app_controller = ApplicationController(app) - - return app_controller - - -def run_application(): - """ - Run the QuantUS application. - - Returns: - int: Exit code - """ - try: - app_controller = create_application() - app_controller.run() - return 0 - except Exception as e: - print(f"Error running QuantUS application: {e}") - import traceback - traceback.print_exc() - return 1 diff --git a/Images/draw_voi_widget.py b/Images/draw_voi_widget.py deleted file mode 100644 index 4348e5d..0000000 --- a/Images/draw_voi_widget.py +++ /dev/null @@ -1,985 +0,0 @@ -""" -Segmentation File Selection Widget for Segmentation Loading -""" - -from pathlib import Path -from typing import Optional, Tuple, List -import numpy as np -import nibabel as nib -from scipy.ndimage import binary_fill_holes, binary_erosion -import matplotlib.pyplot as plt -import matplotlib.animation as anim -from matplotlib.backends.backend_qtagg import FigureCanvas -from matplotlib.path import Path as Mpl_Path -import scipy.interpolate as interpolate -from scipy.spatial import ConvexHull -from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QFileDialog -from PyQt6.QtCore import QEvent, pyqtSignal, Qt, QThread - -from ...mvc.base_view import BaseViewMixin -from ..ui.draw_voi_ui import Ui_voi_drawer -from engines.ceus.src.data_objs import UltrasoundImage -from .spline import calculateSpline3D, calculateSpline - -def _smooth_3d_mask(mask: np.ndarray) -> np.ndarray: - """Apply 3D smoothing to the binary mask.""" - mask = binary_fill_holes(mask) - for i in range(mask.shape[2]): - border = np.where(mask[:, :, i] == 1) - if ( - (not len(border[0])) - or (max(border[0]) == min(border[0])) - or (max(border[1]) == min(border[1])) - ): - continue - border = np.array(border).T - hull = ConvexHull(border) - vertices = border[hull.vertices] - shape = vertices.shape - vertices = np.reshape( - np.append(vertices, vertices[0]), (shape[0] + 1, shape[1]) - ) - - # Linear interpolation of 2d convex hull - tck, _ = interpolate.splprep(vertices.T, s=0.0, k=1) - splineX, splineY = np.array( - interpolate.splev(np.linspace(0, 1, 1000), tck) - ) - - mask[:, :, i] = np.zeros((mask.shape[0], mask.shape[1])) - for j in range(len(splineX)): - mask[int(splineX[j]), int(splineY[j]), i] = 1 - mask[:, :, i] = binary_fill_holes(mask[:, :, i]) - - return mask - -class VoiInterpolationWorker(QThread): - """Worker thread for time-consuming VOI interpolation operations.""" - finished = pyqtSignal(np.ndarray) - error_msg = pyqtSignal(str) - - def __init__(self, coords: np.ndarray, x_len: int, y_len: int, z_len: int): - super().__init__() - self.coords = coords - self.x_len = x_len; self.y_len = y_len; self.z_len = z_len - - def run(self): - """Execute the VOI interpolation in background thread.""" - try: - interp_pts = calculateSpline3D(self.coords) - - # Create the 3D mask from the interpolated surface - voi_mask = np.zeros((self.x_len, self.y_len, self.z_len), dtype=bool) - - # For simplicity, we'll mark the voxels the spline passes through. - # A more robust solution would involve filling the volume enclosed by the spline surface. - interp_points = np.round(np.array(list(interp_pts))).astype(int) - - # Clamp points to be within bounds - interp_points[:, 0] = np.clip(interp_points[:, 0], 0, self.x_len - 1) - interp_points[:, 1] = np.clip(interp_points[:, 1], 0, self.y_len - 1) - interp_points[:, 2] = np.clip(interp_points[:, 2], 0, self.z_len - 1) - - voi_mask[interp_points[:, 0], interp_points[:, 1], interp_points[:, 2]] = True - - # Fill holes in the resulting mask to create a solid volume - voi_mask = _smooth_3d_mask(voi_mask) - - self.finished.emit(voi_mask) - - except Exception as e: - import traceback - traceback.print_exc() - self.error_msg.emit(f"Error interpolating VOI: {e}") - -class SaveVoiWorker(QThread): - """Worker thread for saving VOI mask to file in the background.""" - finished = pyqtSignal(str) - error_msg = pyqtSignal(str) - - def __init__(self, parent_widget): - super().__init__() - self.parent_widget = parent_widget - - def run(self): - try: - self.parent_widget._save_voi() - self.finished.emit("VOI saved successfully.") - except Exception as e: - self.error_msg.emit(str(e)) - - -class DrawVOIWidget(QWidget, BaseViewMixin): - """ - Widget for drawing volume of interest (VOI). VOI is drawn and then saved externally before proceeding. - Can be thought of as file selection for the newly generated VOI. - - Designed to be used within the main application widget stack. - """ - - # Signals for communicating with controller - file_selected = pyqtSignal(dict) # {'seg_path': str, 'seg_type': str} - back_requested = pyqtSignal() - close_requested = pyqtSignal() - - def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None): - QWidget.__init__(self, parent) - self.__init_base_view__(parent) - self._ui = Ui_voi_drawer() - self._image_data = image_data - self._pix_data = image_data.pixel_data - - # State collections - self._drawing_widgets = [] - self._voi_decision_widgets = [] - self._save_voi_widgets = [] - self._voi_alpha_widgets = [] - - # Crosshair / navigation state - self._crosshair_active = False - self._crosshair_visible = True - self._crosshair_xyzt = [0, 0, 0, 0] # x,y,z,t indices - - # Dimension cache - self._x_len, self._y_len, self._z_len, self._num_slices = self._pix_data.shape - self._crosshair_xyzt = [self._x_len // 2, self._y_len // 2, self._z_len // 2, 0] - - # Segmentation drawing state - self._plotted_pts = [] - self._drawing_mode_on = False - self._current_drawing_plane = None - self._drawn_rois: List[Tuple[int, List[float], np.ndarray]] = [] # (plane_index, [roi_coords_xyz], roi_mask) - self._roi_masks_overlap = np.zeros((self._x_len, self._y_len, self._z_len, 4), dtype=np.uint8) - - # Per-plane resources (axial, sagittal, coronal) - self._ax_sag_cor_matplotlib_canvases = [None, None, None] - self._ax_sag_cor_planes = (None, None, None) - self._ax_sag_cor_index_maps = ((0, 1), (2, 1), (2, 0)) # dims that vary per plane - self._ax_sag_cor_animations = [None, None, None] - self._ax_sag_cor_plane_artists = [None, None, None] - self._ax_sag_cor_crosshair_lines = [(None, None), (None, None), (None, None)] - self._ax_sag_cor_pending = [False, False, False] - self._ax_sag_cor_roi_plots = [None, None, None] # dynamic ROI plots - self._ax_sag_cor_seg_masks = [None, None, None] # segmentation masks - self._ax_sag_cor_point_scatters = [None, None, None] # dynamic point scatters - - self._voi_interpolation_worker: Optional[VoiInterpolationWorker] = None - - # UI & visualization setup sequence - self._setup_ui() - self._setup_matplotlib_canvases() - self._initialize_plane_displays() - self._setup_all_plane_animations() - self._connect_signals() - self._connect_matplotlib_events() - self.setFocusPolicy(Qt.FocusPolicy.StrongFocus) - - # ======================= Matplotlib Mouse Interaction =================== - def _connect_matplotlib_events(self): - """Connect motion and click events on each plane's matplotlib canvas. - Replaces any prior MouseTracker helper by using native mpl events. - """ - for plane_ix, canvas in enumerate(self._ax_sag_cor_matplotlib_canvases): - if not canvas: - continue - # Use partial-like lambdas capturing plane_ix - canvas.mpl_connect('motion_notify_event', lambda e, p=plane_ix: self._on_canvas_motion(e, p)) - canvas.mpl_connect('button_press_event', lambda e, p=plane_ix: self._on_canvas_click(e, p)) - - def _on_canvas_click(self, event, plane_ix: int): # type: ignore - """Handle mouse button press to (re)activate crosshair updates.""" - if event.inaxes is None: - return - if not self._drawing_mode_on: - # Toggle active state even when clicking inside the image frame - self._crosshair_active = not self._crosshair_active - if self._crosshair_active: - self._ui.navigating_label.show() - self._ui.observing_label.hide() - else: - self._ui.navigating_label.hide() - self._ui.observing_label.show() - else: - # Drawing mode: record a point at current crosshair and force plane refresh - if self._current_drawing_plane is None: - self._current_drawing_plane = plane_ix + 1 - self._ui.undo_last_roi_button.hide() - self._ui.close_roi_button.show() - if self._current_drawing_plane == plane_ix + 1: - self._crosshair_active = True - self._on_canvas_motion(event, plane_ix) # refresh crosshair coords before plotting - self._plotted_pts.append(self._crosshair_xyzt[:]) - self._ax_sag_cor_pending[plane_ix] = True - self._on_canvas_motion(event, plane_ix) - - def _on_canvas_motion(self, event, plane_ix: int): # type: ignore - """Handle mouse movement over a plane and update crosshair indices. - - event.xdata maps to the first varying dimension of that plane slice, - event.ydata to the second. We clamp to valid ranges and call set_crosshair - only if the index meaningfully changed. - """ - if not self._crosshair_active: - return - if event.inaxes is None or event.xdata is None or event.ydata is None: - return - - vary_dims = self._ax_sag_cor_index_maps[plane_ix] - dim_x, dim_y = vary_dims[0], vary_dims[1] - - # Dimension lengths mapping - dim_lengths = [self._x_len, self._y_len, self._z_len, self._num_slices] - - # Proposed new indices (int rounding & clamp) - new_xval = int(round(event.xdata)) - new_yval = int(round(event.ydata)) - if new_xval < 0 or new_yval < 0: - return - if new_xval >= dim_lengths[dim_x] or new_yval >= dim_lengths[dim_y]: - return - - # Build kwargs for set_crosshair only for dims that change - params = {} - if self._current_drawing_plane == None or self._current_drawing_plane == plane_ix+1: - if self._crosshair_xyzt[dim_x] != new_xval: - if dim_x == 0: params['x'] = new_xval - elif dim_x == 1: params['y'] = new_xval - elif dim_x == 2: params['z'] = new_xval - elif dim_x == 3: params['t'] = new_xval - if self._crosshair_xyzt[dim_y] != new_yval: - if dim_y == 0: params['x'] = new_yval - elif dim_y == 1: params['y'] = new_yval - elif dim_y == 2: params['z'] = new_yval - elif dim_y == 3: params['t'] = new_yval - - if params: - self.set_crosshair(**params) - - def _setup_ui(self) -> None: - """Setup the user interface.""" - self._ui.setupUi(self) - - # Store QLabels to show images in each plane - self._ax_sag_cor_planes = (self._ui.ax_plane, self._ui.sag_plane, self._ui.cor_plane) - - # Configure layout for file selection only - self.setLayout(self._ui.full_screen_layout) - - # Configure stretch factors for file selection - self._ui.full_screen_layout.setStretchFactor(self._ui.side_bar_layout, 1) - self._ui.full_screen_layout.setStretchFactor(self._ui.voi_layout, 10) - - # Store widgets that should be displayed during different states - self._drawing_widgets = [ - self._ui.draw_roi_button, - self._ui.interpolate_voi_button, - self._ui.undo_last_pt_button, - self._ui.close_roi_button, - self._ui.undo_last_roi_button, - self._ui.construct_voi_label, - ] - self._voi_decision_widgets = [ - self._ui.restart_voi_button, - self._ui.save_voi_button, - ] - self._save_voi_widgets = [ - self._ui.back_from_save_button, - self._ui.dest_folder_label, - self._ui.voi_name_label, - self._ui.save_folder_input, - self._ui.save_name_input, - self._ui.choose_save_folder_button, - self._ui.clear_save_folder_button, - self._ui.export_voi_button, - ] - self._voi_alpha_widgets = [ - self._ui.alpha_label, - self._ui.alpha_of_label, - self._ui.alpha_spin_box, - self._ui.alpha_status, - self._ui.alpha_total - ] - - self._ui.scan_name_input.setText(self._image_data.scan_name) - self._ui.toggle_crosshair_visibility_button.setText('Hide Crosshair') - - self._ui.interp_loading_label.hide(); self._ui.saving_voi_label.hide() - self._ui.navigating_label.hide(); self._ui.undo_last_roi_button.hide() - self._hide_widget_lists([self._voi_decision_widgets, - self._save_voi_widgets, self._voi_alpha_widgets]) - - def _setup_matplotlib_canvases(self): - """Setup matplotlib canvases for high-performance plane display.""" - for i in range(3): - fig = plt.figure() - fig.patch.set_facecolor((0, 0, 0, 0)) - fig.subplots_adjust(left=0, right=1, top=1, bottom=0) - canvas = FigureCanvas(fig) - canvas.figure.patch.set_facecolor((0, 0, 0, 0)) - canvas.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) - self._ax_sag_cor_matplotlib_canvases[i] = canvas - layout = QHBoxLayout(self._ax_sag_cor_planes[i]) - layout.setContentsMargins(0, 0, 0, 0) - layout.addWidget(canvas, stretch=1) - self._ax_sag_cor_planes[i].setLayout(layout) - # Make canvas expand to fill its QLabel container - # Install event filter on parent label for resize handling - self._ax_sag_cor_planes[i].installEventFilter(self) - # Initial sizing pass - self._resize_all_canvases() - - def _initialize_plane_displays(self) -> None: - """Initialize all 2D plane displays with optimized matplotlib setup.""" - for plane_ix, canvas in enumerate(self._ax_sag_cor_matplotlib_canvases): - if not canvas: - continue - try: - fig = canvas.figure - if plane_ix == 0: # Axial: y vs x - aspect = (self._image_data.pixdim[1]) / (self._image_data.pixdim[0]) if self._image_data.pixdim[0] != 0 else 1 - aspect = aspect * 0.5 - elif plane_ix == 1: # Sagittal: y vs z - aspect = (self._image_data.pixdim[2]) / (self._image_data.pixdim[1]) if self._image_data.pixdim[2] != 0 else 1 - elif plane_ix == 2: # Coronal: x vs z - aspect = (self._image_data.pixdim[2]) / (self._image_data.pixdim[0]) if self._image_data.pixdim[2] != 0 else 1 - aspect = aspect * 0.5 - else: - self.show_error(f"Invalid plane index: {plane_ix}") - - fig.clear() - ax = fig.add_subplot(111) - ax.axis('off') - # Get initial slice - slice_arr = self._get_plane_slice(plane_ix) - mask_arr = self._get_mask_slice(plane_ix) - - artist = ax.imshow(slice_arr, cmap='gray', aspect=float(aspect), zorder=1, animated=True) # add vmin and vmax for the 0 - 255 show - v_line = ax.axvline(x=0, color='yellow', lw=0.8, animated=True, zorder=11) - h_line = ax.axhline(y=0, color='yellow', lw=0.8, animated=True, zorder=11) - seg_mask = ax.imshow(mask_arr, zorder=8, aspect=float(aspect), animated=True) - roi_plot = ax.plot([], [], c='cyan', lw=1, zorder=9, animated=True) - point_scatter = ax.scatter([], [], c='red', s=5, marker='o', zorder=10, animated=True) - - self._ax_sag_cor_plane_artists[plane_ix] = artist - self._ax_sag_cor_crosshair_lines[plane_ix] = (v_line, h_line) - self._ax_sag_cor_point_scatters[plane_ix] = point_scatter - self._ax_sag_cor_roi_plots[plane_ix] = roi_plot - self._ax_sag_cor_seg_masks[plane_ix] = seg_mask - - canvas.draw() - self._update_crosshair_lines(plane_ix) # position correctly - except Exception as e: - self.show_error(f"Error initializing plane display {plane_ix}: {e}") - - def _get_plane_slice(self, plane_ix: int): - """Return 2D numpy slice for given plane index based on current crosshair.""" - idx = self._get_plane_indices(plane_ix) - arr = self._pix_data[idx] - if arr.ndim != 2: - arr = arr.squeeze() - # Axial plane (index 0) needs transpose for correct orientation - if plane_ix == 0: - arr = arr.T - return arr - - def _get_mask_slice(self, plane_ix: int): - """Return RGBA numpy slice for the mask of the given plane index.""" - idx = self._get_plane_indices(plane_ix)[:-1] # no time dimension - arr = self._roi_masks_overlap[idx] - # Mask needs transpose for correct orientation to match the image slice - if plane_ix == 0: - arr = np.transpose(arr, (1, 0, 2)) # Transpose for axial plane - return arr - - def _get_plane_indices(self, plane_ix: int) -> Tuple[int]: - """Return a list of indices for the given plane.""" - idx = self._crosshair_xyzt[:] - for d in self._ax_sag_cor_index_maps[plane_ix]: - idx[d] = slice(None) - return tuple(idx) - - def _setup_plane_animation(self, plane_ix: int) -> None: - """Setup FuncAnimation for a specific plane.""" - if self._ax_sag_cor_animations[plane_ix]: - try: - self._ax_sag_cor_animations[plane_ix].event_source.stop() - except Exception: - pass - - canvas = self._ax_sag_cor_matplotlib_canvases[plane_ix] - if not canvas: - return - - def _update(_frame): - if not self._ax_sag_cor_plane_artists[plane_ix]: - return [] - # Always refresh slice when pending - if self._ax_sag_cor_pending[plane_ix]: - try: - slice_arr = self._get_plane_slice(plane_ix) - self._ax_sag_cor_plane_artists[plane_ix].set_array(slice_arr) - self._update_crosshair_lines(plane_ix) - except Exception as e: - self.show_error(f"Plane {plane_ix} update error: {e}") - finally: - self._ax_sag_cor_pending[plane_ix] = False - # Update point scatter every frame (cheap; typically few points) - self._update_roi_plot(plane_ix) - self._update_point_scatter(plane_ix) - self._update_seg_masks(plane_ix) - - v_line, h_line = self._ax_sag_cor_crosshair_lines[plane_ix] - roi_plot = self._ax_sag_cor_roi_plots[plane_ix] - scatter = self._ax_sag_cor_point_scatters[plane_ix] - mask = self._ax_sag_cor_seg_masks[plane_ix] - artists = [self._ax_sag_cor_plane_artists[plane_ix]] - if v_line: artists.append(v_line) - if h_line: artists.append(h_line) - if roi_plot: artists.append(roi_plot[0]) - if scatter: artists.append(scatter) - if mask: artists.append(mask) - - # Only update frame counters occasionally or when pending refreshed - if self._ax_sag_cor_pending[plane_ix]: - self._update_scan_display() - return artists - - self._ax_sag_cor_animations[plane_ix] = anim.FuncAnimation( - canvas.figure, - _update, - interval=33, # ~30 FPS - blit=True, - repeat=False, - cache_frame_data=False - ) - - def _setup_all_plane_animations(self): - for i in range(3): - self._setup_plane_animation(i) - - def _update_crosshair_lines(self, plane_ix: int): - """Update crosshair line positions for given plane.""" - v_line, h_line = self._ax_sag_cor_crosshair_lines[plane_ix] - if not (v_line and h_line): - return - vary_dims = self._ax_sag_cor_index_maps[plane_ix] - x_dim, y_dim = vary_dims[0], vary_dims[1] - x_idx = self._crosshair_xyzt[x_dim] - y_idx = self._crosshair_xyzt[y_dim] - v_line.set_xdata([x_idx, x_idx]) - h_line.set_ydata([y_idx, y_idx]) - - if not self._crosshair_visible: - v_line.set_visible(False); h_line.set_visible(False) - else: - # Ensure visible when expected (avoids lingering hidden state) - v_line.set_visible(True); h_line.set_visible(True) - - # ------------------------ Public API ------------------------------------ - def set_crosshair(self, x: Optional[int] = None, y: Optional[int] = None, - z: Optional[int] = None, t: Optional[int] = None) -> Tuple[int, int, int, int]: - """Set (and clamp) crosshair indices then flag planes for redraw. - - Parameters are optional; only provided axes are updated. Values are - clamped into valid bounds. All three orthogonal plane views are marked - pending so the animation loop refreshes them on the next frame. - Returns the updated (x,y,z,t) tuple. - """ - # Current values - cx, cy, cz, ct = self._crosshair_xyzt - if x is not None: - cx = max(0, min(self._x_len - 1, int(x))) - if y is not None: - cy = max(0, min(self._y_len - 1, int(y))) - if z is not None: - cz = max(0, min(self._z_len - 1, int(z))) - if t is not None: - ct = max(0, min(self._num_slices - 1, int(t))) - # Only proceed if changed - if [cx, cy, cz, ct] != self._crosshair_xyzt: - self._crosshair_xyzt = [cx, cy, cz, ct] - self._refresh_frames() - return cx, cy, cz, ct - - def _update_seg_masks(self, plane_ix): - """Create/update the segmentation masks for frames on a given plane for blitting.""" - mask_2d = self._get_mask_slice(plane_ix) - self._ax_sag_cor_seg_masks[plane_ix].set_array(mask_2d) - - def _update_roi_plot(self, plane_ix): - """Create/update the ROI plot artist for points on a given plane for blitting.""" - # Determine which dimensions vary on this plane (plane coordinate axes) - if self._current_drawing_plane is None or self._current_drawing_plane != plane_ix + 1: - return - vary_x_dim, vary_y_dim = self._ax_sag_cor_index_maps[plane_ix] - cur_dim = 3 - vary_x_dim - vary_y_dim - - plane_points = [(pt[vary_x_dim], pt[vary_y_dim]) for pt in self._plotted_pts - if pt[cur_dim] == self._crosshair_xyzt[cur_dim]] - - if not plane_points or len(plane_points) == 1: - # Hide existing ROI plot if present - self._ax_sag_cor_roi_plots[plane_ix][0].set_data([], []) - return - - x, y = zip(*plane_points) - x_interp, y_interp = calculateSpline(x, y) - self._ax_sag_cor_roi_plots[plane_ix][0].set_data(x_interp, y_interp) - - def _update_point_scatter(self, plane_ix: int): - """Create/update the scatter artist for points on a given plane for blitting.""" - # Determine which dimensions vary on this plane (plane coordinate axes) - vary_x_dim, vary_y_dim = self._ax_sag_cor_index_maps[plane_ix] - cur_dim = 3 - vary_x_dim - vary_y_dim - - plane_points = [(pt[vary_x_dim], pt[vary_y_dim]) for pt in self._plotted_pts - if pt[cur_dim] == self._crosshair_xyzt[cur_dim]] - - scatter = self._ax_sag_cor_point_scatters[plane_ix] - if not plane_points: - # Hide existing scatter if present - scatter.set_offsets(np.empty((0, 2))) - return - - offsets = np.array(plane_points) - scatter.set_offsets(offsets) - - def _connect_signals(self) -> None: - """Connect UI signals to internal handlers.""" - self._ui.back_button.clicked.connect(self._on_back_clicked) - self._ui.draw_roi_button.clicked.connect(self._on_draw_roi_clicked) - self._ui.undo_last_pt_button.clicked.connect(self._on_undo_last_pt) - self._ui.close_roi_button.clicked.connect(self._on_roi_close) - self._ui.undo_last_roi_button.clicked.connect(self._on_undo_last_roi) - self._ui.interpolate_voi_button.clicked.connect(self._on_interpolate_voi) - self._ui.restart_voi_button.clicked.connect(self._on_restart_voi) - self._ui.export_voi_button.clicked.connect(self._on_export_voi_clicked) - self._ui.choose_save_folder_button.clicked.connect(self._on_choose_folder) - self._ui.clear_save_folder_button.clicked.connect(self._ui.save_folder_input.clear) - self._ui.back_from_save_button.clicked.connect(self._on_back_from_save) - self._ui.toggle_crosshair_visibility_button.clicked.connect(self._on_toggle_crosshair_visibility) - self._ui.save_voi_button.clicked.connect(self._on_save_voi_clicked) - - self._ui.cur_slice_slider.setMinimum(0) - self._ui.cur_slice_slider.setMaximum(max(0, self._num_slices - 1)) - self._ui.cur_slice_slider.setValue(self._crosshair_xyzt[3]) - self._ui.cur_slice_slider.valueChanged.connect(self._on_time_slider_changed) - - def _on_time_slider_changed(self, value: int): # type: ignore - """Handle user sliding through time dimension (t).""" - # Clamp safety (though slider should enforce) - if value < 0: - value = 0 - if value >= self._num_slices: - value = self._num_slices - 1 - prev_t = self._crosshair_xyzt[3] - if value == prev_t: - return - self.set_crosshair(t=value) - self._refresh_frames() - # Keep slider in sync if set_crosshair clamped - if self._ui.cur_slice_slider.value() != self._crosshair_xyzt[3]: - self._ui.cur_slice_slider.blockSignals(True) - self._ui.cur_slice_slider.setValue(self._crosshair_xyzt[3]) - self._ui.cur_slice_slider.blockSignals(False) - - def _on_draw_roi_clicked(self): - """Handle draw ROI button click.""" - self._drawing_mode_on = not self._drawing_mode_on - if self._drawing_mode_on: - self._ui.draw_roi_button.setText('Disable Draw') - else: - self._ui.draw_roi_button.setText('Draw ROI') - - def _on_undo_last_pt(self): - """Undo the last drawn point.""" - if self._plotted_pts: - self._plotted_pts.pop() - self._refresh_frames() - if not self._plotted_pts: - self._current_drawing_plane = None - - def _on_roi_close(self): - """Handle ROI close event by creating a 2D mask on the correct plane.""" - if len(self._plotted_pts) < 3 or self._current_drawing_plane is None: - return - - if self._drawing_mode_on: - self._on_draw_roi_clicked() - - # Local copy of points and close the loop - current_roi_pts = self._plotted_pts[:] - current_roi_pts.append(current_roi_pts[0]) - - plane_ix = self._current_drawing_plane - 1 - vary_x_dim, vary_y_dim = self._ax_sag_cor_index_maps[plane_ix] - fixed_dim = 3 - vary_x_dim - vary_y_dim - fixed_val = self._crosshair_xyzt[fixed_dim] - - # Get 2D points projected onto the current plane - plane_points_2d_raw = [(p[vary_x_dim], p[vary_y_dim]) for p in current_roi_pts] - - # Get interpolated points for a smoother mask - x_raw, y_raw = zip(*plane_points_2d_raw) - x_interp, y_interp = calculateSpline(x_raw, y_raw) - plane_points_2d = np.vstack((x_interp, y_interp)).T - - # Define the grid for the plane - dims = self._pix_data.shape - plane_dim_x_len = dims[vary_x_dim] - plane_dim_y_len = dims[vary_y_dim] - - x_grid, y_grid = np.meshgrid(np.arange(plane_dim_x_len), np.arange(plane_dim_y_len)) - grid_points = np.vstack([x_grid.ravel(), y_grid.ravel()]).T - - # Create a 2D mask from the path of the interpolated spline - path = Mpl_Path(plane_points_2d) - mask_2d = path.contains_points(grid_points).reshape(plane_dim_y_len, plane_dim_x_len) - - # Create a 4D RGBA mask for this single ROI - current_roi_mask_rgba = np.zeros((self._x_len, self._y_len, self._z_len, 4), dtype=np.uint8) - - # Get a boolean mask for the correct 3D slice - target_slice_mask = np.zeros((self._x_len, self._y_len, self._z_len), dtype=bool) - - # Place the 2D mask into the correct 3D slice, handling orientation - if plane_ix == 0: # Axial - target_slice_mask[:, :, fixed_val] = mask_2d.T - elif plane_ix == 1: # Sagittal - target_slice_mask[fixed_val, :, :] = mask_2d - elif plane_ix == 2: # Coronal - target_slice_mask[:, fixed_val, :] = mask_2d - - # Apply colors to the RGBA mask where the 3D mask is true - current_roi_mask_rgba[target_slice_mask, 0] = 255 # Red - current_roi_mask_rgba[target_slice_mask, 3] = 128 # Alpha - - # Store the original points and the generated mask - self._drawn_rois.append((self._current_drawing_plane, current_roi_pts, current_roi_mask_rgba)) - - # Update the master overlap mask by blending all stored ROIs - self._roi_masks_overlap.fill(0) - for _, _, roi_mask in self._drawn_rois: - # Add color channels, clipping at 255 - self._roi_masks_overlap[:,:,:,:3] = np.clip(self._roi_masks_overlap[:,:,:,:3].astype(np.uint16) + roi_mask[:,:,:,:3].astype(np.uint16), 0, 255).astype(np.uint8) - # Add alpha, clipping at a reasonable max to avoid full opacity - self._roi_masks_overlap[:,:,:,3] = np.clip(self._roi_masks_overlap[:,:,:,3].astype(np.uint16) + roi_mask[:,:,:,3].astype(np.uint16), 0, 128).astype(np.uint8) - - # Clear points and hide the ROI plot for the next ROI - self._plotted_pts.clear() - self._ax_sag_cor_roi_plots[plane_ix][0].set_data([], []) - self._current_drawing_plane = None - - # Update button states - self._ui.draw_roi_button.setChecked(False) - self._ui.undo_last_roi_button.show() - self._ui.close_roi_button.hide() - - self._refresh_frames() - - def _on_undo_last_roi(self): - """Handle undoing the last completed ROI.""" - if not self._drawn_rois: - return - - # Remove the last ROI - self._drawn_rois.pop() - - # Recalculate the overlap mask from the remaining ROIs - self._roi_masks_overlap.fill(0) - if self._drawn_rois: - for _, _, roi_mask in self._drawn_rois: - # Add color channels, clipping at 255 - self._roi_masks_overlap[:,:,:,:3] = np.clip(self._roi_masks_overlap[:,:,:,:3].astype(np.uint16) + roi_mask[:,:,:,:3].astype(np.uint16), 0, 255).astype(np.uint8) - # Add alpha, clipping at a reasonable max to avoid full opacity - self._roi_masks_overlap[:,:,:,3] = np.clip(self._roi_masks_overlap[:,:,:,3].astype(np.uint16) + roi_mask[:,:,:,3].astype(np.uint16), 0, 128).astype(np.uint8) - - # Hide the button if no ROIs are left to undo - if not self._drawn_rois: - self._ui.undo_last_roi_button.hide() - self._ui.close_roi_button.show() - - self._refresh_frames() - - def _on_toggle_crosshair_visibility(self): - # Toggle visibility state but keep indices updating - self._crosshair_visible = not self._crosshair_visible - self._refresh_frames() - self._ui.toggle_crosshair_visibility_button.setText( - 'Show Crosshair' if not self._crosshair_visible else 'Hide Crosshair' - ) - - def _on_restart_voi(self): - """Handle restarting the VOI creation process.""" - # Reset the drawing state - self._drawn_rois.clear() - self._roi_masks_overlap.fill(0) - self._plotted_pts.clear() - self._current_drawing_plane = None - - # Update UI - self._hide_widget_lists([self._voi_decision_widgets]) - self._show_widget_lists([self._drawing_widgets]) - self._ui.undo_last_roi_button.hide() - self._refresh_frames() - - def _on_save_voi_clicked(self): - self._hide_widget_lists([self._voi_decision_widgets]) - self._show_widget_lists([self._save_voi_widgets, self._voi_alpha_widgets]) - self._refresh_frames() - - def _on_export_voi_clicked(self): - # Show saving label, hide save widgets - self._ui.saving_voi_label.show() - self._hide_widget_lists([self._save_voi_widgets]) - - self._save_worker = SaveVoiWorker(self) - self._save_worker.finished.connect(self._on_save_voi_finished) - self._save_worker.error_msg.connect(self._on_save_voi_error) - self._save_worker.start() - - def _on_save_voi_finished(self, msg): - self._ui.saving_voi_label.hide() - self._show_widget_lists([self._save_voi_widgets]) - print(msg) - - def _on_save_voi_error(self, err): - self._ui.saving_voi_label.hide() - self._show_widget_lists([self._save_voi_widgets]) - self.show_error(f"Error saving VOI: {err}") - - def _on_back_from_save(self): - """Handle back button click from save VOI.""" - self._hide_widget_lists([self._save_voi_widgets]) - self._show_widget_lists([self._voi_decision_widgets]) - self._refresh_frames() - - def _on_choose_folder(self): - """Select folder to save VOI to.""" - folder = QFileDialog.getExistingDirectory(self, "Select Folder") - if folder: - self._ui.save_folder_input.setText(folder) - - def _refresh_frames(self) -> None: - """Refresh the displayed frames.""" - for i in range(3): - self._ax_sag_cor_pending[i] = True - - def _update_scan_display(self): - """Update the scan display with the current frames and frame numbers""" - # Update frame numbers - self._ui.ax_frame_num.setText(str(self._crosshair_xyzt[2] + 1)) - self._ui.sag_frame_num.setText(str(self._crosshair_xyzt[0] + 1)) - self._ui.cor_frame_num.setText(str(self._crosshair_xyzt[1] + 1)) - - def mousePressEvent(self, a0): - super().mousePressEvent(a0) - self._crosshair_active = not self._crosshair_active - if self._crosshair_active: - self._ui.navigating_label.show(); self._ui.observing_label.hide() - else: - self._ui.navigating_label.hide(); self._ui.observing_label.show() - - def keyPressEvent(self, event): # type: ignore - """Handle key presses for quick actions (e.g., 'd' to toggle draw ROI).""" - if event.key() == Qt.Key.Key_D: - self._on_draw_roi_clicked() - self._ui.draw_roi_button.setChecked(self._drawing_mode_on) - event.accept() - return - if event.key() == Qt.Key.Key_U: - self._on_undo_last_pt() - event.accept() - return - if event.key() == Qt.Key.Key_H: - self._on_toggle_crosshair_visibility() - return - if event.key() == Qt.Key.Key_C: - self._on_roi_close() - return - if event.key() == Qt.Key.Key_R: - self._on_undo_last_roi() - return - super().keyPressEvent(event) - - def _on_back_clicked(self) -> None: - """Handle back button click.""" - self.clear_error() - self.back_requested.emit() - - def _hide_widget_lists(self, widgets: List[List[QWidget]]) -> None: - """ - Hide all relevant widgets in the lists. - """ - for widget_list in widgets: - for widget in widget_list: - widget.hide() - - def _show_widget_lists(self, widgets: List[List[QWidget]]) -> None: - """ - Show all relevant widgets in the lists. - """ - for widget_list in widgets: - for widget in widget_list: - widget.show() - - # ======================= Lifecycle / Cleanup ============================== - def _cleanup_animations(self): - for i, anim_obj in enumerate(self._ax_sag_cor_animations): - if anim_obj: - try: - anim_obj.event_source.stop() - except Exception: - pass - self._ax_sag_cor_animations[i] = None - - def closeEvent(self, event): # type: ignore - self._cleanup_animations() - return super().closeEvent(event) - - def hideEvent(self, event): # type: ignore - self._cleanup_animations() - return super().hideEvent(event) - - def showEvent(self, event): # type: ignore - # Recreate animations when shown again - if not any(self._ax_sag_cor_animations): - self._setup_all_plane_animations() - # Ensure canvases sized properly when shown - self._resize_all_canvases() - return super().showEvent(event) - - # ======================= Resize Handling ================================= - def eventFilter(self, obj, event): # type: ignore - if event.type() == QEvent.Type.Resize and obj in self._ax_sag_cor_planes: - self._resize_canvas_for(obj) - return super().eventFilter(obj, event) - - def _resize_canvas_for(self, label_widget: QLabel): - try: - idx = self._ax_sag_cor_planes.index(label_widget) - except ValueError: - return - canvas = self._ax_sag_cor_matplotlib_canvases[idx] - if not canvas: - return - - canvas.figure.tight_layout(pad=0) - canvas.draw_idle() - - def _resize_all_canvases(self): - for lbl in self._ax_sag_cor_planes: - self._resize_canvas_for(lbl) - - def _remove_duplicates(self, points: List[List[float]]) -> List[List[float]]: - """Remove duplicate points from a list of points.""" - seen = set() - unique_points = [] - for p in points: - p_tuple = tuple(p) - if p_tuple not in seen: - unique_points.append(p) - seen.add(p_tuple) - return unique_points - - def _on_interpolate_voi(self): - """Handle VOI interpolation from the drawn 2D ROIs.""" - if len(self._drawn_rois) == 2 or not len(self._drawn_rois): - print("At least 3 ROIs on different planes or 1 ROI is required for 3D interpolation.") - return - - # Combine all points from all drawn ROIs - all_points = [] - for _, pts, _ in self._drawn_rois: - xyz_pts = np.array(pts)[:, :3].T - x_interp, y_interp, z_interp = calculateSpline(*xyz_pts) - all_points.extend(zip(x_interp, y_interp, z_interp)) - - # Ensure no duplicate points are used for interpolation - unique_points = self._remove_duplicates(all_points) - if len(unique_points) < 4: - self.show_error("Interpolation Error", "Not enough unique points for 3D spline interpolation.") - return - - # Perform 3D spline interpolation - x_coords, y_coords, z_coords = zip(*unique_points) - coords = np.transpose([x_coords, y_coords, z_coords]) - - if len(self._drawn_rois) > 2: - # Stop any existing worker - if self._voi_interpolation_worker and self._voi_interpolation_worker.isRunning(): - self._voi_interpolation_worker.quit() - self._voi_interpolation_worker.wait() - - # Create and start worker - self._voi_interpolation_worker = VoiInterpolationWorker( - coords, self._x_len, self._y_len, self._z_len - ) - - # Connect worker signals - self._voi_interpolation_worker.finished.connect(self._on_interpolation_finished) - self._voi_interpolation_worker.error_msg.connect(self.show_error) - - # Start interpolatoin loading - self._set_interp_loading(True) - self._voi_interpolation_worker.start() - else: - voi_mask = np.zeros((self._x_len, self._y_len, self._z_len), dtype=bool) - - # For simplicity, we'll mark the voxels the spline passes through. - # A more robust solution would involve filling the volume enclosed by the spline surface. - interp_points = np.round(np.array(list(coords))).astype(int) - - # Clamp points to be within bounds - interp_points[:, 0] = np.clip(interp_points[:, 0], 0, self._x_len - 1) - interp_points[:, 1] = np.clip(interp_points[:, 1], 0, self._y_len - 1) - interp_points[:, 2] = np.clip(interp_points[:, 2], 0, self._z_len - 1) - - voi_mask[interp_points[:, 0], interp_points[:, 1], interp_points[:, 2]] = True - - # Fill holes in the resulting mask to create a solid volume - voi_mask = _smooth_3d_mask(voi_mask) - self._hide_widget_lists([self._drawing_widgets]) - self._on_interpolation_finished(voi_mask) - - def _save_voi(self): - """Save the current VOI mask to a file.""" - if not Path(self._ui.save_folder_input.text()).is_dir(): - print("Invalid Folder", "Please select a valid folder to save the VOI.") - return - - out_name = self._ui.save_name_input.text() - if not out_name: - print("Invalid Name", "Please enter a valid name for the VOI.") - return - out_name = out_name + '.nii.gz' if not out_name.endswith('.nii.gz') else out_name - - out_path = Path(self._ui.save_folder_input.text()) / out_name - - affine = np.eye(4) - for i, res in enumerate(self._image_data.pixdim[:3]): - affine[i, i] = res - voi_mask = np.array(self._roi_masks_overlap[:, :, :, 0] / 255.0).astype(np.uint8) - niiarray = nib.Nifti1Image(voi_mask, affine) - niiarray.header["descrip"] = self._image_data.scan_name - nib.save(niiarray, out_path) - - def _set_interp_loading(self, loading_state: bool) -> None: - """Set the interpolation loading state.""" - if loading_state: - self._hide_widget_lists([self._drawing_widgets]) - self._ui.interp_loading_label.show() - self._ui.back_button.setEnabled(False) - else: - self._ui.interp_loading_label.hide() - self._show_widget_lists([self._voi_decision_widgets]) - self._ui.back_button.setEnabled(True) - - def _on_interpolation_finished(self, voi_mask: np.ndarray): - # Update the master overlap mask with the new 3D VOI - self._roi_masks_overlap.fill(0) - self._roi_masks_overlap[voi_mask, 0] = 255 # Red - self._roi_masks_overlap[voi_mask, 3] = 128 # Alpha - - self._set_interp_loading(False) - self._refresh_frames() diff --git a/Images/functions.py b/Images/functions.py deleted file mode 100644 index e55f40c..0000000 --- a/Images/functions.py +++ /dev/null @@ -1,131 +0,0 @@ -import numpy as np -from skimage import exposure, restoration, filters -import cv2 - -from .decorators import required_kwargs -from ..data_objs.image import UltrasoundImage -from .transforms import resample_to_spacing_2d, resample_to_spacing_3d - -@required_kwargs('arr_to_standardize') -def standardize(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: - """ - Standardize the pixel data and/or intensities for analysis of an UltrasoundImage object. - - Kwargs: - arr_to_standardize (str): One of 'both', 'intensities', 'pixel_data' to specify which arrays to standardize. - Default is 'both'. - """ - arr_to_standardize = kwargs.get('arr_to_standardize', 'both') - assert arr_to_standardize in ['both', 'intensities', 'pixel_data'], "arr_to_standardize must be one of ['both', 'intensities', 'pixel_data']" - - if arr_to_standardize in ['both', 'intensities']: - mean = np.mean(image_data.intensities_for_analysis) - std = np.std(image_data.intensities_for_analysis) - if std > 0: - image_data.intensities_for_analysis = (image_data.intensities_for_analysis - mean) / std - else: - image_data.intensities_for_analysis = image_data.intensities_for_analysis - mean - if arr_to_standardize in ['both', 'pixel_data']: - mean = np.mean(image_data.pixel_data) - std = np.std(image_data.pixel_data) - if std > 0: - image_data.pixel_data = (image_data.pixel_data - mean) / std - else: - image_data.pixel_data = image_data.pixel_data - mean - - return image_data - -@required_kwargs('target_vox_size', 'interp') -def resample(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: - """ - Resample the image data to a new spacing. - - Kwargs: - target_vox_size: tuple of (z, y, x) spacing in mm to resample the image to. - interp: interpolation method, one of 'nearest', 'linear', 'cubic'. - """ - target_vox_size = kwargs['target_vox_size'] - interp = kwargs['interp'] - - if image_data.intensities_for_analysis.ndim == 4: - image_data.pixel_data = resample_to_spacing_3d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) - image_data.intensities_for_analysis = resample_to_spacing_3d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) - elif image_data.intensities_for_analysis.ndim == 3: - image_data.pixel_data = resample_to_spacing_2d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) - image_data.intensities_for_analysis = resample_to_spacing_2d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) - else: - raise ValueError("Image data must be either 3D or 4D for resampling.") - - image_data.extras_dict['original_spacing'] = image_data.pixdim - image_data.pixdim = target_vox_size - - return image_data - -def enhance_image(volume, method='clahe', **kwargs): - """ - Enhance image quality using various methods - - Args: - volume: 3D volume (Z, Y, X) - method: Enhancement method ('clahe', 'gamma', 'log', 'sigmoid', 'adaptive_hist') - """ - - enhanced = np.zeros_like(volume) - if method == 'gamma': - # Gamma correction - gamma = kwargs.get('gamma', 0.7) - enhanced = exposure.adjust_gamma(volume, gamma) - elif method == 'adaptive_hist': - clip_limit = kwargs.get('clip_limit', 0.05) - enhanced = exposure.equalize_adapthist(volume, clip_limit=clip_limit) - - for z in range(volume.shape[2]): - slice_2d = volume[:, :, z] - - if method == 'clahe': - # Contrast Limited Adaptive Histogram Equalization - clahe = cv2.createCLAHE(clipLimit=kwargs.get('clip_limit',3.0), tileGridSize=(8,8)) - enhanced[:,:,z] = clahe.apply(slice_2d) - - elif method == 'sigmoid': - # Sigmoid transformation - cutoff = kwargs.get('cutoff', 0.5) - gain = kwargs.get('gain', 10) - enhanced[:,:,z] = exposure.adjust_sigmoid(slice_2d, cutoff=cutoff, gain=gain) - return enhanced - -def imsharpen(image, radius=1.5, amount=0.5): - """ - Python equivalent of MATLAB's imsharpen function - - Args: - image: Input image (2D or 3D) - radius: Gaussian blur radius (equivalent to MATLAB 'Radius') - amount: Sharpening strength (equivalent to MATLAB 'Amount') - - Returns: - Sharpened image - """ - if image.ndim == 3: - # Process 3D volume slice by slice - sharpened = np.zeros_like(image, dtype=np.float64) - for z in range(image.shape[0]): - # Convert to float for processing - slice_float = image[z].astype(np.float64) - - # Create Gaussian blurred version - blurred = filters.gaussian(slice_float, sigma=radius) - - # Apply unsharp mask: original + amount * (original - blurred) - sharpened[z] = slice_float + amount * (slice_float - blurred) - - else: - # Process 2D image - slice_float = image.astype(np.float64) - blurred = filters.gaussian(slice_float, sigma=radius) - sharpened = slice_float + amount * (slice_float - blurred) - - # Clip to valid range and convert back to original dtype - sharpened = np.clip(sharpened, 0, np.max(image)) - - return sharpened.astype(image.dtype) \ No newline at end of file diff --git a/Images/requirements.txt b/Images/requirements.txt deleted file mode 100644 index 72cc653137f7601af447957f3cb6862e104562e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1504 zcmZvcK~LLI5QO(!sXxV4O(C?0R_eW#$`K(HC9w%6#4+|GK!1GO`F8!Vt5((n#XGw@ zJ3G(6f30k=q~~BetF6_q&w4)CJA3cvt-Z00qW3zzt!%FYg6OHv!ZKp7SdN@1a^jIn zRoC`tTkGt_1$^VspU=R}yBYSeGaq4pt zYt@A*Gr#aZ`k*@M-zc}&6zo1bgZd!j4s?2d@HvxqkCVAIJK>Ypjhgr{RO{3){2ZFG z@9EBUis6Q(&QS~kLmd4=yC2%h+`E~5crtDde&lAs8+MJ9`umPgxCb#shhD7NLM?nf zYJ{uf&J>Qp<8$_~;wHebQzyPEF()i9^lRZN;2LmK*P}Rro_|+B#dgTPw6FHvzP;v$ z3bCCR`ze+W zA~qD?GwxU=O<)m|<@!m?E3qIFUsE~+`{a9r84US0fr4A<*y!-28K1k F{{T*J->3ip diff --git a/engines/ceus b/engines/ceus index 8e0f5bd..5c37485 160000 --- a/engines/ceus +++ b/engines/ceus @@ -1 +1 @@ -Subproject commit 8e0f5bd915a22ca6bb1202b7af43bafa3154ec77 +Subproject commit 5c37485c837f1ea011fb4812fe0a9aad53c321d2 diff --git a/engines/qus b/engines/qus index d5adeb5..6790aaf 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit d5adeb5f6bd5e8d323a5b45bfcc066e334e8ef4d +Subproject commit 6790aaf3c546683e753ae931e294485418508253 From 987f4cf1bed8e12e0aed2ae1800d0b7d5f2ce1a1 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 22 Jan 2026 11:44:01 +0100 Subject: [PATCH 25/61] Fix module path in options.py and uncomment functions in functions.py --- src/ceus/image_preprocessing/functions.py | 96 +++++++++++------------ src/ceus/image_preprocessing/options.py | 2 +- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/ceus/image_preprocessing/functions.py b/src/ceus/image_preprocessing/functions.py index 7ab46fd..bae8499 100644 --- a/src/ceus/image_preprocessing/functions.py +++ b/src/ceus/image_preprocessing/functions.py @@ -4,63 +4,63 @@ import cv2 from .decorators import required_kwargs -# from ..data_objs.image import UltrasoundImage -# from .transforms import resample_to_spacing_2d, resample_to_spacing_3d +from ..data_objs.image import UltrasoundImage +from .transforms import resample_to_spacing_2d, resample_to_spacing_3d -# @required_kwargs('arr_to_standardize') -# def standardize(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: -# """ -# Standardize the pixel data and/or intensities for analysis of an UltrasoundImage object. +@required_kwargs('arr_to_standardize') +def standardize(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: + """ + Standardize the pixel data and/or intensities for analysis of an UltrasoundImage object. -# Kwargs: -# arr_to_standardize (str): One of 'both', 'intensities', 'pixel_data' to specify which arrays to standardize. -# Default is 'both'. -# """ -# arr_to_standardize = kwargs.get('arr_to_standardize', 'both') -# assert arr_to_standardize in ['both', 'intensities', 'pixel_data'], "arr_to_standardize must be one of ['both', 'intensities', 'pixel_data']" + Kwargs: + arr_to_standardize (str): One of 'both', 'intensities', 'pixel_data' to specify which arrays to standardize. + Default is 'both'. + """ + arr_to_standardize = kwargs.get('arr_to_standardize', 'both') + assert arr_to_standardize in ['both', 'intensities', 'pixel_data'], "arr_to_standardize must be one of ['both', 'intensities', 'pixel_data']" -# if arr_to_standardize in ['both', 'intensities']: -# mean = np.mean(image_data.intensities_for_analysis) -# std = np.std(image_data.intensities_for_analysis) -# if std > 0: -# image_data.intensities_for_analysis = (image_data.intensities_for_analysis - mean) / std -# else: -# image_data.intensities_for_analysis = image_data.intensities_for_analysis - mean -# if arr_to_standardize in ['both', 'pixel_data']: -# mean = np.mean(image_data.pixel_data) -# std = np.std(image_data.pixel_data) -# if std > 0: -# image_data.pixel_data = (image_data.pixel_data - mean) / std -# else: -# image_data.pixel_data = image_data.pixel_data - mean + if arr_to_standardize in ['both', 'intensities']: + mean = np.mean(image_data.intensities_for_analysis) + std = np.std(image_data.intensities_for_analysis) + if std > 0: + image_data.intensities_for_analysis = (image_data.intensities_for_analysis - mean) / std + else: + image_data.intensities_for_analysis = image_data.intensities_for_analysis - mean + if arr_to_standardize in ['both', 'pixel_data']: + mean = np.mean(image_data.pixel_data) + std = np.std(image_data.pixel_data) + if std > 0: + image_data.pixel_data = (image_data.pixel_data - mean) / std + else: + image_data.pixel_data = image_data.pixel_data - mean -# return image_data + return image_data -# @required_kwargs('target_vox_size', 'interp') -# def resample(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: -# """ -# Resample the image data to a new spacing. +@required_kwargs('target_vox_size', 'interp') +def resample(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: + """ + Resample the image data to a new spacing. -# Kwargs: -# target_vox_size: tuple of (z, y, x) spacing in mm to resample the image to. -# interp: interpolation method, one of 'nearest', 'linear', 'cubic'. -# """ -# target_vox_size = kwargs['target_vox_size'] -# interp = kwargs['interp'] + Kwargs: + target_vox_size: tuple of (z, y, x) spacing in mm to resample the image to. + interp: interpolation method, one of 'nearest', 'linear', 'cubic'. + """ + target_vox_size = kwargs['target_vox_size'] + interp = kwargs['interp'] -# if image_data.intensities_for_analysis.ndim == 4: -# image_data.pixel_data = resample_to_spacing_3d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) -# image_data.intensities_for_analysis = resample_to_spacing_3d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) -# elif image_data.intensities_for_analysis.ndim == 3: -# image_data.pixel_data = resample_to_spacing_2d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) -# image_data.intensities_for_analysis = resample_to_spacing_2d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) -# else: -# raise ValueError("Image data must be either 3D or 4D for resampling.") + if image_data.intensities_for_analysis.ndim == 4: + image_data.pixel_data = resample_to_spacing_3d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) + image_data.intensities_for_analysis = resample_to_spacing_3d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) + elif image_data.intensities_for_analysis.ndim == 3: + image_data.pixel_data = resample_to_spacing_2d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) + image_data.intensities_for_analysis = resample_to_spacing_2d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) + else: + raise ValueError("Image data must be either 3D or 4D for resampling.") -# image_data.extras_dict['original_spacing'] = image_data.pixdim -# image_data.pixdim = target_vox_size + image_data.extras_dict['original_spacing'] = image_data.pixdim + image_data.pixdim = target_vox_size -# return image_data + return image_data def enhance_image(volume, method='clahe', **kwargs): """ diff --git a/src/ceus/image_preprocessing/options.py b/src/ceus/image_preprocessing/options.py index 8feac69..91e5b1e 100644 --- a/src/ceus/image_preprocessing/options.py +++ b/src/ceus/image_preprocessing/options.py @@ -10,7 +10,7 @@ def get_im_preproc_funcs() -> dict: Returns: dict: Dictionary of preprocessing functions. """ - functions = {name: obj for name, obj in globals().items() if callable(obj) and obj.__module__ == 'src.image_preprocessing.functions'} + functions = {name: obj for name, obj in globals().items() if callable(obj) and obj.__module__ == 'src.ceus.image_preprocessing.functions'} return functions def get_required_im_preproc_kwargs(preproc_func_names: list) -> list: From f89a85d423d6bda42d0eee15c1de075e0f14671f Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 22 Jan 2026 12:24:54 +0100 Subject: [PATCH 26/61] Fix CEUS import error and refactor image enhancement logic --- src/ceus/image_preprocessing/functions.py | 143 +++++++++++++++++----- 1 file changed, 109 insertions(+), 34 deletions(-) diff --git a/src/ceus/image_preprocessing/functions.py b/src/ceus/image_preprocessing/functions.py index bae8499..c3da199 100644 --- a/src/ceus/image_preprocessing/functions.py +++ b/src/ceus/image_preprocessing/functions.py @@ -1,10 +1,10 @@ import numpy as np from skimage import exposure, filters -from skimage.restoration import denoise_wavelet +from skimage.restoration import denoise_wavelet, estimate_sigma import cv2 from .decorators import required_kwargs -from ..data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.image import UltrasoundImage from .transforms import resample_to_spacing_2d, resample_to_spacing_3d @required_kwargs('arr_to_standardize') @@ -62,69 +62,144 @@ def resample(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: return image_data -def enhance_image(volume, method='clahe', **kwargs): +@required_kwargs('scale_factor', 'interp') +def enhance_spatial_resolution(volume, scale_factor=1.0, interp='cubic', **kwargs): """ - Enhance image quality using various methods + Enhance spatial resolution by upsampling the image (increasing pixel count). Args: - volume: 3D volume (Z, Y, X) - method: Enhancement method ('clahe', 'gamma', 'log', 'sigmoid', 'adaptive_hist') + volume: 2D or 3D array, or UltrasoundImage object + scale_factor: Multiplier for the current resolution (e.g., 2.0 to double pixels) + interp: Interpolation method ('nearest', 'linear', 'cubic') + """ + if scale_factor == 1.0: + return volume + + if isinstance(volume, UltrasoundImage): + image_data = volume + # Adjust spacing inversely to scale factor + target_vox_size = tuple(np.array(image_data.pixdim) / scale_factor) + image_data = resample(image_data, target_vox_size=target_vox_size, interp=interp) + return image_data + + # For raw arrays (2D or 3D) + if volume.ndim == 2: + orig_spacing = (1.0, 1.0) + target_spacing = (1.0 / scale_factor, 1.0 / scale_factor) + return resample_to_spacing_2d(volume, orig_spacing, target_spacing, interp=interp) + else: + orig_spacing = (1.0, 1.0, 1.0) + target_spacing = (1.0 / scale_factor, 1.0 / scale_factor, 1.0 / scale_factor) + return resample_to_spacing_3d(volume, orig_spacing, target_spacing, interp=interp) + +@required_kwargs('method') +def enhance_contrast_resolution(volume, method='clahe', **kwargs): """ + Enhance contrast resolution using various intensity transformation methods. + Supports both 2D and 3D inputs and works as a plugin. - enhanced = np.zeros_like(volume) + Args: + volume: 2D or 3D array, or UltrasoundImage object + method: Enhancement method ('clahe', 'gamma', 'log', 'sigmoid', 'adaptive_hist') + """ + # Plugin support + if isinstance(volume, UltrasoundImage): + image_data = volume + image_data.pixel_data = enhance_contrast_resolution(image_data.pixel_data, method=method, **kwargs) + return image_data + + # Method validation and execution if method == 'gamma': - # Gamma correction gamma = kwargs.get('gamma', 0.7) - enhanced = exposure.adjust_gamma(volume, gamma) + return exposure.adjust_gamma(volume, gamma) + elif method == 'log': + gain = kwargs.get('gain', 1) + return exposure.adjust_log(volume, gain=gain) elif method == 'adaptive_hist': - clip_limit = kwargs.get('clip_limit', 0.05) - enhanced = exposure.equalize_adapthist(volume, clip_limit=clip_limit) + clip_limit = kwargs.get('clip_limit', 0.01) + return exposure.equalize_adapthist(volume, clip_limit=clip_limit) + elif method == 'sigmoid': + cutoff = kwargs.get('cutoff', 0.5) + gain = kwargs.get('gain', 10) + return exposure.adjust_sigmoid(volume, cutoff=cutoff, gain=gain) - for z in range(volume.shape[2]): - slice_2d = volume[:, :, z] + # Slice-based methods (e.g., OpenCV CLAHE) + if method == 'clahe': + is_2d = volume.ndim == 2 + if is_2d: + volume = volume[:, :, np.newaxis] - if method == 'clahe': - # Contrast Limited Adaptive Histogram Equalization - clahe = cv2.createCLAHE(clipLimit=kwargs.get('clip_limit',3.0), tileGridSize=(8,8)) - enhanced[:,:,z] = clahe.apply(slice_2d) + enhanced = np.zeros_like(volume) + clahe = cv2.createCLAHE(clipLimit=kwargs.get('clip_limit', 3.0), tileGridSize=kwargs.get('tile_grid_size', (8, 8))) + + for z in range(volume.shape[2]): + slice_2d = volume[:, :, z] + # OpenCV requires uint8 or uint16 + if slice_2d.dtype not in [np.uint8, np.uint16]: + s_min, s_max = slice_2d.min(), slice_2d.max() + if s_max > s_min: + slice_to_proc = ((slice_2d - s_min) / (s_max - s_min) * 255).astype(np.uint8) + else: + slice_to_proc = slice_2d.astype(np.uint8) + else: + slice_to_proc = slice_2d + + enhanced[:, :, z] = clahe.apply(slice_to_proc) - elif method == 'sigmoid': - # Sigmoid transformation - cutoff = kwargs.get('cutoff', 0.5) - gain = kwargs.get('gain', 10) - enhanced[:,:,z] = exposure.adjust_sigmoid(slice_2d, cutoff=cutoff, gain=gain) - return enhanced + return enhanced[:, :, 0] if is_2d else enhanced + + return volume + +def enhance_image(volume, method='clahe', **kwargs): + """Alias for backward compatibility.""" + return enhance_contrast_resolution(volume, method, **kwargs) +@required_kwargs('wavelet', 'sigma_scale') def denoise_ceus_wavelet(volume_3d, wavelet='db1', sigma_scale=0.8): """ - Gentler wavelet denoising + Gentler wavelet denoising. Supports both 2D and 3D inputs and works as a plugin. Args: + volume_3d: 2D or 3D array, or UltrasoundImage object sigma_scale: Scale factor for noise estimate (0.3-0.7 for gentle, 1.0 for normal) """ + if isinstance(volume_3d, UltrasoundImage): + image_data = volume_3d + image_data.pixel_data = denoise_ceus_wavelet(image_data.pixel_data, wavelet=wavelet, sigma_scale=sigma_scale) + return image_data + + is_2d = volume_3d.ndim == 2 + if is_2d: + volume_3d = volume_3d[:, :, np.newaxis] + denoised = np.zeros_like(volume_3d, dtype=np.float32) for z in range(volume_3d.shape[2]): slice_2d = volume_3d[:, :, z].astype(np.float32) - # Normalize to [0, 1] - slice_norm = (slice_2d - slice_2d.min()) / (slice_2d.max() - slice_2d.min() + 1e-8) + # Normalize to [0, 1] for stable denoising + slice_min, slice_max = slice_2d.min(), slice_2d.max() + range_val = slice_max - slice_min + if range_val > 0: + slice_norm = (slice_2d - slice_min) / range_val + else: + slice_norm = slice_2d - # Estimate sigma and scale it down - from skimage.restoration import estimate_sigma + # Estimate sigma and apply wavelet denoising sigma_est = estimate_sigma(slice_norm, average_sigmas=True) - - # Apply wavelet denoising with reduced sigma denoised_slice = denoise_wavelet( slice_norm, method='BayesShrink', mode='soft', wavelet=wavelet, rescale_sigma=True, - sigma=sigma_est * sigma_scale # KEY: Reduce denoising strength + sigma=sigma_est * sigma_scale ) - # Scale back - denoised[:, :, z] = denoised_slice * (slice_2d.max() - slice_2d.min()) + slice_2d.min() + # Scale back to original range + if range_val > 0: + denoised[:, :, z] = denoised_slice * range_val + slice_min + else: + denoised[:, :, z] = denoised_slice - return denoised \ No newline at end of file + return denoised[:, :, 0] if is_2d else denoised \ No newline at end of file From e6caaf5aae00c2ce7014826d2366aaebbbb17485 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 22 Jan 2026 12:24:55 +0100 Subject: [PATCH 27/61] Feature: add interactive enhancement sliders to 3D VOI drawing widget --- src/ceus/seg_loading/views/draw_voi_widget.py | 99 ++++++++++++++++++- 1 file changed, 95 insertions(+), 4 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index dd22a20..2f6fd8c 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -13,14 +13,14 @@ from matplotlib.path import Path as Mpl_Path import scipy.interpolate as interpolate from scipy.spatial import ConvexHull -from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QFileDialog +from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QFileDialog, QSlider, QVBoxLayout, QFrame from PyQt6.QtCore import QEvent, pyqtSignal, Qt, QThread from ...mvc.base_view import BaseViewMixin from ..ui.draw_voi_ui import Ui_voi_drawer from engines.ceus.src.data_objs import UltrasoundImage from .spline import calculateSpline3D, calculateSpline -from ...image_preprocessing.functions import enhance_image, denoise_ceus_wavelet +from ...image_preprocessing.functions import enhance_contrast_resolution, denoise_ceus_wavelet def _smooth_3d_mask(mask: np.ndarray) -> np.ndarray: """Apply 3D smoothing to the binary mask.""" @@ -130,6 +130,10 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None self._image_data = image_data self._pix_data = image_data.pixel_data + # Enhancement parameters + self._clahe_clip_limit = 1.2 + self._gamma = 1.5 + # Cache for enhanced volume self._enhanced_cache = None self._enhanced_cache_frame = -1 @@ -312,6 +316,92 @@ def _setup_ui(self) -> None: self._ui.navigating_label.hide(); self._ui.undo_last_roi_button.hide() self._hide_widget_lists([self._voi_decision_widgets, self._save_voi_widgets, self._voi_alpha_widgets]) + + # Setup enhancement controls in sidebar + self._setup_enhancement_controls() + + def _setup_enhancement_controls(self) -> None: + """Add enhancement sliders to the sidebar, styled like the existing slice slider.""" + # Container frame for enhancement controls + enh_group = QFrame() + enh_group.setStyleSheet("background-color: rgba(255, 255, 255, 0); border: none;") + + # Main horizontal layout to put sliders "beside" each other + main_h_layout = QHBoxLayout(enh_group) + main_h_layout.setContentsMargins(0, 10, 0, 10) + main_h_layout.setSpacing(20) + + # Helper to create a styled slider column + def create_enh_column(label_text, min_val, max_val, current_val, callback): + col_widget = QWidget() + col_layout = QVBoxLayout(col_widget) + col_layout.setContentsMargins(0, 0, 0, 0) + col_layout.setSpacing(5) + + # Label + lbl = QLabel(label_text) + lbl.setStyleSheet("font-size: 14px; color: white; font-weight: bold;") + lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) + col_layout.addWidget(lbl) + + # Slider + Value Row + row_layout = QHBoxLayout() + + slider = QSlider(Qt.Orientation.Horizontal) + slider.setRange(min_val, max_val) + slider.setValue(current_val) + # Copy style and size constraints from slice slider if possible + slider.setStyleSheet(self._ui.cur_slice_slider.styleSheet()) + slider.setMinimumWidth(150) + slider.valueChanged.connect(callback) + + val_lbl = QLabel(f"{current_val/10.0:.1f}") + val_lbl.setMinimumWidth(40) + val_lbl.setStyleSheet("color: #3498db; font-weight: bold; font-size: 14px;") + + row_layout.addWidget(slider) + row_layout.addWidget(val_lbl) + col_layout.addLayout(row_layout) + + return col_widget, slider, val_lbl + + # Create the 2 columns + clahe_col, self.clahe_slider, self.clahe_val_lbl = create_enh_column( + "CLAHE", 1, 100, int(self._clahe_clip_limit * 10), self._on_clahe_changed + ) + gamma_col, self.gamma_slider, self.gamma_val_lbl = create_enh_column( + "GAMMA", 1, 40, int(self._gamma * 10), self._on_gamma_changed + ) + + main_h_layout.addWidget(clahe_col) + main_h_layout.addWidget(gamma_col) + + # Add to the layout below the current slice slider + self._ui.verticalLayout_2.addWidget(enh_group) + + def _on_clahe_changed(self, value: int) -> None: + """Handle CLAHE clip limit change.""" + self._clahe_clip_limit = value / 10.0 + if hasattr(self, 'clahe_val_lbl'): + self.clahe_val_lbl.setText(f"{self._clahe_clip_limit:.1f}") + self._invalidate_enhancement_cache() + + def _on_gamma_changed(self, value: int) -> None: + """Handle gamma change.""" + self._gamma = value / 10.0 + if hasattr(self, 'gamma_val_lbl'): + self.gamma_val_lbl.setText(f"{self._gamma:.1f}") + self._invalidate_enhancement_cache() + + def _reset_enhancement(self, _=None) -> None: + """Reset enhancement parameters to defaults.""" + self.clahe_slider.setValue(12) # 1.2 + self.gamma_slider.setValue(15) # 1.5 + + def _invalidate_enhancement_cache(self) -> None: + """Invalidate the cache and trigger a refresh of all planes.""" + self._enhanced_cache = None + self._refresh_frames() def _setup_matplotlib_canvases(self): """Setup matplotlib canvases for high-performance plane display.""" @@ -404,8 +494,9 @@ def _get_plane_slice(self, plane_ix: int): def _enhance_slice(self, slice_2d: np.ndarray) -> np.ndarray: """Enhance a 2D image slice using predefined enhancement methods.""" - enhanced = enhance_image(slice_2d, method='clahe', clip_limit=1.2) - enhanced = enhance_image(enhanced, method='gamma', gamma=1.5) + # Enhance Contrast Resolution + enhanced = enhance_contrast_resolution(slice_2d, method='clahe', clip_limit=self._clahe_clip_limit) + enhanced = enhance_contrast_resolution(enhanced, method='gamma', gamma=self._gamma) # enhanced = denoise_ceus_wavelet(enhanced, wavelet='db1') # enhanced = slice_2d From 5a60511a5e95820147068fbb2446b4bff51ca0d7 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 22 Jan 2026 12:28:58 +0100 Subject: [PATCH 28/61] Refactor: improve 3D stability of image enhancement by using global normalization --- src/ceus/image_preprocessing/functions.py | 25 +++++++++++-------- src/ceus/seg_loading/views/draw_voi_widget.py | 9 +++---- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/ceus/image_preprocessing/functions.py b/src/ceus/image_preprocessing/functions.py index c3da199..eb3bf1d 100644 --- a/src/ceus/image_preprocessing/functions.py +++ b/src/ceus/image_preprocessing/functions.py @@ -129,6 +129,10 @@ def enhance_contrast_resolution(volume, method='clahe', **kwargs): if is_2d: volume = volume[:, :, np.newaxis] + # Get global min/max for stable normalization across slices in 3D + v_min, v_max = volume.min(), volume.max() + v_range = v_max - v_min + enhanced = np.zeros_like(volume) clahe = cv2.createCLAHE(clipLimit=kwargs.get('clip_limit', 3.0), tileGridSize=kwargs.get('tile_grid_size', (8, 8))) @@ -136,9 +140,8 @@ def enhance_contrast_resolution(volume, method='clahe', **kwargs): slice_2d = volume[:, :, z] # OpenCV requires uint8 or uint16 if slice_2d.dtype not in [np.uint8, np.uint16]: - s_min, s_max = slice_2d.min(), slice_2d.max() - if s_max > s_min: - slice_to_proc = ((slice_2d - s_min) / (s_max - s_min) * 255).astype(np.uint8) + if v_range > 0: + slice_to_proc = ((slice_2d - v_min) / v_range * 255).astype(np.uint8) else: slice_to_proc = slice_2d.astype(np.uint8) else: @@ -172,16 +175,18 @@ def denoise_ceus_wavelet(volume_3d, wavelet='db1', sigma_scale=0.8): if is_2d: volume_3d = volume_3d[:, :, np.newaxis] + # Get global range for stable 3D denoising + v_min, v_max = volume_3d.min(), volume_3d.max() + v_range = v_max - v_min + denoised = np.zeros_like(volume_3d, dtype=np.float32) for z in range(volume_3d.shape[2]): slice_2d = volume_3d[:, :, z].astype(np.float32) - # Normalize to [0, 1] for stable denoising - slice_min, slice_max = slice_2d.min(), slice_2d.max() - range_val = slice_max - slice_min - if range_val > 0: - slice_norm = (slice_2d - slice_min) / range_val + # Normalize to [0, 1] using global volume range + if v_range > 0: + slice_norm = (slice_2d - v_min) / v_range else: slice_norm = slice_2d @@ -197,8 +202,8 @@ def denoise_ceus_wavelet(volume_3d, wavelet='db1', sigma_scale=0.8): ) # Scale back to original range - if range_val > 0: - denoised[:, :, z] = denoised_slice * range_val + slice_min + if v_range > 0: + denoised[:, :, z] = denoised_slice * v_range + v_min else: denoised[:, :, z] = denoised_slice diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 2f6fd8c..96941c9 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -478,7 +478,7 @@ def _get_plane_slice(self, plane_ix: int): current_frame_3d = self._pix_data[:, :, :, current_t] # Enhance the entire 3D volume ONCE per frame - self._enhanced_cache = self._enhance_slice(current_frame_3d) + self._enhanced_cache = self._enhance_volume(current_frame_3d) self._enhanced_cache_frame = current_t # Extract the 2D slice from cached enhanced volume @@ -492,13 +492,12 @@ def _get_plane_slice(self, plane_ix: int): arr = arr.T return arr - def _enhance_slice(self, slice_2d: np.ndarray) -> np.ndarray: - """Enhance a 2D image slice using predefined enhancement methods.""" + def _enhance_volume(self, volume_3d: np.ndarray) -> np.ndarray: + """Enhance a 3D image volume using predefined enhancement methods.""" # Enhance Contrast Resolution - enhanced = enhance_contrast_resolution(slice_2d, method='clahe', clip_limit=self._clahe_clip_limit) + enhanced = enhance_contrast_resolution(volume_3d, method='clahe', clip_limit=self._clahe_clip_limit) enhanced = enhance_contrast_resolution(enhanced, method='gamma', gamma=self._gamma) # enhanced = denoise_ceus_wavelet(enhanced, wavelet='db1') - # enhanced = slice_2d return enhanced From da0a2c7a464ee586f387edc5563047ae9470b04d Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 22 Jan 2026 12:43:21 +0100 Subject: [PATCH 29/61] Feature: add interactive Philips-style pseudocoloring to VOI drawer with UI refinements --- src/ceus/seg_loading/views/draw_voi_widget.py | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 96941c9..19d11eb 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -11,9 +11,10 @@ import matplotlib.animation as anim from matplotlib.backends.backend_qtagg import FigureCanvas from matplotlib.path import Path as Mpl_Path +from matplotlib.colors import LinearSegmentedColormap import scipy.interpolate as interpolate from scipy.spatial import ConvexHull -from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QFileDialog, QSlider, QVBoxLayout, QFrame +from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QFileDialog, QSlider, QVBoxLayout, QFrame, QCheckBox from PyQt6.QtCore import QEvent, pyqtSignal, Qt, QThread from ...mvc.base_view import BaseViewMixin @@ -22,6 +23,15 @@ from .spline import calculateSpline3D, calculateSpline from ...image_preprocessing.functions import enhance_contrast_resolution, denoise_ceus_wavelet +# Philips CEUS Colormap: Grayscale -> Red -> Yellow +philips_colors = [ + (0.0, 0.0, 0.0), # 0% - Black + (0.4, 0.4, 0.4), # 40% - Gray + (0.8, 0.0, 0.0), # 80% - Red + (1.0, 1.0, 0.0) # 100% - Yellow +] +philips_cmap = LinearSegmentedColormap.from_list("philips_ceus", philips_colors) + def _smooth_3d_mask(mask: np.ndarray) -> np.ndarray: """Apply 3D smoothing to the binary mask.""" mask = binary_fill_holes(mask) @@ -133,6 +143,7 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None # Enhancement parameters self._clahe_clip_limit = 1.2 self._gamma = 1.5 + self._use_philips_ceus = False # Cache for enhanced volume self._enhanced_cache = None @@ -375,10 +386,31 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): main_h_layout.addWidget(clahe_col) main_h_layout.addWidget(gamma_col) + + # Philips CEUS Toggle + self.philips_check = QCheckBox("Pseudocoloring") + self.philips_check.setStyleSheet("color: white; font-weight: bold; font-size: 14px;") + self.philips_check.setToolTip("Philips CEUS Style:\n" + "Black → Low Intensity\n" + "Gray → Tissue Background\n" + "Red → Medium Enhancement\n" + "Yellow → Peak Enhancement") + self.philips_check.stateChanged.connect(self._on_philips_toggled) + main_h_layout.addWidget(self.philips_check) # Add to the layout below the current slice slider self._ui.verticalLayout_2.addWidget(enh_group) + def _on_philips_toggled(self, state: int) -> None: + """Handle Philips CEUS pseudocolor toggle.""" + self._use_philips_ceus = state == Qt.CheckState.Checked.value + # Update colormap on all artists + new_cmap = philips_cmap if self._use_philips_ceus else 'gray' + for artist in self._ax_sag_cor_plane_artists: + if artist: + artist.set_cmap(new_cmap) + self._refresh_frames() + def _on_clahe_changed(self, value: int) -> None: """Handle CLAHE clip limit change.""" self._clahe_clip_limit = value / 10.0 @@ -449,7 +481,8 @@ def _initialize_plane_displays(self) -> None: slice_arr = self._get_plane_slice(plane_ix) mask_arr = self._get_mask_slice(plane_ix) - artist = ax.imshow(slice_arr, cmap='gray', aspect=float(aspect), zorder=1, animated=True) # add vmin and vmax for the 0 - 255 show + current_cmap = philips_cmap if self._use_philips_ceus else 'gray' + artist = ax.imshow(slice_arr, cmap=current_cmap, aspect=float(aspect), zorder=1, animated=True) # add vmin and vmax for the 0 - 255 show v_line = ax.axvline(x=0, color='yellow', lw=0.8, animated=True, zorder=11) h_line = ax.axhline(y=0, color='yellow', lw=0.8, animated=True, zorder=11) seg_mask = ax.imshow(mask_arr, zorder=8, aspect=float(aspect), animated=True) From ef8c04b26c35aa452743cfe81e9532ac13f495a8 Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 23 Jan 2026 11:03:02 +0100 Subject: [PATCH 30/61] feat: display NIfTI metadata on load --- src/ceus/application_model.py | 21 +++++++++++++++++++++ src/qus/application_model.py | 22 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/src/ceus/application_model.py b/src/ceus/application_model.py index df58fab..6c6cc50 100644 --- a/src/ceus/application_model.py +++ b/src/ceus/application_model.py @@ -294,6 +294,17 @@ def _on_image_loading_complete(self, image_data: UltrasoundImage) -> None: # Check if loading was successful if isinstance(image_data, UltrasoundImage): self._image_data = image_data + + # Print NIfTI information if applicable + scan_path = getattr(image_data, 'scan_path', '') + if scan_path and scan_path.lower().endswith(('.nii', '.nii.gz')): + print(f"\n--- NIfTI Image Loaded (QuantUS GUI) ---") + print(f"Path: {scan_path}") + print(f"Shape: {getattr(image_data.pixel_data, 'shape', 'Unknown')}") + print(f"Pixel Dimensions: {getattr(image_data, 'pixdim', 'Unknown')}") + print(f"Frame Rate: {getattr(image_data, 'frame_rate', 'Unknown')}") + print(f"----------------------------------------\n") + self.image_loaded.emit(image_data) else: print(f"DEBUG: Image loading failed - invalid image data:") @@ -434,6 +445,16 @@ def _on_segmentation_loading_complete(self, seg_data: CeusSeg) -> None: # Check if loading was successful if seg_data and hasattr(seg_data, 'seg_mask') and seg_data.seg_mask is not None: self._seg_data = seg_data + + # Print NIfTI information if applicable + seg_path = getattr(self._seg_worker, 'seg_path', '') + if seg_path and seg_path.lower().endswith(('.nii', '.nii.gz')): + print(f"\n--- NIfTI Segmentation Loaded (QuantUS GUI) ---") + print(f"Path: {seg_path}") + print(f"Shape: {getattr(seg_data.seg_mask, 'shape', 'Unknown')}") + print(f"Pixel Dimensions: {getattr(seg_data, 'pixdim', 'Unknown')}") + print(f"-----------------------------------------------\n") + self.segmentation_loaded.emit(seg_data) else: print(f"DEBUG: Segmentation loading failed - invalid seg data") diff --git a/src/qus/application_model.py b/src/qus/application_model.py index c84ffec..3a6d558 100644 --- a/src/qus/application_model.py +++ b/src/qus/application_model.py @@ -462,6 +462,17 @@ def _on_image_loading_complete(self, image_data: UltrasoundRfImage) -> None: hasattr(image_data, 'bmode') and image_data.bmode is not None): self._image_data = image_data + + # Print NIfTI information if applicable + scan_path = getattr(image_data, 'scan_path', '') + if scan_path and scan_path.lower().endswith(('.nii', '.nii.gz')): + print(f"\n--- NIfTI Image Loaded (QuantUS GUI) ---") + print(f"Path: {scan_path}") + print(f"B-mode Shape: {getattr(image_data.bmode, 'shape', 'Unknown')}") + print(f"RF Data Shape: {getattr(image_data.rf_data, 'shape', 'Unknown')}") + print(f"Spatial Dimensions: {getattr(image_data, 'spatial_dims', 'Unknown')}") + print(f"----------------------------------------\n") + self.image_loaded.emit(image_data) else: print(f"DEBUG: Image loading failed - invalid image data:") @@ -608,6 +619,17 @@ def _on_segmentation_loading_complete(self, seg_data: BmodeSeg) -> None: # Check if loading was successful if seg_data and hasattr(seg_data, 'seg_mask') and seg_data.seg_mask is not None: self._seg_data = seg_data + + # Print NIfTI information if applicable + seg_path = getattr(self._seg_worker, 'seg_path', '') + if seg_path and seg_path.lower().endswith(('.nii', '.nii.gz')): + print(f"\n--- NIfTI Segmentation Loaded (QuantUS GUI) ---") + print(f"Path: {seg_path}") + print(f"RF-Space Mask Shape: {getattr(seg_data.seg_mask, 'shape', 'Unknown')}") + if hasattr(seg_data, 'sc_seg_mask') and seg_data.sc_seg_mask is not None: + print(f"Scan-Converted Mask Shape: {seg_data.sc_seg_mask.shape}") + print(f"-----------------------------------------------\n") + self.segmentation_loaded.emit(seg_data) else: print(f"DEBUG: Segmentation loading failed - invalid seg data") From 77a6b1d0fee4b4b829eeda2e9ec38438c4e53b84 Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 23 Jan 2026 11:03:02 +0100 Subject: [PATCH 31/61] feat: add dynamic aspect ratio and width control in VOI menu --- src/ceus/seg_loading/views/draw_voi_widget.py | 95 +++++++++++++++---- 1 file changed, 78 insertions(+), 17 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 19d11eb..2b8505f 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -143,6 +143,7 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None # Enhancement parameters self._clahe_clip_limit = 1.2 self._gamma = 1.5 + self._width_scale = 1.0 self._use_philips_ceus = False # Cache for enhanced volume @@ -337,10 +338,16 @@ def _setup_enhancement_controls(self) -> None: enh_group = QFrame() enh_group.setStyleSheet("background-color: rgba(255, 255, 255, 0); border: none;") - # Main horizontal layout to put sliders "beside" each other - main_h_layout = QHBoxLayout(enh_group) - main_h_layout.setContentsMargins(0, 10, 0, 10) - main_h_layout.setSpacing(20) + # Main vertical layout to stack rows + container_layout = QVBoxLayout(enh_group) + container_layout.setContentsMargins(0, 10, 0, 10) + container_layout.setSpacing(15) + + # Rows for horizontal grouping + row1_layout = QHBoxLayout() + row2_layout = QHBoxLayout() + row1_layout.setSpacing(20) + row2_layout.setSpacing(20) # Helper to create a styled slider column def create_enh_column(label_text, min_val, max_val, current_val, callback): @@ -376,16 +383,20 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): return col_widget, slider, val_lbl - # Create the 2 columns + # Create the columns clahe_col, self.clahe_slider, self.clahe_val_lbl = create_enh_column( "CLAHE", 1, 100, int(self._clahe_clip_limit * 10), self._on_clahe_changed ) gamma_col, self.gamma_slider, self.gamma_val_lbl = create_enh_column( "GAMMA", 1, 40, int(self._gamma * 10), self._on_gamma_changed ) + width_col, self.width_slider, self.width_val_lbl = create_enh_column( + "WIDTH", 1, 50, int(self._width_scale * 10), self._on_width_changed + ) - main_h_layout.addWidget(clahe_col) - main_h_layout.addWidget(gamma_col) + row1_layout.addWidget(clahe_col) + row1_layout.addWidget(gamma_col) + row2_layout.addWidget(width_col) # Philips CEUS Toggle self.philips_check = QCheckBox("Pseudocoloring") @@ -396,8 +407,11 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): "Red → Medium Enhancement\n" "Yellow → Peak Enhancement") self.philips_check.stateChanged.connect(self._on_philips_toggled) - main_h_layout.addWidget(self.philips_check) + row2_layout.addWidget(self.philips_check) + container_layout.addLayout(row1_layout) + container_layout.addLayout(row2_layout) + # Add to the layout below the current slice slider self._ui.verticalLayout_2.addWidget(enh_group) @@ -424,11 +438,51 @@ def _on_gamma_changed(self, value: int) -> None: if hasattr(self, 'gamma_val_lbl'): self.gamma_val_lbl.setText(f"{self._gamma:.1f}") self._invalidate_enhancement_cache() + + def _on_width_changed(self, value: int) -> None: + """Handle width scale change.""" + self._width_scale = value / 10.0 + if hasattr(self, 'width_val_lbl'): + self.width_val_lbl.setText(f"{self._width_scale:.1f}") + self._update_aspect_ratios() + self._refresh_frames() + + def _update_aspect_ratios(self) -> None: + """Update the aspect ratios of the axes based on the current width scale.""" + if not hasattr(self, '_image_data') or self._image_data is None: + return + + try: + pix = self._image_data.pixdim + # Index 0: Axial (Plane 0) + if self._ax_sag_cor_matplotlib_canvases[0]: + dx, dy = pix[0], pix[1] + aspect = (dy / dx if dx != 0 else 1.0) * self._width_scale + self._ax_sag_cor_matplotlib_canvases[0].figure.gca().set_aspect(aspect) + + # Index 1: Sagittal (Plane 1) + if self._ax_sag_cor_matplotlib_canvases[1]: + dy, dz = pix[1], pix[2] + aspect = (dy / dz if dz != 0 else 1.0) * self._width_scale + self._ax_sag_cor_matplotlib_canvases[1].figure.gca().set_aspect(aspect) + + # Index 2: Coronal (Plane 2) + if self._ax_sag_cor_matplotlib_canvases[2]: + dx, dz = pix[0], pix[2] + aspect = (dx / dz if dz != 0 else 1.0) * self._width_scale + self._ax_sag_cor_matplotlib_canvases[2].figure.gca().set_aspect(aspect) + + for canvas in self._ax_sag_cor_matplotlib_canvases: + if canvas: + canvas.draw_idle() + except Exception as e: + print(f"Error updating aspect ratios: {e}") def _reset_enhancement(self, _=None) -> None: """Reset enhancement parameters to defaults.""" self.clahe_slider.setValue(12) # 1.2 self.gamma_slider.setValue(15) # 1.5 + self.width_slider.setValue(10) # 1.0 def _invalidate_enhancement_cache(self) -> None: """Invalidate the cache and trigger a refresh of all planes.""" @@ -462,18 +516,25 @@ def _initialize_plane_displays(self) -> None: continue try: fig = canvas.figure - if plane_ix == 0: # Axial: y vs x - aspect = (self._image_data.pixdim[0]) / (self._image_data.pixdim[1]) if self._image_data.pixdim[0] != 0 else 1 - aspect = aspect * 1.8 - elif plane_ix == 1: # Sagittal: y vs z - aspect = (self._image_data.pixdim[2]) / (self._image_data.pixdim[1]) if self._image_data.pixdim[2] != 0 else 1 - aspect = aspect * 1.0 - elif plane_ix == 2: # Coronal: x vs z - aspect = (self._image_data.pixdim[2]) / (self._image_data.pixdim[0]) if self._image_data.pixdim[2] != 0 else 1 - aspect = aspect * 0.5 + if plane_ix == 0: # Axial: dim 1 (Coronal/Y) vs dim 0 (Sagittal/X) + # Rows = dim 1, Cols = dim 0 because of .T in _get_plane_slice(0) + dy = self._image_data.pixdim[1] + dx = self._image_data.pixdim[0] + base_aspect = dy / dx if dx != 0 else 1 + elif plane_ix == 1: # Sagittal: dim 1 (Coronal/Y) vs dim 2 (Axial/Z) + # Rows = dim 1, Cols = dim 2 + dy = self._image_data.pixdim[1] + dz = self._image_data.pixdim[2] + base_aspect = dy / dz if dz != 0 else 1 + elif plane_ix == 2: # Coronal: dim 0 (Sagittal/X) vs dim 2 (Axial/Z) + # Rows = dim 0, Cols = dim 2 + dx = self._image_data.pixdim[0] + dz = self._image_data.pixdim[2] + base_aspect = dx / dz if dz != 0 else 1 else: self.show_error(f"Invalid plane index: {plane_ix}") + aspect = base_aspect * self._width_scale fig.clear() ax = fig.add_subplot(111) ax.axis('off') From 96d4bf0909db18c00c894f1f07bf386dc6d5004a Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 29 Jan 2026 11:11:39 +0100 Subject: [PATCH 32/61] feat(ceus): add independent plane-specific width aspect ratio controls --- src/ceus/seg_loading/views/draw_roi_widget.py | 73 +++++++++++++++++ src/ceus/seg_loading/views/draw_voi_widget.py | 80 +++++++++++++------ 2 files changed, 127 insertions(+), 26 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_roi_widget.py b/src/ceus/seg_loading/views/draw_roi_widget.py index da771b8..f72738f 100644 --- a/src/ceus/seg_loading/views/draw_roi_widget.py +++ b/src/ceus/seg_loading/views/draw_roi_widget.py @@ -59,6 +59,8 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None self._target_frame = 0 # Target frame for smooth transitions self._frame_update_pending = False + self._width_scale = 1.0 + self._setup_ui() self._connect_signals() self._show_draw_type_selection() @@ -110,6 +112,7 @@ def _setup_ui(self) -> None: # Setup matplotlib canvas for frame preview self._setup_matplotlib_canvas() + self._setup_enhancement_controls() # Display frame preview self._initialize_frame_preview() @@ -230,6 +233,76 @@ def _update_roi_scatter(self) -> None: else: self._roi_scatter_artist.set_offsets(np.empty((0, 2))) + def _on_width_changed(self, value: int) -> None: + """Handle width scale change.""" + self._width_scale = value / 10.0 + if hasattr(self, 'width_val_lbl'): + self.width_val_lbl.setText(f"{self._width_scale:.1f}") + self._update_aspect_ratio() + + def _update_aspect_ratio(self) -> None: + """Update the aspect ratio of the main axes based on width scale.""" + if not hasattr(self, '_ax') or self._ax is None: + return + + # Calculate base physical aspect ratio + width_phys = self._all_frames.shape[2] * self._image_data.pixdim[1] * self._width_scale + height_phys = self._all_frames.shape[1] * self._image_data.pixdim[0] + + if height_phys != 0: + new_aspect = width_phys / height_phys + extent = self._im_artist.get_extent() + self._ax.set_aspect(abs((extent[1]-extent[0])/(extent[3]-extent[2]))/new_aspect) + self._matplotlib_canvas.draw_idle() + + def _setup_enhancement_controls(self) -> None: + """Add enhancement sliders to the sidebar.""" + from PyQt6.QtWidgets import QVBoxLayout, QLabel, QSlider, QFrame + + enh_group = QFrame() + enh_group.setStyleSheet("background-color: rgba(255, 255, 255, 0); border: none;") + container_layout = QVBoxLayout(enh_group) + container_layout.setContentsMargins(0, 10, 0, 10) + container_layout.setSpacing(15) + + def create_enh_column(label_text, min_val, max_val, current_val, callback): + col_widget = QWidget() + col_layout = QVBoxLayout(col_widget) + col_layout.setContentsMargins(0, 0, 0, 0) + col_layout.setSpacing(5) + + lbl = QLabel(label_text) + lbl.setStyleSheet("font-size: 14px; color: white; font-weight: bold;") + lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) + col_layout.addWidget(lbl) + + row_layout = QHBoxLayout() + slider = QSlider(Qt.Orientation.Horizontal) + slider.setRange(min_val, max_val) + slider.setValue(current_val) + slider.setMinimumWidth(100) + slider.setMaximumWidth(120) + slider.valueChanged.connect(callback) + + val_lbl = QLabel(f"{current_val/10.0:.1f}") + val_lbl.setMinimumWidth(40) + val_lbl.setStyleSheet("color: #3498db; font-weight: bold; font-size: 14px;") + + row_layout.addWidget(slider) + row_layout.addWidget(val_lbl) + col_layout.addLayout(row_layout) + + return col_widget, slider, val_lbl + + width_col, self.width_slider, self.width_val_lbl = create_enh_column( + "WIDTH", 1, 50, int(self._width_scale * 10), self._on_width_changed + ) + + container_layout.addWidget(width_col) + + # Add to the layout below the frame slider + self._ui.side_bar_layout.addWidget(enh_group) + def _on_frame_changed(self, value: int) -> None: """Handle frame slider change with optimized performance.""" self._target_frame = value diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 2b8505f..12e028e 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -143,7 +143,9 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None # Enhancement parameters self._clahe_clip_limit = 1.2 self._gamma = 1.5 - self._width_scale = 1.0 + self._width_scale_axial = 1.0 + self._width_scale_sagittal = 1.0 + self._width_scale_coronal = 1.0 self._use_philips_ceus = False # Cache for enhanced volume @@ -370,7 +372,8 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): slider.setValue(current_val) # Copy style and size constraints from slice slider if possible slider.setStyleSheet(self._ui.cur_slice_slider.styleSheet()) - slider.setMinimumWidth(150) + slider.setMinimumWidth(100) + slider.setMaximumWidth(120) slider.valueChanged.connect(callback) val_lbl = QLabel(f"{current_val/10.0:.1f}") @@ -390,15 +393,20 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): gamma_col, self.gamma_slider, self.gamma_val_lbl = create_enh_column( "GAMMA", 1, 40, int(self._gamma * 10), self._on_gamma_changed ) - width_col, self.width_slider, self.width_val_lbl = create_enh_column( - "WIDTH", 1, 50, int(self._width_scale * 10), self._on_width_changed + width_ax_col, self.width_ax_slider, self.width_ax_val_lbl = create_enh_column( + "WIDTH (AX)", 1, 50, int(self._width_scale_axial * 10), self._on_width_axial_changed + ) + width_sag_col, self.width_sag_slider, self.width_sag_val_lbl = create_enh_column( + "WIDTH (SAG)", 1, 50, int(self._width_scale_sagittal * 10), self._on_width_sagittal_changed + ) + width_cor_col, self.width_cor_slider, self.width_cor_val_lbl = create_enh_column( + "WIDTH (COR)", 1, 50, int(self._width_scale_coronal * 10), self._on_width_coronal_changed ) row1_layout.addWidget(clahe_col) row1_layout.addWidget(gamma_col) - row2_layout.addWidget(width_col) - - # Philips CEUS Toggle + + # Philips CEUS Toggle (Pseudocoloring) - now in row 1 self.philips_check = QCheckBox("Pseudocoloring") self.philips_check.setStyleSheet("color: white; font-weight: bold; font-size: 14px;") self.philips_check.setToolTip("Philips CEUS Style:\n" @@ -407,7 +415,11 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): "Red → Medium Enhancement\n" "Yellow → Peak Enhancement") self.philips_check.stateChanged.connect(self._on_philips_toggled) - row2_layout.addWidget(self.philips_check) + row1_layout.addWidget(self.philips_check) + + row2_layout.addWidget(width_ax_col) + row2_layout.addWidget(width_sag_col) + row2_layout.addWidget(width_cor_col) container_layout.addLayout(row1_layout) container_layout.addLayout(row2_layout) @@ -439,16 +451,32 @@ def _on_gamma_changed(self, value: int) -> None: self.gamma_val_lbl.setText(f"{self._gamma:.1f}") self._invalidate_enhancement_cache() - def _on_width_changed(self, value: int) -> None: - """Handle width scale change.""" - self._width_scale = value / 10.0 - if hasattr(self, 'width_val_lbl'): - self.width_val_lbl.setText(f"{self._width_scale:.1f}") + def _on_width_axial_changed(self, value: int) -> None: + """Handle axial width scale change.""" + self._width_scale_axial = value / 10.0 + if hasattr(self, 'width_ax_val_lbl'): + self.width_ax_val_lbl.setText(f"{self._width_scale_axial:.1f}") + self._update_aspect_ratios() + self._refresh_frames() + + def _on_width_sagittal_changed(self, value: int) -> None: + """Handle sagittal width scale change.""" + self._width_scale_sagittal = value / 10.0 + if hasattr(self, 'width_sag_val_lbl'): + self.width_sag_val_lbl.setText(f"{self._width_scale_sagittal:.1f}") + self._update_aspect_ratios() + self._refresh_frames() + + def _on_width_coronal_changed(self, value: int) -> None: + """Handle coronal width scale change.""" + self._width_scale_coronal = value / 10.0 + if hasattr(self, 'width_cor_val_lbl'): + self.width_cor_val_lbl.setText(f"{self._width_scale_coronal:.1f}") self._update_aspect_ratios() self._refresh_frames() def _update_aspect_ratios(self) -> None: - """Update the aspect ratios of the axes based on the current width scale.""" + """Update the aspect ratios of the axes based on the plane-specific width scales.""" if not hasattr(self, '_image_data') or self._image_data is None: return @@ -457,19 +485,19 @@ def _update_aspect_ratios(self) -> None: # Index 0: Axial (Plane 0) if self._ax_sag_cor_matplotlib_canvases[0]: dx, dy = pix[0], pix[1] - aspect = (dy / dx if dx != 0 else 1.0) * self._width_scale + aspect = (dy / dx if dx != 0 else 1.0) * self._width_scale_axial self._ax_sag_cor_matplotlib_canvases[0].figure.gca().set_aspect(aspect) # Index 1: Sagittal (Plane 1) if self._ax_sag_cor_matplotlib_canvases[1]: dy, dz = pix[1], pix[2] - aspect = (dy / dz if dz != 0 else 1.0) * self._width_scale + aspect = (dy / dz if dz != 0 else 1.0) * self._width_scale_sagittal self._ax_sag_cor_matplotlib_canvases[1].figure.gca().set_aspect(aspect) # Index 2: Coronal (Plane 2) if self._ax_sag_cor_matplotlib_canvases[2]: dx, dz = pix[0], pix[2] - aspect = (dx / dz if dz != 0 else 1.0) * self._width_scale + aspect = (dx / dz if dz != 0 else 1.0) * self._width_scale_coronal self._ax_sag_cor_matplotlib_canvases[2].figure.gca().set_aspect(aspect) for canvas in self._ax_sag_cor_matplotlib_canvases: @@ -482,7 +510,9 @@ def _reset_enhancement(self, _=None) -> None: """Reset enhancement parameters to defaults.""" self.clahe_slider.setValue(12) # 1.2 self.gamma_slider.setValue(15) # 1.5 - self.width_slider.setValue(10) # 1.0 + self.width_ax_slider.setValue(10) # 1.0 + self.width_sag_slider.setValue(10) # 1.0 + self.width_cor_slider.setValue(10) # 1.0 def _invalidate_enhancement_cache(self) -> None: """Invalidate the cache and trigger a refresh of all planes.""" @@ -516,25 +546,23 @@ def _initialize_plane_displays(self) -> None: continue try: fig = canvas.figure - if plane_ix == 0: # Axial: dim 1 (Coronal/Y) vs dim 0 (Sagittal/X) - # Rows = dim 1, Cols = dim 0 because of .T in _get_plane_slice(0) + if plane_ix == 0: # Axial dy = self._image_data.pixdim[1] dx = self._image_data.pixdim[0] base_aspect = dy / dx if dx != 0 else 1 - elif plane_ix == 1: # Sagittal: dim 1 (Coronal/Y) vs dim 2 (Axial/Z) - # Rows = dim 1, Cols = dim 2 + aspect = base_aspect * self._width_scale_axial + elif plane_ix == 1: # Sagittal dy = self._image_data.pixdim[1] dz = self._image_data.pixdim[2] base_aspect = dy / dz if dz != 0 else 1 - elif plane_ix == 2: # Coronal: dim 0 (Sagittal/X) vs dim 2 (Axial/Z) - # Rows = dim 0, Cols = dim 2 + aspect = base_aspect * self._width_scale_sagittal + elif plane_ix == 2: # Coronal dx = self._image_data.pixdim[0] dz = self._image_data.pixdim[2] base_aspect = dx / dz if dz != 0 else 1 + aspect = base_aspect * self._width_scale_coronal else: self.show_error(f"Invalid plane index: {plane_ix}") - - aspect = base_aspect * self._width_scale fig.clear() ax = fig.add_subplot(111) ax.axis('off') From 95965a924ebeecdd75037fb4ae2e599ab3f48605 Mon Sep 17 00:00:00 2001 From: David Spector Date: Sun, 1 Feb 2026 17:52:35 -0800 Subject: [PATCH 33/61] removed saved _ui.py file --- src/qus/seg_loading/ui/roi_drawing_ui.py | 916 ----------------------- 1 file changed, 916 deletions(-) delete mode 100644 src/qus/seg_loading/ui/roi_drawing_ui.py diff --git a/src/qus/seg_loading/ui/roi_drawing_ui.py b/src/qus/seg_loading/ui/roi_drawing_ui.py deleted file mode 100644 index 024639d..0000000 --- a/src/qus/seg_loading/ui/roi_drawing_ui.py +++ /dev/null @@ -1,916 +0,0 @@ -# Form implementation generated from reading ui file 'src/qus/seg_loading/ui/roi_drawing.ui' -# -# Created by: PyQt6 UI code generator 6.9.1 -# -# WARNING: Any manual changes made to this file will be lost when pyuic6 is -# run again. Do not edit this file unless you know what you are doing. - - -from PyQt6 import QtCore, QtGui, QtWidgets - - -class Ui_constructRoi(object): - def setupUi(self, constructRoi): - constructRoi.setObjectName("constructRoi") - constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) - constructRoi.setStyleSheet("QWidget {\n" -" background: rgb(42, 42, 42);\n" -"}") - self.main_layout = QtWidgets.QVBoxLayout(constructRoi) - self.main_layout.setContentsMargins(0, 0, 0, 0) - self.main_layout.setObjectName("main_layout") - self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=constructRoi) - self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") - self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) - self.full_screen_layout.setObjectName("full_screen_layout") - self.side_bar_layout = QtWidgets.QVBoxLayout() - self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) - self.side_bar_layout.setSpacing(0) - self.side_bar_layout.setObjectName("side_bar_layout") - self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) - self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) - self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) - self.sidebar.setStyleSheet("QWidget {\n" -" background-color: rgb(28, 0, 101);\n" -"}") - self.sidebar.setObjectName("sidebar") - self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) - self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) - self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) - self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) - self.imageSelectionSidebar.setStyleSheet("QFrame {\n" -" background-color: rgb(99, 0, 174);\n" -" border: 1px solid black;\n" -"}") - self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) - self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) - self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") - self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) - self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) - self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" -" font-size: 21px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -" font-weight: bold;\n" -"}") - self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") - self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) - self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) - self.imageLabel.setStyleSheet("QLabel {\n" -" font-size: 16px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -" font-weight: bold;\n" -"}") - self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.imageLabel.setObjectName("imageLabel") - self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) - self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) - self.phantomLabel.setStyleSheet("QLabel {\n" -" font-size: 16px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -" font-weight: bold\n" -"}") - self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.phantomLabel.setObjectName("phantomLabel") - self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) - self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) - self.image_path_input.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -"}") - self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.image_path_input.setObjectName("image_path_input") - self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) - self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) - self.phantom_path_input.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -"}") - self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.phantom_path_input.setObjectName("phantom_path_input") - self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) - self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) - self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) - self.roiSidebar.setStyleSheet("QFrame {\n" -" background-color: rgb(99, 0, 174);\n" -" border: 1px solid black;\n" -"}") - self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) - self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) - self.roiSidebar.setObjectName("roiSidebar") - self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) - self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) - self.roiSidebarLabel.setStyleSheet("QLabel {\n" -" font-size: 21px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -" font-weight: bold;\n" -"}") - self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.roiSidebarLabel.setObjectName("roiSidebarLabel") - self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) - self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) - self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) - self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) - self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" -" background-color: rgb(49, 0, 124);\n" -" border: 1px solid black;\n" -"}") - self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) - self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) - self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") - self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) - self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) - self.rfAnalysisLabel.setStyleSheet("QLabel {\n" -" font-size: 21px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -" font-weight: bold;\n" -"}") - self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") - self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) - self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) - self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) - self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) - self.exportResultsSidebar.setStyleSheet("QFrame {\n" -" background-color: rgb(49, 0, 124);\n" -" border: 1px solid black;\n" -"}") - self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) - self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) - self.exportResultsSidebar.setObjectName("exportResultsSidebar") - self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) - self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) - self.exportResultsLabel.setStyleSheet("QLabel {\n" -" font-size: 21px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -" font-weight: bold;\n" -"}") - self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.exportResultsLabel.setObjectName("exportResultsLabel") - self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) - self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) - self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) - self.analysisParamsSidebar.setStyleSheet("QFrame {\n" -" background-color: rgb(49, 0, 124);\n" -" border: 1px solid black;\n" -"}") - self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) - self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) - self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") - self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) - self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) - self.analysisParamsLabel.setStyleSheet("QLabel {\n" -" font-size: 21px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -" font-weight:bold;\n" -"}") - self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.analysisParamsLabel.setObjectName("analysisParamsLabel") - self.side_bar_layout.addWidget(self.sidebar) - self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) - self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) - self.gridFrame.setStyleSheet("QFrame {\n" -" background-color: rgb(28, 0, 101);\n" -"}") - self.gridFrame.setObjectName("gridFrame") - self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) - self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) - self.backButtonGrid.setContentsMargins(10, 10, 10, 10) - self.backButtonGrid.setObjectName("backButtonGrid") - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) - self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) - self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) - self.back_button.setMinimumSize(QtCore.QSize(131, 41)) - self.back_button.setMaximumSize(QtCore.QSize(131, 41)) - self.back_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.back_button.setObjectName("back_button") - self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) - self.side_bar_layout.addWidget(self.gridFrame) - self.loading_screen_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.loading_screen_label.setStyleSheet("QLabel {\n" -" color: rgb(0, 255, 0);\n" -" font-size: 20px;\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.loading_screen_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.loading_screen_label.setObjectName("loading_screen_label") - self.side_bar_layout.addWidget(self.loading_screen_label) - self.full_screen_layout.addLayout(self.side_bar_layout) - self.draw_roi_layout = QtWidgets.QVBoxLayout() - self.draw_roi_layout.setContentsMargins(30, 10, 30, 10) - self.draw_roi_layout.setSpacing(10) - self.draw_roi_layout.setObjectName("draw_roi_layout") - self.draw_roi_heading_layout = QtWidgets.QVBoxLayout() - self.draw_roi_heading_layout.setSpacing(5) - self.draw_roi_heading_layout.setObjectName("draw_roi_heading_layout") - self.draw_roi_title_layout = QtWidgets.QHBoxLayout() - self.draw_roi_title_layout.setObjectName("draw_roi_title_layout") - self.pix_dim_layout_cm = QtWidgets.QVBoxLayout() - self.pix_dim_layout_cm.setObjectName("pix_dim_layout_cm") - self.physical_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_dims_label.setStyleSheet("QLabel {\n" -" font-size: 18px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_dims_label.setScaledContents(False) - self.physical_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.physical_dims_label.setWordWrap(True) - self.physical_dims_label.setObjectName("physical_dims_label") - self.pix_dim_layout_cm.addWidget(self.physical_dims_label) - self.pix_dim_grid_cm = QtWidgets.QGridLayout() - self.pix_dim_grid_cm.setObjectName("pix_dim_grid_cm") - self.physical_depth_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_depth_label.setMinimumSize(QtCore.QSize(129, 0)) - self.physical_depth_label.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_depth_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_depth_label.setScaledContents(False) - self.physical_depth_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_depth_label.setWordWrap(True) - self.physical_depth_label.setObjectName("physical_depth_label") - self.pix_dim_grid_cm.addWidget(self.physical_depth_label, 1, 0, 1, 1) - self.physical_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_width_val.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_width_val.setScaledContents(False) - self.physical_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_width_val.setWordWrap(True) - self.physical_width_val.setObjectName("physical_width_val") - self.pix_dim_grid_cm.addWidget(self.physical_width_val, 0, 1, 1, 1) - self.physical_depth_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_depth_val.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_depth_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_depth_val.setScaledContents(False) - self.physical_depth_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_depth_val.setWordWrap(True) - self.physical_depth_val.setObjectName("physical_depth_val") - self.pix_dim_grid_cm.addWidget(self.physical_depth_val, 1, 1, 1, 1) - self.physical_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_width_label.setMinimumSize(QtCore.QSize(129, 0)) - self.physical_width_label.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_width_label.setScaledContents(False) - self.physical_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_width_label.setWordWrap(True) - self.physical_width_label.setObjectName("physical_width_label") - self.pix_dim_grid_cm.addWidget(self.physical_width_label, 0, 0, 1, 1) - self.pix_dim_layout_cm.addLayout(self.pix_dim_grid_cm) - self.pix_dim_layout_cm.setStretch(0, 1) - self.pix_dim_layout_cm.setStretch(1, 2) - self.draw_roi_title_layout.addLayout(self.pix_dim_layout_cm) - self.construct_roi_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.construct_roi_label.setStyleSheet("QLabel {\n" -" font-size: 29px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.construct_roi_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.construct_roi_label.setScaledContents(False) - self.construct_roi_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.construct_roi_label.setWordWrap(True) - self.construct_roi_label.setObjectName("construct_roi_label") - self.draw_roi_title_layout.addWidget(self.construct_roi_label) - self.pix_dim_layout = QtWidgets.QVBoxLayout() - self.pix_dim_layout.setObjectName("pix_dim_layout") - self.pixel_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.pixel_dims_label.setStyleSheet("QLabel {\n" -" font-size: 18px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.pixel_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.pixel_dims_label.setScaledContents(False) - self.pixel_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.pixel_dims_label.setWordWrap(True) - self.pixel_dims_label.setObjectName("pixel_dims_label") - self.pix_dim_layout.addWidget(self.pixel_dims_label) - self.pix_dim_grid = QtWidgets.QGridLayout() - self.pix_dim_grid.setObjectName("pix_dim_grid") - self.pixel_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.pixel_width_label.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.pixel_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.pixel_width_label.setScaledContents(False) - self.pixel_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.pixel_width_label.setWordWrap(True) - self.pixel_width_label.setObjectName("pixel_width_label") - self.pix_dim_grid.addWidget(self.pixel_width_label, 0, 0, 1, 1) - self.pixel_depth_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.pixel_depth_label.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.pixel_depth_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.pixel_depth_label.setScaledContents(False) - self.pixel_depth_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.pixel_depth_label.setWordWrap(True) - self.pixel_depth_label.setObjectName("pixel_depth_label") - self.pix_dim_grid.addWidget(self.pixel_depth_label, 1, 0, 1, 1) - self.pixel_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.pixel_width_val.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.pixel_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.pixel_width_val.setScaledContents(False) - self.pixel_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.pixel_width_val.setWordWrap(True) - self.pixel_width_val.setObjectName("pixel_width_val") - self.pix_dim_grid.addWidget(self.pixel_width_val, 0, 1, 1, 1) - self.pixel_depth_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.pixel_depth_val.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.pixel_depth_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.pixel_depth_val.setScaledContents(False) - self.pixel_depth_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.pixel_depth_val.setWordWrap(True) - self.pixel_depth_val.setObjectName("pixel_depth_val") - self.pix_dim_grid.addWidget(self.pixel_depth_val, 1, 1, 1, 1) - self.pix_dim_layout.addLayout(self.pix_dim_grid) - self.pix_dim_layout.setStretch(0, 1) - self.pix_dim_layout.setStretch(1, 2) - self.draw_roi_title_layout.addLayout(self.pix_dim_layout) - self.draw_roi_title_layout.setStretch(0, 1) - self.draw_roi_title_layout.setStretch(1, 2) - self.draw_roi_title_layout.setStretch(2, 1) - self.draw_roi_heading_layout.addLayout(self.draw_roi_title_layout) - self.draw_roi_layout.addLayout(self.draw_roi_heading_layout) - self.brightness_control_layout = QtWidgets.QHBoxLayout() - self.brightness_control_layout.setSpacing(10) - self.brightness_control_layout.setObjectName("brightness_control_layout") - self.brightness_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.brightness_label.setMinimumSize(QtCore.QSize(80, 41)) - self.brightness_label.setMaximumSize(QtCore.QSize(80, 41)) - self.brightness_label.setStyleSheet("QLabel {\n" -" font-size: 15px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.brightness_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.brightness_label.setObjectName("brightness_label") - self.brightness_control_layout.addWidget(self.brightness_label) - self.brightness_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) - self.brightness_slider.setMinimumSize(QtCore.QSize(200, 41)) - self.brightness_slider.setMaximumSize(QtCore.QSize(200, 41)) - self.brightness_slider.setStyleSheet("QSlider::groove:horizontal {\n" -" border: 1px solid #999999;\n" -" height: 8px;\n" -" background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4);\n" -" margin: 2px 0;\n" -"}\n" -"QSlider::handle:horizontal {\n" -" background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);\n" -" border: 1px solid #5c5c5c;\n" -" width: 18px;\n" -" margin: 2px 0;\n" -" border-radius: 3px;\n" -"}") - self.brightness_slider.setMinimum(0) - self.brightness_slider.setMaximum(100) - self.brightness_slider.setProperty("value", 0) - self.brightness_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) - self.brightness_slider.setObjectName("brightness_slider") - self.brightness_control_layout.addWidget(self.brightness_slider) - self.brightness_value_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.brightness_value_label.setMinimumSize(QtCore.QSize(40, 41)) - self.brightness_value_label.setMaximumSize(QtCore.QSize(40, 41)) - self.brightness_value_label.setStyleSheet("QLabel {\n" -" font-size: 15px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.brightness_value_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.brightness_value_label.setObjectName("brightness_value_label") - self.brightness_control_layout.addWidget(self.brightness_value_label) - self.draw_roi_layout.addLayout(self.brightness_control_layout) - self.overlay_control_layout = QtWidgets.QHBoxLayout() - self.overlay_control_layout.setSpacing(10) - self.overlay_control_layout.setObjectName("overlay_control_layout") - self.dicom_overlay_checkbox = QtWidgets.QCheckBox(parent=self.horizontalLayoutWidget_4) - self.dicom_overlay_checkbox.setMinimumSize(QtCore.QSize(200, 41)) - self.dicom_overlay_checkbox.setMaximumSize(QtCore.QSize(200, 41)) - self.dicom_overlay_checkbox.setStyleSheet("QCheckBox {\n" -" color: rgb(255, 255, 255);\n" -" font-size: 15px;\n" -" background-color: rgba(255, 255, 255, 0);\n" -" border: 0px;\n" -"}\n" -"QCheckBox::indicator {\n" -" width: 20px;\n" -" height: 20px;\n" -" border-radius: 10px;\n" -" background-color: rgb(90, 37, 255);\n" -" border: 2px solid rgb(255, 255, 255);\n" -"}\n" -"QCheckBox::indicator:checked {\n" -" background-color: rgb(90, 37, 255);\n" -" border: 2px solid rgb(255, 255, 255);\n" -"}") - self.dicom_overlay_checkbox.setObjectName("dicom_overlay_checkbox") - self.overlay_control_layout.addWidget(self.dicom_overlay_checkbox) - self.transparency_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.transparency_label.setMinimumSize(QtCore.QSize(100, 41)) - self.transparency_label.setMaximumSize(QtCore.QSize(100, 41)) - self.transparency_label.setStyleSheet("QLabel {\n" -" font-size: 15px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.transparency_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.transparency_label.setObjectName("transparency_label") - self.overlay_control_layout.addWidget(self.transparency_label) - self.transparency_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) - self.transparency_slider.setMinimumSize(QtCore.QSize(200, 41)) - self.transparency_slider.setMaximumSize(QtCore.QSize(200, 41)) - self.transparency_slider.setStyleSheet("QSlider::groove:horizontal {\n" -" border: 1px solid #999999;\n" -" height: 8px;\n" -" background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4);\n" -" margin: 2px 0;\n" -"}\n" -"QSlider::handle:horizontal {\n" -" background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);\n" -" border: 1px solid #5c5c5c;\n" -" width: 18px;\n" -" margin: 2px 0;\n" -" border-radius: 3px;\n" -"}") - self.transparency_slider.setMinimum(0) - self.transparency_slider.setMaximum(100) - self.transparency_slider.setProperty("value", 50) - self.transparency_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) - self.transparency_slider.setObjectName("transparency_slider") - self.overlay_control_layout.addWidget(self.transparency_slider) - self.transparency_value_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.transparency_value_label.setMinimumSize(QtCore.QSize(40, 41)) - self.transparency_value_label.setMaximumSize(QtCore.QSize(40, 41)) - self.transparency_value_label.setStyleSheet("QLabel {\n" -" font-size: 15px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.transparency_value_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.transparency_value_label.setObjectName("transparency_value_label") - self.overlay_control_layout.addWidget(self.transparency_value_label) - self.draw_roi_layout.addLayout(self.overlay_control_layout) - self.load_dicom_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.load_dicom_button.setMinimumSize(QtCore.QSize(241, 41)) - self.load_dicom_button.setMaximumSize(QtCore.QSize(241, 41)) - self.load_dicom_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}\n" -"QPushButton:hover {\n" -" background-color: rgb(120, 67, 255);\n" -"}\n" -"QPushButton:pressed {\n" -" background-color: rgb(60, 17, 195);\n" -"}") - self.load_dicom_button.setObjectName("load_dicom_button") - self.draw_roi_layout.addWidget(self.load_dicom_button) - self.horizontalLayout_4 = QtWidgets.QHBoxLayout() - self.horizontalLayout_4.setObjectName("horizontalLayout_4") - self.back_from_drag_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.back_from_drag_button.setMinimumSize(QtCore.QSize(241, 41)) - self.back_from_drag_button.setMaximumSize(QtCore.QSize(241, 41)) - self.back_from_drag_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}\n" -"") - self.back_from_drag_button.setCheckable(True) - self.back_from_drag_button.setChecked(False) - self.back_from_drag_button.setObjectName("back_from_drag_button") - self.horizontalLayout_4.addWidget(self.back_from_drag_button) - self.save_drag_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.save_drag_button.setMinimumSize(QtCore.QSize(241, 41)) - self.save_drag_button.setMaximumSize(QtCore.QSize(241, 41)) - self.save_drag_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}\n" -"") - self.save_drag_button.setCheckable(True) - self.save_drag_button.setChecked(False) - self.save_drag_button.setObjectName("save_drag_button") - self.horizontalLayout_4.addWidget(self.save_drag_button) - self.draw_roi_layout.addLayout(self.horizontalLayout_4) - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") - self.draw_pts_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.draw_pts_type_button.setMinimumSize(QtCore.QSize(221, 41)) - self.draw_pts_type_button.setMaximumSize(QtCore.QSize(221, 41)) - self.draw_pts_type_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}\n" -"") - self.draw_pts_type_button.setCheckable(True) - self.draw_pts_type_button.setChecked(False) - self.draw_pts_type_button.setObjectName("draw_pts_type_button") - self.horizontalLayout.addWidget(self.draw_pts_type_button) - self.draw_freehand_drag_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.draw_freehand_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) - self.draw_freehand_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) - self.draw_freehand_drag_type_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}\n" -"QPushButton:checked {\n" -" color:white; \n" -" font-size: 16px;\n" -" background: rgb(45, 0, 110);\n" -" border-radius: 15px;\n" -"}\n" -"") - self.draw_freehand_drag_type_button.setCheckable(False) - self.draw_freehand_drag_type_button.setChecked(False) - self.draw_freehand_drag_type_button.setObjectName("draw_freehand_drag_type_button") - self.horizontalLayout.addWidget(self.draw_freehand_drag_type_button) - self.draw_rect_drag_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.draw_rect_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) - self.draw_rect_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) - self.draw_rect_drag_type_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}\n" -"QPushButton:checked {\n" -" color:white; \n" -" font-size: 16px;\n" -" background: rgb(45, 0, 110);\n" -" border-radius: 15px;\n" -"}\n" -"") - self.draw_rect_drag_type_button.setCheckable(False) - self.draw_rect_drag_type_button.setChecked(False) - self.draw_rect_drag_type_button.setObjectName("draw_rect_drag_type_button") - self.horizontalLayout.addWidget(self.draw_rect_drag_type_button) - self.draw_roi_layout.addLayout(self.horizontalLayout) - self.horizontalLayout_3 = QtWidgets.QHBoxLayout() - self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.clear_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.clear_roi_button.setMinimumSize(QtCore.QSize(141, 41)) - self.clear_roi_button.setMaximumSize(QtCore.QSize(141, 41)) - self.clear_roi_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.clear_roi_button.setCheckable(False) - self.clear_roi_button.setObjectName("clear_roi_button") - self.horizontalLayout_3.addWidget(self.clear_roi_button) - self.undo_last_pt_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.undo_last_pt_button.setMinimumSize(QtCore.QSize(141, 41)) - self.undo_last_pt_button.setMaximumSize(QtCore.QSize(141, 41)) - self.undo_last_pt_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.undo_last_pt_button.setCheckable(False) - self.undo_last_pt_button.setObjectName("undo_last_pt_button") - self.horizontalLayout_3.addWidget(self.undo_last_pt_button) - self.close_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.close_roi_button.setMinimumSize(QtCore.QSize(141, 41)) - self.close_roi_button.setMaximumSize(QtCore.QSize(141, 41)) - self.close_roi_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.close_roi_button.setCheckable(False) - self.close_roi_button.setObjectName("close_roi_button") - self.horizontalLayout_3.addWidget(self.close_roi_button) - self.back_from_pts_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.back_from_pts_button.setMinimumSize(QtCore.QSize(141, 41)) - self.back_from_pts_button.setMaximumSize(QtCore.QSize(141, 41)) - self.back_from_pts_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.back_from_pts_button.setCheckable(False) - self.back_from_pts_button.setObjectName("back_from_pts_button") - self.horizontalLayout_3.addWidget(self.back_from_pts_button) - self.save_pts_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.save_pts_button.setMinimumSize(QtCore.QSize(141, 41)) - self.save_pts_button.setMaximumSize(QtCore.QSize(141, 41)) - self.save_pts_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.save_pts_button.setCheckable(False) - self.save_pts_button.setObjectName("save_pts_button") - self.horizontalLayout_3.addWidget(self.save_pts_button) - self.draw_roi_layout.addLayout(self.horizontalLayout_3) - self.save_roi_layout = QtWidgets.QGridLayout() - self.save_roi_layout.setContentsMargins(-1, -1, -1, 10) - self.save_roi_layout.setSpacing(10) - self.save_roi_layout.setObjectName("save_roi_layout") - self.save_folder_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) - self.save_folder_input.setMinimumSize(QtCore.QSize(201, 31)) - self.save_folder_input.setMaximumSize(QtCore.QSize(401, 31)) - self.save_folder_input.setStyleSheet("QLineEdit {\n" -" background-color: rgb(249, 249, 249);\n" -" color: black;\n" -"}") - self.save_folder_input.setObjectName("save_folder_input") - self.save_roi_layout.addWidget(self.save_folder_input, 0, 1, 1, 1) - self.dest_folder_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.dest_folder_label.setStyleSheet("QLabel {\n" -" background-color: rgba(255, 255, 255, 0);\n" -" color: white;\n" -" font-size: 17px;\n" -"}") - self.dest_folder_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.dest_folder_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) - self.dest_folder_label.setObjectName("dest_folder_label") - self.save_roi_layout.addWidget(self.dest_folder_label, 0, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.roi_name_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.roi_name_label.setStyleSheet("QLabel {\n" -" background-color: rgba(255, 255, 255, 0);\n" -" color: white;\n" -" font-size: 17px;\n" -"}") - self.roi_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.roi_name_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) - self.roi_name_label.setObjectName("roi_name_label") - self.save_roi_layout.addWidget(self.roi_name_label, 2, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.save_name_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) - self.save_name_input.setMinimumSize(QtCore.QSize(201, 31)) - self.save_name_input.setMaximumSize(QtCore.QSize(401, 31)) - self.save_name_input.setStyleSheet("QLineEdit {\n" -" background-color: rgb(249, 249, 249);\n" -" color: black;\n" -"}") - self.save_name_input.setObjectName("save_name_input") - self.save_roi_layout.addWidget(self.save_name_input, 2, 1, 1, 1) - self.chooseImageButtonsLayout_2 = QtWidgets.QHBoxLayout() - self.chooseImageButtonsLayout_2.setSpacing(10) - self.chooseImageButtonsLayout_2.setObjectName("chooseImageButtonsLayout_2") - self.choose_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.choose_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) - self.choose_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) - self.choose_save_folder_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.choose_save_folder_button.setObjectName("choose_save_folder_button") - self.chooseImageButtonsLayout_2.addWidget(self.choose_save_folder_button) - self.clear_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.clear_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) - self.clear_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) - self.clear_save_folder_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.clear_save_folder_button.setObjectName("clear_save_folder_button") - self.chooseImageButtonsLayout_2.addWidget(self.clear_save_folder_button) - self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_2, 0, 2, 1, 1) - self.chooseImageButtonsLayout_4 = QtWidgets.QHBoxLayout() - self.chooseImageButtonsLayout_4.setObjectName("chooseImageButtonsLayout_4") - self.save_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.save_roi_button.setMinimumSize(QtCore.QSize(131, 41)) - self.save_roi_button.setMaximumSize(QtCore.QSize(131, 41)) - self.save_roi_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.save_roi_button.setObjectName("save_roi_button") - self.chooseImageButtonsLayout_4.addWidget(self.save_roi_button) - self.back_from_save_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) - self.back_from_save_button.setMinimumSize(QtCore.QSize(131, 41)) - self.back_from_save_button.setMaximumSize(QtCore.QSize(131, 41)) - self.back_from_save_button.setStyleSheet("QPushButton {\n" -" color: white;\n" -" font-size: 16px;\n" -" background: rgb(90, 37, 255);\n" -" border-radius: 15px;\n" -"}") - self.back_from_save_button.setObjectName("back_from_save_button") - self.chooseImageButtonsLayout_4.addWidget(self.back_from_save_button) - self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_4, 2, 2, 1, 1) - self.save_roi_layout.setColumnStretch(0, 1) - self.save_roi_layout.setColumnStretch(1, 10) - self.save_roi_layout.setColumnStretch(2, 10) - self.save_roi_layout.setRowStretch(0, 1) - self.save_roi_layout.setRowStretch(1, 10) - self.save_roi_layout.setRowStretch(2, 10) - self.draw_roi_layout.addLayout(self.save_roi_layout) - self.im_display_frame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) - sizePolicy.setHorizontalStretch(10) - sizePolicy.setVerticalStretch(10) - sizePolicy.setHeightForWidth(self.im_display_frame.sizePolicy().hasHeightForWidth()) - self.im_display_frame.setSizePolicy(sizePolicy) - self.im_display_frame.setMinimumSize(QtCore.QSize(501, 321)) - self.im_display_frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) - self.im_display_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) - self.im_display_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) - self.im_display_frame.setObjectName("im_display_frame") - self.draw_roi_layout.addWidget(self.im_display_frame) - self.rect_dims_layout = QtWidgets.QHBoxLayout() - self.rect_dims_layout.setObjectName("rect_dims_layout") - self.physical_roi_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_roi_dims_label.setMinimumSize(QtCore.QSize(200, 0)) - self.physical_roi_dims_label.setStyleSheet("QLabel {\n" -" font-size: 18px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_roi_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_roi_dims_label.setScaledContents(False) - self.physical_roi_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) - self.physical_roi_dims_label.setWordWrap(True) - self.physical_roi_dims_label.setObjectName("physical_roi_dims_label") - self.rect_dims_layout.addWidget(self.physical_roi_dims_label) - self.physical_roi_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_roi_width_label.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_roi_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_roi_width_label.setScaledContents(False) - self.physical_roi_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_roi_width_label.setWordWrap(True) - self.physical_roi_width_label.setObjectName("physical_roi_width_label") - self.rect_dims_layout.addWidget(self.physical_roi_width_label, 0, QtCore.Qt.AlignmentFlag.AlignRight) - self.physical_roi_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_roi_width_val.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_roi_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_roi_width_val.setScaledContents(False) - self.physical_roi_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_roi_width_val.setWordWrap(True) - self.physical_roi_width_val.setObjectName("physical_roi_width_val") - self.rect_dims_layout.addWidget(self.physical_roi_width_val) - self.physical_roi_height_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_roi_height_label.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_roi_height_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_roi_height_label.setScaledContents(False) - self.physical_roi_height_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_roi_height_label.setWordWrap(True) - self.physical_roi_height_label.setObjectName("physical_roi_height_label") - self.rect_dims_layout.addWidget(self.physical_roi_height_label, 0, QtCore.Qt.AlignmentFlag.AlignRight) - self.physical_roi_height_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) - self.physical_roi_height_val.setStyleSheet("QLabel {\n" -" font-size: 14px;\n" -" color: rgb(255, 255, 255);\n" -" background-color: rgba(255, 255, 255, 0);\n" -"}") - self.physical_roi_height_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) - self.physical_roi_height_val.setScaledContents(False) - self.physical_roi_height_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.physical_roi_height_val.setWordWrap(True) - self.physical_roi_height_val.setObjectName("physical_roi_height_val") - self.rect_dims_layout.addWidget(self.physical_roi_height_val) - spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.rect_dims_layout.addItem(spacerItem2) - self.rect_dims_layout.setStretch(0, 1) - self.rect_dims_layout.setStretch(1, 1) - self.rect_dims_layout.setStretch(2, 2) - self.rect_dims_layout.setStretch(3, 1) - self.rect_dims_layout.setStretch(4, 2) - self.draw_roi_layout.addLayout(self.rect_dims_layout) - self.draw_roi_layout.setStretch(0, 1) - self.full_screen_layout.addLayout(self.draw_roi_layout) - self.main_layout.addWidget(self.horizontalLayoutWidget_4) - - self.retranslateUi(constructRoi) - QtCore.QMetaObject.connectSlotsByName(constructRoi) - - def retranslateUi(self, constructRoi): - _translate = QtCore.QCoreApplication.translate - constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) - self.sidebar.setToolTip(_translate("constructRoi", "


")) - self.imageSelectionLabelSidebar.setText(_translate("constructRoi", "Image Selection:")) - self.imageLabel.setText(_translate("constructRoi", "Image:")) - self.phantomLabel.setText(_translate("constructRoi", "Phantom:")) - self.image_path_input.setText(_translate("constructRoi", "Sample filename ")) - self.phantom_path_input.setText(_translate("constructRoi", "Sample filename ")) - self.roiSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) - self.rfAnalysisLabel.setText(_translate("constructRoi", "Radio Frequency Data Analysis")) - self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) - self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) - self.back_button.setText(_translate("constructRoi", "Back")) - self.loading_screen_label.setText(_translate("constructRoi", "LOADING....")) - self.physical_dims_label.setText(_translate("constructRoi", "Physical Dims (cm):")) - self.physical_depth_label.setText(_translate("constructRoi", "Depth:")) - self.physical_width_val.setText(_translate("constructRoi", "0")) - self.physical_depth_val.setText(_translate("constructRoi", "0")) - self.physical_width_label.setText(_translate("constructRoi", "Width:")) - self.construct_roi_label.setText(_translate("constructRoi", "Construct Region of Interest (ROI):")) - self.pixel_dims_label.setText(_translate("constructRoi", "Pixel Dims:")) - self.pixel_width_label.setText(_translate("constructRoi", "Width:")) - self.pixel_depth_label.setText(_translate("constructRoi", "Depth:")) - self.pixel_width_val.setText(_translate("constructRoi", "0")) - self.pixel_depth_val.setText(_translate("constructRoi", "0")) - self.brightness_label.setText(_translate("constructRoi", "Brightness:")) - self.brightness_value_label.setText(_translate("constructRoi", "0")) - self.dicom_overlay_checkbox.setText(_translate("constructRoi", "Show DICOM Overlay")) - self.transparency_label.setText(_translate("constructRoi", "Transparency:")) - self.transparency_value_label.setText(_translate("constructRoi", "50")) - self.load_dicom_button.setText(_translate("constructRoi", "Load DICOM File")) - self.back_from_drag_button.setText(_translate("constructRoi", "Back")) - self.save_drag_button.setText(_translate("constructRoi", "Save ROI")) - self.draw_pts_type_button.setText(_translate("constructRoi", "Draw Freehand w Points")) - self.draw_freehand_drag_type_button.setText(_translate("constructRoi", "Draw Freehand by Dragging")) - self.draw_rect_drag_type_button.setText(_translate("constructRoi", "Draw Rectangle by Dragging")) - self.clear_roi_button.setText(_translate("constructRoi", "Clear ROI")) - self.undo_last_pt_button.setText(_translate("constructRoi", "Undo Last Point")) - self.close_roi_button.setText(_translate("constructRoi", "Close ROI")) - self.back_from_pts_button.setText(_translate("constructRoi", "Back")) - self.save_pts_button.setText(_translate("constructRoi", "Save ROI")) - self.dest_folder_label.setText(_translate("constructRoi", "Dest Folder")) - self.roi_name_label.setText(_translate("constructRoi", "ROI Name")) - self.choose_save_folder_button.setText(_translate("constructRoi", "Choose Folder")) - self.clear_save_folder_button.setText(_translate("constructRoi", "Clear Path")) - self.save_roi_button.setText(_translate("constructRoi", "Save")) - self.back_from_save_button.setText(_translate("constructRoi", "Back")) - self.physical_roi_dims_label.setText(_translate("constructRoi", "Rect. Dims (cm):")) - self.physical_roi_width_label.setText(_translate("constructRoi", "Width:")) - self.physical_roi_width_val.setText(_translate("constructRoi", "0")) - self.physical_roi_height_label.setText(_translate("constructRoi", "Depth")) - self.physical_roi_height_val.setText(_translate("constructRoi", "0")) From deeb2c439e9472e21a57c1c78d8d518e0c17b273 Mon Sep 17 00:00:00 2001 From: David Spector Date: Sun, 1 Feb 2026 19:03:07 -0800 Subject: [PATCH 34/61] enforced mvc architecture --- requirements.txt | Bin 1496 -> 1638 bytes src/qus/seg_loading/seg_loading_controller.py | 16 +++++++++ .../seg_loading/views/roi_drawing_widget.py | 34 ++++-------------- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1922355f5e0c5dc5fb309e9c138301e36b456ab2..63bcec39399e700041d8d5c7b57f3fedaed2af13 100644 GIT binary patch delta 134 zcmcb?{fuYBK4#YfhDwGUhD?SehAf5xhE#@h23sIBV$fqS1Y!dQUIs3pIJz2LR6UdV YnML(6)#QUs%)>C*6lC(|oy_t~0A#)zV*mgE delta 12 TcmaFHbAx-sKIY9nEK*DWBj5yP diff --git a/src/qus/seg_loading/seg_loading_controller.py b/src/qus/seg_loading/seg_loading_controller.py index cedf85c..cd760c0 100644 --- a/src/qus/seg_loading/seg_loading_controller.py +++ b/src/qus/seg_loading/seg_loading_controller.py @@ -129,7 +129,23 @@ def get_loaded_segmentation(self) -> BmodeSeg: BmodeSeg: The loaded segmentation data, or None if no segmentation loaded """ return self.model.seg_data + + def load_dicom_file(self, dicom_file_path: str) -> bool: + """ + Load a DICOM file using the DicomLoader utility. + Args: + dicom_file_path (str): Path to the DICOM file to load + + Returns: + bool: True if the DICOM file was loaded successfully, False otherwise + """ + return self.model.load_dicom_file(dicom_file_path) + + def get_dicom_data(self) -> dict: + """Get processed DICOM data from the model.""" + return self.model.get_dicom_data() + def cleanup(self) -> None: """Clean up resources.""" self.model.cleanup() diff --git a/src/qus/seg_loading/views/roi_drawing_widget.py b/src/qus/seg_loading/views/roi_drawing_widget.py index ef39bf9..73d93b4 100644 --- a/src/qus/seg_loading/views/roi_drawing_widget.py +++ b/src/qus/seg_loading/views/roi_drawing_widget.py @@ -12,6 +12,7 @@ import scipy.interpolate as interpolate from PyQt6.QtCore import pyqtSignal, Qt +from PyQt6.QtWidgets import QApplication from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QLabel, QCheckBox, QPushButton from src.qus.mvc.base_view import BaseViewMixin @@ -52,6 +53,7 @@ def __init__(self, image_data: UltrasoundRfImage, frame: int = 0, brightness: in self._drawing = False # Flag to track if drawing is in progress self._frame = frame # Frame number for multi-frame images self._displayed_im: np.ndarray = None # Placeholder for the image to be displayed + self._dicom_available = False # Track if DICOM data is available # Brightness control variables self._brightness_slider: Optional[QSlider] = None @@ -183,13 +185,10 @@ def _apply_dicom_overlay(self, bmode_image: np.ndarray) -> np.ndarray: if not self._overlay_enabled: return bmode_image - # Access DICOM data from model via parent controller - dicom_data = None - if hasattr(self, '_parent_controller') and self._parent_controller: - if hasattr(self._parent_controller, 'model'): - dicom_data = self._parent_controller.model.get_dicom_data() + dicom_data = self._parent_controller.get_dicom_data() + self._dicom_available = dicom_data['available'] - if not dicom_data or not dicom_data.get('available'): + if not dicom_data or not self._dicom_available: return bmode_image dicom_image = dicom_data.get('image') @@ -366,13 +365,7 @@ def _setup_dicom_overlay_control(self) -> None: self._transparency_value_label = self._ui.transparency_value_label self._load_dicom_button = self._ui.load_dicom_button - # Check model for DICOM availability - dicom_available = False - if hasattr(self, '_parent_controller') and self._parent_controller: - if hasattr(self._parent_controller, 'model'): - dicom_available = self._parent_controller.model.dicom_available - - if not dicom_available: + if not self._dicom_available: # Hide overlay controls if DICOM is not available self._dicom_overlay_checkbox.hide() self._transparency_slider.hide() @@ -459,22 +452,9 @@ def _on_load_dicom_clicked(self) -> None: if dicom_file: # Show loading text self.show_loading() - from PyQt6.QtWidgets import QApplication QApplication.processEvents() - # Check if we have access to the model - model = None - if hasattr(self, '_parent_controller') and self._parent_controller: - if hasattr(self._parent_controller, 'model'): - model = self._parent_controller.model - - # Try to load the DICOM file via model if available, else fallback to DicomLoader - if model: - success = model.load_dicom_file(dicom_file) - else: - from src.qus.image_loading.dicom_loader import DicomLoader - dicom_pixels = DicomLoader.load_dicom_file(dicom_file) - success = dicom_pixels is not None + success = self._parent_controller.load_dicom_file(dicom_file) # Hide loading text self.hide_loading() From b1f7cecc229d3b459ba09821068ddd5535cefac2 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 9 Feb 2026 10:38:19 +0100 Subject: [PATCH 35/61] feat: update FileSelectionWidget and ceus engine for single DICOM selection --- engines/ceus | 2 +- .../views/file_selection_widget.py | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/engines/ceus b/engines/ceus index 8e0f5bd..a5a8dd4 160000 --- a/engines/ceus +++ b/engines/ceus @@ -1 +1 @@ -Subproject commit 8e0f5bd915a22ca6bb1202b7af43bafa3154ec77 +Subproject commit a5a8dd48c729cc6c2cedc90f53ae495e3a3b4d49 diff --git a/src/ceus/image_loading/views/file_selection_widget.py b/src/ceus/image_loading/views/file_selection_widget.py index 5b095c6..23f8d09 100644 --- a/src/ceus/image_loading/views/file_selection_widget.py +++ b/src/ceus/image_loading/views/file_selection_widget.py @@ -116,7 +116,8 @@ def _show_loading_message(self) -> None: def _on_choose_image_path(self) -> None: """Handle image file selection.""" - if self._file_extensions == ["FOLDER"]: + is_folder = any(ext.upper() == "FOLDER" for ext in self._file_extensions) + if is_folder: dir_name = QFileDialog.getExistingDirectory(self, "Select Directory") if dir_name: self._ui.image_path_input.setText(dir_name) @@ -133,12 +134,16 @@ def _on_generate_image(self) -> None: if not os.path.exists(image_path): self.show_error(f"Image file does not exist: {os.path.basename(image_path)}") return - if not image_path.endswith(tuple(self._file_extensions)) and self._file_extensions != ['FOLDER']: - self.show_error(f"Image file must have one of the following extensions: {', '.join(self._file_extensions)}") - return - if self._file_extensions == ["FOLDER"] and not os.path.isdir(image_path): - self.show_error("Input path must be a folder!") - return + + is_folder = any(ext.upper() == "FOLDER" for ext in self._file_extensions) + if not is_folder: + if not image_path.endswith(tuple(self._file_extensions)): + self.show_error(f"Image file must have one of the following extensions: {', '.join(self._file_extensions)}") + return + else: + if not os.path.isdir(image_path): + self.show_error("Input path must be a folder!") + return self.clear_error() From 985ca96149ede92dc7bdbf1a9bd1a7aa10237aab Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 9 Feb 2026 14:06:26 +0100 Subject: [PATCH 36/61] Feat: Add preprocessing interface to ApplicationModel and connect to backend engine --- src/ceus/application_model.py | 88 ++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/src/ceus/application_model.py b/src/ceus/application_model.py index 6c6cc50..1583dfa 100644 --- a/src/ceus/application_model.py +++ b/src/ceus/application_model.py @@ -6,7 +6,7 @@ """ import os -from typing import Dict, Any, Optional +from typing import Dict, Any, Optional, List from PyQt6.QtCore import QThread, pyqtSignal from .mvc.base_model import BaseModel @@ -88,6 +88,7 @@ class ApplicationModel(BaseModel): # Additional signals for application-specific events image_loaded = pyqtSignal(UltrasoundImage) + preprocessing_complete = pyqtSignal(UltrasoundImage) segmentation_loaded = pyqtSignal(CeusSeg) def __init__(self): @@ -251,7 +252,90 @@ def load_image(self, image_path: str, scan_loader_kwargs: Dict[str, Any] = None) # Start loading self._set_loading(True) self._scan_worker.start() - + + # ========================================================================= + # Preprocessing Interface + # ========================================================================= + + def get_preprocessing_options(self) -> Dict[str, Any]: + """ + Get available preprocessing functions from the engine. + + Returns: + Dict[str, Any]: Dictionary of function names and function objects + """ + from engines.ceus.src.image_preprocessing.options import get_im_preproc_funcs + return get_im_preproc_funcs() + + def get_preprocessing_kwargs_requirements(self, func_names: list) -> list: + """ + Get required keyword arguments for a list of preprocessing functions. + + Args: + func_names: List of preprocessing function names + + Returns: + list: List of required keyword arguments + """ + from engines.ceus.src.image_preprocessing.options import get_required_im_preproc_kwargs + return get_required_im_preproc_kwargs(func_names) + + def apply_preprocessing(self, func_configs: List[Dict[str, Any]]) -> None: + """ + Apply preprocessing to the model's current image. + This modifies the image data in the model. + + Args: + func_configs: List of dicts with 'name' and 'kwargs' for each function + """ + if not self._image_data: + self._emit_error("No image loaded to preprocess") + return + + try: + funcs = self.get_preprocessing_options() + processed_image = self._image_data + + for config in func_configs: + name = config['name'] + kwargs = config.get('kwargs', {}) + if name in funcs: + processed_image = funcs[name](processed_image, **kwargs) + else: + print(f"WARNING: Preprocessing function {name} not found") + + self._image_data = processed_image + self.preprocessing_complete.emit(self._image_data) + except Exception as e: + self._emit_error(f"Error during preprocessing: {e}") + + def enhance_image(self, image: UltrasoundImage, func_configs: List[Dict[str, Any]]) -> UltrasoundImage: + """ + Enhance a given UltrasoundImage and return the result. + Does not modify the model state. Used for preview/on-the-fly enhancement. + + Args: + image: UltrasoundImage object to enhance + func_configs: List of dicts with 'name' and 'kwargs' for each function + + Returns: + UltrasoundImage: The enhanced image object + """ + try: + funcs = self.get_preprocessing_options() + processed_image = image + + for config in func_configs: + name = config['name'] + kwargs = config.get('kwargs', {}) + if name in funcs: + processed_image = funcs[name](processed_image, **kwargs) + + return processed_image + except Exception as e: + print(f"DEBUG: enhance_image error: {e}") + return image + def _validate_image_input(self, input_data: Dict[str, Any]) -> bool: """ Validate input data for scan loading. From 7826605b3976e6386a4a27176597e9438c385bd0 Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 9 Feb 2026 14:06:45 +0100 Subject: [PATCH 37/61] Refactor: Move image preprocessing to backend engine and remove redundant GUI logic --- engines/ceus | 2 +- src/ceus/image_preprocessing/README.md | 23 --- src/ceus/image_preprocessing/decorators.py | 16 -- src/ceus/image_preprocessing/functions.py | 210 --------------------- src/ceus/image_preprocessing/options.py | 33 ---- src/ceus/image_preprocessing/transforms.py | 114 ----------- 6 files changed, 1 insertion(+), 397 deletions(-) delete mode 100644 src/ceus/image_preprocessing/README.md delete mode 100644 src/ceus/image_preprocessing/decorators.py delete mode 100644 src/ceus/image_preprocessing/functions.py delete mode 100644 src/ceus/image_preprocessing/options.py delete mode 100644 src/ceus/image_preprocessing/transforms.py diff --git a/engines/ceus b/engines/ceus index 5c37485..8eaccd8 160000 --- a/engines/ceus +++ b/engines/ceus @@ -1 +1 @@ -Subproject commit 5c37485c837f1ea011fb4812fe0a9aad53c321d2 +Subproject commit 8eaccd8b856aeeb4e9a27de35646d69506dcb630 diff --git a/src/ceus/image_preprocessing/README.md b/src/ceus/image_preprocessing/README.md deleted file mode 100644 index 9e1f415..0000000 --- a/src/ceus/image_preprocessing/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Segmentation Loading - -Image preprocessing plugins specify transformations to apply to the loaded CEUS scan before starting with analysis. These transformations can take place on the linearized signal intensities and the pixel values of the scan. - -New plugins can be added to the [src/image_preprocessing/functions.py](functions.py) file as a new function, and will extend the capabilities of QuantUS without any additional programming required. - -## Plugin Implementation - -### Plugin Structure - -Each segmentation loading plugin should be placed in the [src/image_preprocessing/functions.py](functions.py) file as a new function. Specifically, the new function must be in the following form: - -```python -def IMG_PREPROC_NAME(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: -``` - -where `IMG_PREPROC_NAME` is the name of your preprocessing step. The `image_data` input is the standard input here, but the `kwargs` variable can be used to add any additional input variables that may be needed. - -### Decorators - -Metadata can be added to new segmentation parsing functions using decorators defined in [src/seg_preprocessing/decorators.py](decorators.py). - -Currently, the only implemented decorator for this parser is the `required_kwargs` decorator, which lists the additional variables needed for a preprocessing step outside of the `image_data` input. diff --git a/src/ceus/image_preprocessing/decorators.py b/src/ceus/image_preprocessing/decorators.py deleted file mode 100644 index 549d5ce..0000000 --- a/src/ceus/image_preprocessing/decorators.py +++ /dev/null @@ -1,16 +0,0 @@ -from typing import List - -def required_kwargs(*kwarg_names: List[str]): - """ - A decorator to specify the required keyword arguments for a function. - - Args: - kwarg_names (list): List of required keyword argument names. - - Returns: - function: The decorated function with the specified keyword arguments attached as metadata. - """ - def decorator(func): - func.required_kwargs = kwarg_names - return func - return decorator diff --git a/src/ceus/image_preprocessing/functions.py b/src/ceus/image_preprocessing/functions.py deleted file mode 100644 index eb3bf1d..0000000 --- a/src/ceus/image_preprocessing/functions.py +++ /dev/null @@ -1,210 +0,0 @@ -import numpy as np -from skimage import exposure, filters -from skimage.restoration import denoise_wavelet, estimate_sigma -import cv2 - -from .decorators import required_kwargs -from engines.ceus.src.data_objs.image import UltrasoundImage -from .transforms import resample_to_spacing_2d, resample_to_spacing_3d - -@required_kwargs('arr_to_standardize') -def standardize(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: - """ - Standardize the pixel data and/or intensities for analysis of an UltrasoundImage object. - - Kwargs: - arr_to_standardize (str): One of 'both', 'intensities', 'pixel_data' to specify which arrays to standardize. - Default is 'both'. - """ - arr_to_standardize = kwargs.get('arr_to_standardize', 'both') - assert arr_to_standardize in ['both', 'intensities', 'pixel_data'], "arr_to_standardize must be one of ['both', 'intensities', 'pixel_data']" - - if arr_to_standardize in ['both', 'intensities']: - mean = np.mean(image_data.intensities_for_analysis) - std = np.std(image_data.intensities_for_analysis) - if std > 0: - image_data.intensities_for_analysis = (image_data.intensities_for_analysis - mean) / std - else: - image_data.intensities_for_analysis = image_data.intensities_for_analysis - mean - if arr_to_standardize in ['both', 'pixel_data']: - mean = np.mean(image_data.pixel_data) - std = np.std(image_data.pixel_data) - if std > 0: - image_data.pixel_data = (image_data.pixel_data - mean) / std - else: - image_data.pixel_data = image_data.pixel_data - mean - - return image_data - -@required_kwargs('target_vox_size', 'interp') -def resample(image_data: UltrasoundImage, **kwargs) -> UltrasoundImage: - """ - Resample the image data to a new spacing. - - Kwargs: - target_vox_size: tuple of (z, y, x) spacing in mm to resample the image to. - interp: interpolation method, one of 'nearest', 'linear', 'cubic'. - """ - target_vox_size = kwargs['target_vox_size'] - interp = kwargs['interp'] - - if image_data.intensities_for_analysis.ndim == 4: - image_data.pixel_data = resample_to_spacing_3d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) - image_data.intensities_for_analysis = resample_to_spacing_3d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) - elif image_data.intensities_for_analysis.ndim == 3: - image_data.pixel_data = resample_to_spacing_2d(image_data.pixel_data, image_data.pixdim, target_vox_size, interp=interp) - image_data.intensities_for_analysis = resample_to_spacing_2d(image_data.intensities_for_analysis, image_data.pixdim, target_vox_size, interp=interp) - else: - raise ValueError("Image data must be either 3D or 4D for resampling.") - - image_data.extras_dict['original_spacing'] = image_data.pixdim - image_data.pixdim = target_vox_size - - return image_data - -@required_kwargs('scale_factor', 'interp') -def enhance_spatial_resolution(volume, scale_factor=1.0, interp='cubic', **kwargs): - """ - Enhance spatial resolution by upsampling the image (increasing pixel count). - - Args: - volume: 2D or 3D array, or UltrasoundImage object - scale_factor: Multiplier for the current resolution (e.g., 2.0 to double pixels) - interp: Interpolation method ('nearest', 'linear', 'cubic') - """ - if scale_factor == 1.0: - return volume - - if isinstance(volume, UltrasoundImage): - image_data = volume - # Adjust spacing inversely to scale factor - target_vox_size = tuple(np.array(image_data.pixdim) / scale_factor) - image_data = resample(image_data, target_vox_size=target_vox_size, interp=interp) - return image_data - - # For raw arrays (2D or 3D) - if volume.ndim == 2: - orig_spacing = (1.0, 1.0) - target_spacing = (1.0 / scale_factor, 1.0 / scale_factor) - return resample_to_spacing_2d(volume, orig_spacing, target_spacing, interp=interp) - else: - orig_spacing = (1.0, 1.0, 1.0) - target_spacing = (1.0 / scale_factor, 1.0 / scale_factor, 1.0 / scale_factor) - return resample_to_spacing_3d(volume, orig_spacing, target_spacing, interp=interp) - -@required_kwargs('method') -def enhance_contrast_resolution(volume, method='clahe', **kwargs): - """ - Enhance contrast resolution using various intensity transformation methods. - Supports both 2D and 3D inputs and works as a plugin. - - Args: - volume: 2D or 3D array, or UltrasoundImage object - method: Enhancement method ('clahe', 'gamma', 'log', 'sigmoid', 'adaptive_hist') - """ - # Plugin support - if isinstance(volume, UltrasoundImage): - image_data = volume - image_data.pixel_data = enhance_contrast_resolution(image_data.pixel_data, method=method, **kwargs) - return image_data - - # Method validation and execution - if method == 'gamma': - gamma = kwargs.get('gamma', 0.7) - return exposure.adjust_gamma(volume, gamma) - elif method == 'log': - gain = kwargs.get('gain', 1) - return exposure.adjust_log(volume, gain=gain) - elif method == 'adaptive_hist': - clip_limit = kwargs.get('clip_limit', 0.01) - return exposure.equalize_adapthist(volume, clip_limit=clip_limit) - elif method == 'sigmoid': - cutoff = kwargs.get('cutoff', 0.5) - gain = kwargs.get('gain', 10) - return exposure.adjust_sigmoid(volume, cutoff=cutoff, gain=gain) - - # Slice-based methods (e.g., OpenCV CLAHE) - if method == 'clahe': - is_2d = volume.ndim == 2 - if is_2d: - volume = volume[:, :, np.newaxis] - - # Get global min/max for stable normalization across slices in 3D - v_min, v_max = volume.min(), volume.max() - v_range = v_max - v_min - - enhanced = np.zeros_like(volume) - clahe = cv2.createCLAHE(clipLimit=kwargs.get('clip_limit', 3.0), tileGridSize=kwargs.get('tile_grid_size', (8, 8))) - - for z in range(volume.shape[2]): - slice_2d = volume[:, :, z] - # OpenCV requires uint8 or uint16 - if slice_2d.dtype not in [np.uint8, np.uint16]: - if v_range > 0: - slice_to_proc = ((slice_2d - v_min) / v_range * 255).astype(np.uint8) - else: - slice_to_proc = slice_2d.astype(np.uint8) - else: - slice_to_proc = slice_2d - - enhanced[:, :, z] = clahe.apply(slice_to_proc) - - return enhanced[:, :, 0] if is_2d else enhanced - - return volume - -def enhance_image(volume, method='clahe', **kwargs): - """Alias for backward compatibility.""" - return enhance_contrast_resolution(volume, method, **kwargs) - -@required_kwargs('wavelet', 'sigma_scale') -def denoise_ceus_wavelet(volume_3d, wavelet='db1', sigma_scale=0.8): - """ - Gentler wavelet denoising. Supports both 2D and 3D inputs and works as a plugin. - - Args: - volume_3d: 2D or 3D array, or UltrasoundImage object - sigma_scale: Scale factor for noise estimate (0.3-0.7 for gentle, 1.0 for normal) - """ - if isinstance(volume_3d, UltrasoundImage): - image_data = volume_3d - image_data.pixel_data = denoise_ceus_wavelet(image_data.pixel_data, wavelet=wavelet, sigma_scale=sigma_scale) - return image_data - - is_2d = volume_3d.ndim == 2 - if is_2d: - volume_3d = volume_3d[:, :, np.newaxis] - - # Get global range for stable 3D denoising - v_min, v_max = volume_3d.min(), volume_3d.max() - v_range = v_max - v_min - - denoised = np.zeros_like(volume_3d, dtype=np.float32) - - for z in range(volume_3d.shape[2]): - slice_2d = volume_3d[:, :, z].astype(np.float32) - - # Normalize to [0, 1] using global volume range - if v_range > 0: - slice_norm = (slice_2d - v_min) / v_range - else: - slice_norm = slice_2d - - # Estimate sigma and apply wavelet denoising - sigma_est = estimate_sigma(slice_norm, average_sigmas=True) - denoised_slice = denoise_wavelet( - slice_norm, - method='BayesShrink', - mode='soft', - wavelet=wavelet, - rescale_sigma=True, - sigma=sigma_est * sigma_scale - ) - - # Scale back to original range - if v_range > 0: - denoised[:, :, z] = denoised_slice * v_range + v_min - else: - denoised[:, :, z] = denoised_slice - - return denoised[:, :, 0] if is_2d else denoised \ No newline at end of file diff --git a/src/ceus/image_preprocessing/options.py b/src/ceus/image_preprocessing/options.py deleted file mode 100644 index 91e5b1e..0000000 --- a/src/ceus/image_preprocessing/options.py +++ /dev/null @@ -1,33 +0,0 @@ -from pathlib import Path - -from argparse import ArgumentParser - -from .functions import * - -def get_im_preproc_funcs() -> dict: - """Get preprocessing functions for the CLI. - - Returns: - dict: Dictionary of preprocessing functions. - """ - functions = {name: obj for name, obj in globals().items() if callable(obj) and obj.__module__ == 'src.ceus.image_preprocessing.functions'} - return functions - -def get_required_im_preproc_kwargs(preproc_func_names: list) -> list: - """Get required kwargs for a given list of preprocessing functions. - - Args: - preproc_func_names (list): list of preprocessing function names to apply. - - Returns: - list: List of required kwargs for the specified preprocessing functions. - """ - preproc_funcs = get_im_preproc_funcs() - required_kwargs = [] - - for func_name in preproc_func_names: - func = preproc_funcs[func_name] - required_kwargs.extend(getattr(func, 'required_kwargs', [])) - - required_kwargs = list(set(required_kwargs)) # Remove duplicates - return required_kwargs diff --git a/src/ceus/image_preprocessing/transforms.py b/src/ceus/image_preprocessing/transforms.py deleted file mode 100644 index 238e272..0000000 --- a/src/ceus/image_preprocessing/transforms.py +++ /dev/null @@ -1,114 +0,0 @@ -from typing import Tuple - -import numpy as np -import SimpleITK as sitk -from tqdm import tqdm - -def resample_to_spacing_2d(image_arr: np.ndarray, original_spacing: Tuple[float, float], - new_spacing: Tuple[float, float], interp='linear') -> sitk.Image: - """Resample to isotropic/anisotropic spacing by recomputing size. - Maintains image FOV; origin/direction preserved. - """ - assert image_arr.ndim in (2, 3, 4), \ - "Image array must be 3D (t, y, x) for grayscale or 4D (t, y, x, c) for RGB." - - if image_arr.ndim == 2: - image_arr = np.expand_dims(image_arr, axis=0) # (1, y, x) - - spacing = list(reversed(original_spacing)) # (y, x) for SimpleITK - new_spacing = list(reversed(new_spacing)) # (y, x) for SimpleITK - - if interp == 'linear': - interpolator = sitk.sitkLinear - elif interp == 'nearest': - interpolator = sitk.sitkNearestNeighbor - elif interp == 'cubic': - interpolator = sitk.sitkBSpline - else: - raise ValueError("Interpolation method must be 'linear', 'nearest', or 'cubic'.") - - resampled_frames = [] - for i in tqdm(range(image_arr.shape[0]), desc="Resampling frames"): - frame = image_arr[i] - - # Handles grayscale (y, x) or RGB (y, x, c) - sitk_frame = sitk.GetImageFromArray(frame, isVector=(frame.ndim == 3)) - sitk_frame.SetSpacing(spacing) - - original_size = np.array(sitk_frame.GetSize(), dtype=int) - new_size = np.round( - original_size * (np.array(sitk_frame.GetSpacing()) / np.array(new_spacing)) - ).astype(int) - - resampler = sitk.ResampleImageFilter() - resampler.SetOutputSpacing(tuple(new_spacing)) - resampler.SetSize([int(x) for x in new_size]) - resampler.SetOutputOrigin(sitk_frame.GetOrigin()) - resampler.SetOutputDirection(sitk_frame.GetDirection()) - resampler.SetTransform(sitk.Transform()) - resampler.SetInterpolator(interpolator) - - out = resampler.Execute(sitk_frame) - out_arr = sitk.GetArrayFromImage(out) - resampled_frames.append(out_arr) - - # Stack into time axis (unless single frame, then keep 2D) - out = np.stack(resampled_frames, axis=0) - if out.shape[0] == 1: - out = out.squeeze(axis=0) # Remove time axis if single frame - return out - -def resample_to_spacing_3d(image_arr: np.ndarray, original_spacing: Tuple[float, float, float], - new_spacing: Tuple[float, float, float], interp='linear') -> sitk.Image: - """Resample to isotropic/anisotropic spacing by recomputing size. - Maintains image FOV; origin/direction preserved. - """ - assert image_arr.ndim in (3, 4), "Image array must be 3D (x, y, z) or 4D (x, y, z, t)." - - affine = np.eye(4) - reversed_dims = list(reversed(original_spacing)) # Ensure spacing is in (z, y, x) order for SimpleITK - for i in range(3): - affine[i, i] = reversed_dims[i] - origin = affine[:3, -1].tolist() - direction_matrix = affine[:3, :3] - spacing = np.linalg.norm(direction_matrix, axis=0).tolist() - direction = (direction_matrix / spacing).flatten().tolist() - - new_spacing = list(reversed(new_spacing)) # Ensure new_spacing is in (z, y, x) order for SimpleITK - - if image_arr.ndim == 3: - image_arr = np.expand_dims(image_arr, axis=-1) - - if interp == 'linear': - interpolator = sitk.sitkLinear - elif interp == 'nearest': - interpolator = sitk.sitkNearestNeighbor - elif interp == 'cubic': - interpolator = sitk.sitkBSpline - else: - raise ValueError("Interpolation method must be one of 'linear', 'nearest', or 'cubic'.") - - resampled_frames = [] - for i in tqdm(range(image_arr.shape[3]), desc="Resampling frames"): - frame = sitk.GetImageFromArray(image_arr[:, :, :, i]) - frame.SetSpacing(spacing) - frame.SetOrigin(origin) - frame.SetDirection(direction) - - original_size = np.array(list(frame.GetSize()), dtype=int) - new_size = np.round(original_size * (np.array(list(frame.GetSpacing())) / np.array(new_spacing))).astype(int) - - resampler = sitk.ResampleImageFilter() - resampler.SetOutputSpacing(tuple(new_spacing)) - resampler.SetSize([int(x) for x in new_size]) - resampler.SetOutputOrigin(frame.GetOrigin()) - resampler.SetOutputDirection(frame.GetDirection()) - resampler.SetTransform(sitk.Transform()) - resampler.SetInterpolator(interpolator) - - out = resampler.Execute(frame) - out = sitk.Cast(out, frame.GetPixelID()) - resampled_frames.append(sitk.GetArrayFromImage(out)) - - out = np.stack(resampled_frames, axis=-1).squeeze() - return out From f63b4bed129631415a315df5bb62d664180a9bbe Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 9 Feb 2026 14:06:51 +0100 Subject: [PATCH 38/61] Refactor: Update DrawVOIWidget to use standardized backend preprocessing on UltrasoundImage objects --- src/ceus/seg_loading/views/draw_voi_widget.py | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 12e028e..420da4a 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -21,7 +21,7 @@ from ..ui.draw_voi_ui import Ui_voi_drawer from engines.ceus.src.data_objs import UltrasoundImage from .spline import calculateSpline3D, calculateSpline -from ...image_preprocessing.functions import enhance_contrast_resolution, denoise_ceus_wavelet +from engines.ceus.src.image_preprocessing.functions import enhance_clahe, enhance_gamma # Philips CEUS Colormap: Grayscale -> Red -> Yellow philips_colors = [ @@ -615,13 +615,18 @@ def _get_plane_slice(self, plane_ix: int): return arr def _enhance_volume(self, volume_3d: np.ndarray) -> np.ndarray: - """Enhance a 3D image volume using predefined enhancement methods.""" - # Enhance Contrast Resolution - enhanced = enhance_contrast_resolution(volume_3d, method='clahe', clip_limit=self._clahe_clip_limit) - enhanced = enhance_contrast_resolution(enhanced, method='gamma', gamma=self._gamma) - # enhanced = denoise_ceus_wavelet(enhanced, wavelet='db1') - - return enhanced + """Enhance a 3D image volume using predefined enhancement methods in the backend engine.""" + # Create a temporary UltrasoundImage for the current frame + temp_im = UltrasoundImage(self._image_data.scan_path) + temp_im.pixel_data = volume_3d + temp_im.pixdim = self._image_data.pixdim + temp_im.frame_rate = self._image_data.frame_rate + + # Apply backend engine functions directly on the UltrasoundImage object + temp_im = enhance_clahe(temp_im, clip_limit=self._clahe_clip_limit) + temp_im = enhance_gamma(temp_im, gamma=self._gamma) + + return temp_im.pixel_data def _get_mask_slice(self, plane_ix: int): """Return RGBA numpy slice for the mask of the given plane index.""" From 43ffb23d769e97f8bdbe157bbef3fad0bb71cbee Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 9 Feb 2026 14:06:58 +0100 Subject: [PATCH 39/61] Chore: Update QUS submodule pointer state --- engines/qus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/qus b/engines/qus index 6790aaf..d5531ed 160000 --- a/engines/qus +++ b/engines/qus @@ -1 +1 @@ -Subproject commit 6790aaf3c546683e753ae931e294485418508253 +Subproject commit d5531ed6f48149931fb83cd33960b273517dd4c8 From dc465fe8d54ebddcc038b158db193845986ba66e Mon Sep 17 00:00:00 2001 From: omid Date: Mon, 9 Feb 2026 14:54:50 +0100 Subject: [PATCH 40/61] Fix frame slider synchronization and frame-based display in CEUS GUI --- src/ceus/seg_loading/views/draw_voi_widget.py | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 420da4a..9797fe9 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -196,6 +196,8 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None self._connect_signals() self._connect_matplotlib_events() self.setFocusPolicy(Qt.FocusPolicy.StrongFocus) + self._update_scan_display() # Initial UI update + self._refresh_frames() # Mark all planes for first update # ======================= Matplotlib Mouse Interaction =================== def _connect_matplotlib_events(self): @@ -325,6 +327,7 @@ def _setup_ui(self) -> None: self._ui.scan_name_input.setText(self._image_data.scan_name) self._ui.toggle_crosshair_visibility_button.setText('Hide Crosshair') + self._ui.cur_slice_label.setText("Current Frame:") self._ui.interp_loading_label.hide(); self._ui.saving_voi_label.hide() self._ui.navigating_label.hide(); self._ui.undo_last_roi_button.hide() @@ -685,9 +688,6 @@ def _update(_frame): if scatter: artists.append(scatter) if mask: artists.append(mask) - # Only update frame counters occasionally or when pending refreshed - if self._ax_sag_cor_pending[plane_ix]: - self._update_scan_display() return artists self._ax_sag_cor_animations[plane_ix] = anim.FuncAnimation( @@ -745,6 +745,7 @@ def set_crosshair(self, x: Optional[int] = None, y: Optional[int] = None, if [cx, cy, cz, ct] != self._crosshair_xyzt: self._crosshair_xyzt = [cx, cy, cz, ct] self._refresh_frames() + self._update_scan_display() return cx, cy, cz, ct def _update_seg_masks(self, plane_ix): @@ -806,11 +807,35 @@ def _connect_signals(self) -> None: self._ui.toggle_crosshair_visibility_button.clicked.connect(self._on_toggle_crosshair_visibility) self._ui.save_voi_button.clicked.connect(self._on_save_voi_clicked) + # Configure slice/time controls self._ui.cur_slice_slider.setMinimum(0) self._ui.cur_slice_slider.setMaximum(max(0, self._num_slices - 1)) self._ui.cur_slice_slider.setValue(self._crosshair_xyzt[3]) self._ui.cur_slice_slider.valueChanged.connect(self._on_time_slider_changed) + # Configure spin box for frame-based navigation + self._ui.cur_slice_spin_box.setRange(1, self._num_slices) + self._ui.cur_slice_spin_box.setSingleStep(1) + self._ui.cur_slice_spin_box.setDecimals(0) + self._ui.cur_slice_spin_box.setValue(self._crosshair_xyzt[3] + 1) + self._ui.cur_slice_spin_box.valueChanged.connect(self._on_time_spin_box_changed) + + # Set initial total frames for all planes + self._ui.ax_total_frames.setText(str(self._z_len)) + self._ui.sag_total_frames.setText(str(self._x_len)) + self._ui.cor_total_frames.setText(str(self._y_len)) + self._ui.cur_slice_total.setText(str(self._num_slices)) + + def _on_time_spin_box_changed(self, value: float): + """Handle user changing the time spin box.""" + frame_idx = int(value) - 1 + + # Clamp to valid range + frame_idx = max(0, min(self._num_slices - 1, frame_idx)) + + if self._ui.cur_slice_slider.value() != frame_idx: + self._ui.cur_slice_slider.setValue(frame_idx) + def _on_time_slider_changed(self, value: int): # type: ignore """Handle user sliding through time dimension (t).""" # Clamp safety (though slider should enforce) @@ -1018,6 +1043,21 @@ def _update_scan_display(self): self._ui.sag_frame_num.setText(str(self._crosshair_xyzt[0] + 1)) self._ui.cor_frame_num.setText(str(self._crosshair_xyzt[1] + 1)) + # Update total frame labels + self._ui.ax_total_frames.setText(str(self._z_len)) + self._ui.sag_total_frames.setText(str(self._x_len)) + self._ui.cor_total_frames.setText(str(self._y_len)) + + # Update current slice/frame display + current_t = self._crosshair_xyzt[3] + + # Block signals to avoid feedback loop + self._ui.cur_slice_spin_box.blockSignals(True) + self._ui.cur_slice_spin_box.setValue(current_t + 1) + self._ui.cur_slice_spin_box.blockSignals(False) + + self._ui.cur_slice_total.setText(str(self._num_slices)) + def mousePressEvent(self, a0): super().mousePressEvent(a0) self._crosshair_active = not self._crosshair_active From 7625585baec0402478b27084d5179f315a0a81d0 Mon Sep 17 00:00:00 2001 From: omid Date: Thu, 12 Feb 2026 12:24:26 +0100 Subject: [PATCH 41/61] Add compact enhancement controls and pseudo-colouring to CEUS ROI drawing view --- src/ceus/seg_loading/views/draw_roi_widget.py | 151 ++++++++++++++---- 1 file changed, 121 insertions(+), 30 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_roi_widget.py b/src/ceus/seg_loading/views/draw_roi_widget.py index f72738f..6ae71a3 100644 --- a/src/ceus/seg_loading/views/draw_roi_widget.py +++ b/src/ceus/seg_loading/views/draw_roi_widget.py @@ -11,13 +11,24 @@ from scipy import interpolate from PIL import Image, ImageDraw from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas +from matplotlib.colors import LinearSegmentedColormap -from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog +from PyQt6.QtWidgets import QWidget, QHBoxLayout, QFileDialog, QSlider, QVBoxLayout, QFrame, QCheckBox, QLabel from PyQt6.QtCore import pyqtSignal, Qt from ...mvc.base_view import BaseViewMixin from ..ui.draw_roi_ui import Ui_constructRoi from engines.ceus.src.data_objs import UltrasoundImage +from engines.ceus.src.image_preprocessing.functions import enhance_clahe, enhance_gamma + +# Philips CEUS Colormap: Grayscale -> Red -> Yellow +philips_colors = [ + (0.0, 0.0, 0.0), # 0% - Black + (0.4, 0.4, 0.4), # 40% - Gray + (0.8, 0.0, 0.0), # 80% - Red + (1.0, 1.0, 0.0) # 100% - Yellow +] +philips_cmap = LinearSegmentedColormap.from_list("philips_ceus", philips_colors) class DrawROIWidget(QWidget, BaseViewMixin): @@ -59,8 +70,18 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None self._target_frame = 0 # Target frame for smooth transitions self._frame_update_pending = False + # Enhancement parameters + self._clahe_clip_limit = 1.2 + self._gamma = 1.5 self._width_scale = 1.0 + # 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._enhanced_cache_idx = -1 + self._setup_ui() self._connect_signals() self._show_draw_type_selection() @@ -256,52 +277,112 @@ def _update_aspect_ratio(self) -> None: self._matplotlib_canvas.draw_idle() def _setup_enhancement_controls(self) -> None: - """Add enhancement sliders to the sidebar.""" - from PyQt6.QtWidgets import QVBoxLayout, QLabel, QSlider, QFrame - + """Add enhancement sliders beside the frame slider in a single horizontal line.""" + # Container frame for enhancement controls enh_group = QFrame() enh_group.setStyleSheet("background-color: rgba(255, 255, 255, 0); border: none;") - container_layout = QVBoxLayout(enh_group) - container_layout.setContentsMargins(0, 10, 0, 10) + + # Main horizontal layout for the enhancement section + container_layout = QHBoxLayout(enh_group) + container_layout.setContentsMargins(0, 0, 15, 0) container_layout.setSpacing(15) - def create_enh_column(label_text, min_val, max_val, current_val, callback): - col_widget = QWidget() - col_layout = QVBoxLayout(col_widget) - col_layout.setContentsMargins(0, 0, 0, 0) - col_layout.setSpacing(5) + def create_compact_control(label_text, min_val, max_val, current_val, callback): + # Widget to hold label, slider, and value in ONE line + ctrl_widget = QWidget() + ctrl_layout = QHBoxLayout(ctrl_widget) + ctrl_layout.setContentsMargins(0, 0, 0, 0) + ctrl_layout.setSpacing(5) lbl = QLabel(label_text) - lbl.setStyleSheet("font-size: 14px; color: white; font-weight: bold;") - lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) - col_layout.addWidget(lbl) + lbl.setStyleSheet("font-size: 10px; color: white; font-weight: bold;") + ctrl_layout.addWidget(lbl) - row_layout = QHBoxLayout() + # Slider slider = QSlider(Qt.Orientation.Horizontal) slider.setRange(min_val, max_val) slider.setValue(current_val) - slider.setMinimumWidth(100) - slider.setMaximumWidth(120) + slider.setStyleSheet(self._ui.frame_slider.styleSheet()) + slider.setFixedWidth(70) + slider.setFixedHeight(12) slider.valueChanged.connect(callback) - + ctrl_layout.addWidget(slider) + val_lbl = QLabel(f"{current_val/10.0:.1f}") - val_lbl.setMinimumWidth(40) - val_lbl.setStyleSheet("color: #3498db; font-weight: bold; font-size: 14px;") + val_lbl.setStyleSheet("color: #3498db; font-weight: bold; font-size: 10px;") + val_lbl.setMinimumWidth(22) + val_lbl.setAlignment(Qt.AlignmentFlag.AlignLeft) + ctrl_layout.addWidget(val_lbl) - row_layout.addWidget(slider) - row_layout.addWidget(val_lbl) - col_layout.addLayout(row_layout) - - return col_widget, slider, val_lbl + return ctrl_widget, slider, val_lbl - width_col, self.width_slider, self.width_val_lbl = create_enh_column( + # Create controls + clahe_w, self.clahe_slider, self.clahe_val_lbl = create_compact_control( + "CLAHE", 1, 100, int(self._clahe_clip_limit * 10), self._on_clahe_changed + ) + gamma_w, self.gamma_slider, self.gamma_val_lbl = create_compact_control( + "GAMMA", 1, 40, int(self._gamma * 10), self._on_gamma_changed + ) + width_w, self.width_slider, self.width_val_lbl = create_compact_control( "WIDTH", 1, 50, int(self._width_scale * 10), self._on_width_changed ) - container_layout.addWidget(width_col) + # Pseudo colouring toggle nicely aligned + self.philips_check = QCheckBox("Pseudo colouring") + self.philips_check.setStyleSheet("color: white; font-weight: bold; font-size: 11px;") + self.philips_check.stateChanged.connect(self._on_philips_toggled) + + # Add to horizontal layout + container_layout.addWidget(clahe_w) + container_layout.addWidget(gamma_w) + container_layout.addWidget(width_w) + container_layout.addWidget(self.philips_check) + + # Add to the layout beside the frame slider (below the image) + self._ui.frameControlsLayout.insertWidget(0, enh_group) + + def _on_clahe_changed(self, value: int) -> None: + """Handle CLAHE clip limit change.""" + self._clahe_clip_limit = value / 10.0 + if hasattr(self, 'clahe_val_lbl'): + self.clahe_val_lbl.setText(f"{self._clahe_clip_limit:.1f}") + self._invalidate_enhancement_cache() + + def _on_gamma_changed(self, value: int) -> None: + """Handle gamma change.""" + self._gamma = value / 10.0 + if hasattr(self, 'gamma_val_lbl'): + self.gamma_val_lbl.setText(f"{self._gamma:.1f}") + self._invalidate_enhancement_cache() + + def _on_philips_toggled(self, state: int) -> None: + """Handle Philips CEUS pseudocolor toggle.""" + self._use_philips_ceus = state == Qt.CheckState.Checked.value + # Update colormap on artist + if self._im_artist: + new_cmap = philips_cmap if self._use_philips_ceus else 'gray' + self._im_artist.set_cmap(new_cmap) + self._matplotlib_canvas.draw_idle() - # Add to the layout below the frame slider - self._ui.side_bar_layout.addWidget(enh_group) + def _invalidate_enhancement_cache(self) -> None: + """Invalidate the enhancement cache and trigger display update.""" + self._enhanced_cache = None + self._enhanced_cache_idx = -1 + self._force_frame_update() + + def _enhance_frame(self, frame_2d: np.ndarray) -> np.ndarray: + """Enhance a 2D image frame using backend engine functions.""" + # Create a temporary UltrasoundImage for processing + temp_im = UltrasoundImage(self._image_data.scan_path) + temp_im.pixel_data = frame_2d + temp_im.pixdim = self._image_data.pixdim + temp_im.frame_rate = self._image_data.frame_rate + + # Apply enhancements + temp_im = enhance_clahe(temp_im, clip_limit=self._clahe_clip_limit) + temp_im = enhance_gamma(temp_im, gamma=self._gamma) + + return temp_im.pixel_data def _on_frame_changed(self, value: int) -> None: """Handle frame slider change with optimized performance.""" @@ -312,8 +393,18 @@ def _on_frame_changed(self, value: int) -> None: def _update_frame_display(self, frame_index: int) -> None: """Update the frame display with consistent parameters.""" if self._im_artist: - self._displayed_im = self._all_frames[frame_index] + # Update cache if needed + if self._enhanced_cache is None or self._enhanced_cache_idx != frame_index: + self._enhanced_cache = self._enhance_frame(self._all_frames[frame_index]) + self._enhanced_cache_idx = frame_index + + self._displayed_im = self._enhanced_cache self._im_artist.set_array(self._displayed_im) + + # Ensure correct colormap is applied (e.g. after initialization) + new_cmap = philips_cmap if self._use_philips_ceus else 'gray' + self._im_artist.set_cmap(new_cmap) + self._ui.cur_frame_label.setText(str(np.round(frame_index*self._image_data.frame_rate, decimals=2))) def _force_frame_update(self) -> None: From bd67285b86604a4a33a84d8ecbfc7fac6650ab22 Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 13 Feb 2026 11:05:46 +0100 Subject: [PATCH 42/61] Update gitignore to include generated UI files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5bf1196..a1aa127 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ fixed_wheels/ .vscode/ .DS_Store *.so +*.ui /**/*_ui.py Visualization_Results/ From a99fe963c399cf499b9f42ad47af7d46cfbcd5af Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 13 Feb 2026 11:14:49 +0100 Subject: [PATCH 43/61] fix(ceus): resolve freeze after loading NIfTI segmentation by connecting signal and implementing preview transition --- src/ceus/seg_loading/seg_loading_controller.py | 10 +++++----- .../seg_loading/seg_loading_view_coordinator.py | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/ceus/seg_loading/seg_loading_controller.py b/src/ceus/seg_loading/seg_loading_controller.py index 5e02d69..d8caf7c 100644 --- a/src/ceus/seg_loading/seg_loading_controller.py +++ b/src/ceus/seg_loading/seg_loading_controller.py @@ -35,15 +35,15 @@ def __init__(self, model: Optional[ApplicationModel] = None, custom_view=None): super().__init__(model, view) - # # Connect to model signals for automatic view updates - # self._connect_model_signals() + # Connect to model signals for automatic view updates + self._connect_model_signals() # Initialize view with segmentation loaders self._initialize_view() - # def _connect_model_signals(self) -> None: - # """Connect to model signals for automatic view updates.""" - # self.model.segmentation_loaded.connect(self.view.show_segmentation_preview) + def _connect_model_signals(self) -> None: + """Connect to model signals for automatic view updates.""" + self.model.segmentation_loaded.connect(self.view.show_segmentation_preview) def _initialize_view(self) -> None: """Initialize the view with data from the model.""" diff --git a/src/ceus/seg_loading/seg_loading_view_coordinator.py b/src/ceus/seg_loading/seg_loading_view_coordinator.py index 4b4ae36..19c3183 100644 --- a/src/ceus/seg_loading/seg_loading_view_coordinator.py +++ b/src/ceus/seg_loading/seg_loading_view_coordinator.py @@ -200,6 +200,21 @@ def show_roi_drawing(self) -> None: self.addWidget(self._roi_drawing_widget) self.setCurrentWidget(self._roi_drawing_widget) + def show_segmentation_preview(self, seg_data: CeusSeg) -> None: + """ + Show the segmentation preview widget. + + Args: + seg_data: Loaded segmentation data + """ + self._seg_data = seg_data + + # For now, since CEUS specific preview widgets are not yet implemented, + # we automatically confirm the segmentation to allow the workflow to continue. + # This prevents the application from getting "stuck" after loading. + print(f"DEBUG: Segmentation loaded, automatically confirming (Preview not yet implemented for CEUS)") + self.user_action.emit('segmentation_confirmed', seg_data) + # ============================================================================ # USER ACTION HANDLING - Process user interactions and communicate with controller # ============================================================================ From d3e6f9f1b0336092dd4df0cf047beb28858f5fa4 Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 13 Feb 2026 12:03:05 +0100 Subject: [PATCH 44/61] feat(ceus): connect analysis screen to application workflow --- src/ceus/application_controller.py | 74 ++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/src/ceus/application_controller.py b/src/ceus/application_controller.py index 86f6cbf..3456bf1 100644 --- a/src/ceus/application_controller.py +++ b/src/ceus/application_controller.py @@ -12,7 +12,9 @@ from .image_loading.image_loading_view_coordinator import ImageLoadingViewCoordinator from .image_loading.image_loading_controller import ImageLoadingController from .seg_loading.seg_loading_controller import SegmentationLoadingController -from engines.ceus.src.data_objs import UltrasoundImage, CeusSeg +from .analysis_loading.analysis_loading_controller import AnalysisLoadingController +from engines.ceus.src.data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.seg import CeusSeg class ApplicationController(QObject): @@ -37,9 +39,14 @@ def __init__(self, app: QApplication): # Unified application model self._model = ApplicationModel() + # Current data + self._image_data: Optional[UltrasoundImage] = None + self._seg_data: Optional[CeusSeg] = None + # Controllers for different screens (using the same model) self._image_loading_controller: Optional[ImageLoadingController] = None self._segmentation_controller: Optional[SegmentationLoadingController] = None + self._analysis_loading_controller: Optional[AnalysisLoadingController] = None # Setup main widget self._setup_main_widget() @@ -82,6 +89,8 @@ def _initialize_segmentation_loading(self, image_data: UltrasoundImage) -> None: Args: image_data: Loaded image data from previous screen """ + self._image_data = image_data + if self._segmentation_controller: self._cleanup_segmentation_loading() @@ -128,10 +137,58 @@ def _on_segmentation_action(self, action_name: str, action_data) -> None: """ if action_name == 'segmentation_confirmed': self._seg_data = self._segmentation_controller.get_loaded_segmentation() - # TODO: Navigate to analysis screen when implemented - print("Analysis screen coming soon...") - self._app.quit() + + # Use model data as source of truth + image_data = self._model.image_data if self._model.image_data else self._image_data + + self._initialize_analysis_loading(image_data, self._seg_data) + def _initialize_analysis_loading(self, image_data: UltrasoundImage, seg_data: CeusSeg) -> None: + """ + Initialize the analysis loading screen. + + Args: + image_data: Loaded image data + seg_data: Loaded segmentation data + """ + if self._analysis_loading_controller: + self._cleanup_analysis_loading() + + # Create controller with unified model + # Note: CEUS might need a config object, passing None for now if not available + self._analysis_loading_controller = AnalysisLoadingController(self._model, image_data, seg_data, None) + + # Connect signals + self._analysis_loading_controller.view.user_action.connect(self._on_analysis_action) + self._analysis_loading_controller.view.back_requested.connect(self._navigate_to_segmentation_loading) + + # Add to stack and show + self._widget_stack.addWidget(self._analysis_loading_controller.view) + self._widget_stack.setCurrentWidget(self._analysis_loading_controller.view) + + def _on_analysis_action(self, action_name: str, action_data) -> None: + """ + Handle actions from the analysis loading screen. + + Args: + action_name: Name of the action + action_data: Data associated with the action + """ + if action_name == 'analysis_loading_completed': + print("Analysis completed successfully!") + # Future: Navigate to visualization screen + self._app.quit() + + def _navigate_to_segmentation_loading(self) -> None: + """Navigate back to segmentation loading.""" + if self._analysis_loading_controller: + self._cleanup_analysis_loading() + + if self._segmentation_controller: + self._widget_stack.setCurrentWidget(self._segmentation_controller.view) + else: + self._initialize_segmentation_loading(self._image_data) + def _navigate_to_image_loading(self) -> None: """Navigate to image loading screen.""" # Reset image loading controller to initial state @@ -192,6 +249,15 @@ def _cleanup(self) -> None: """Clean up all resources before application exit.""" self._cleanup_image_loading() self._cleanup_segmentation_loading() + self._cleanup_analysis_loading() + + def _cleanup_analysis_loading(self) -> None: + """Clean up analysis loading controller resources.""" + if self._analysis_loading_controller: + self._widget_stack.removeWidget(self._analysis_loading_controller.view) + self._analysis_loading_controller.cleanup() + self._analysis_loading_controller.view.deleteLater() + self._analysis_loading_controller = None @property def image_data(self) -> Optional[UltrasoundImage]: From 3ce6e6c58a192d0c4553c9c33a6e1bd6305568bf Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 13 Feb 2026 12:03:10 +0100 Subject: [PATCH 45/61] fix(ceus): standardize imports and fix NameErrors in analysis widgets --- .../analysis_loading_view_coordinator.py | 30 +++++++++---------- .../views/analysis_execution_widget.py | 21 ++++++------- .../analysis_function_selection_widget.py | 13 ++++---- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/ceus/analysis_loading/analysis_loading_view_coordinator.py b/src/ceus/analysis_loading/analysis_loading_view_coordinator.py index a87ade9..a754541 100644 --- a/src/ceus/analysis_loading/analysis_loading_view_coordinator.py +++ b/src/ceus/analysis_loading/analysis_loading_view_coordinator.py @@ -10,12 +10,13 @@ from PyQt6.QtWidgets import QWidget, QStackedWidget from PyQt6.QtCore import pyqtSignal -from quantus.gui.mvc.base_view import BaseViewMixin +from ..mvc.base_view import BaseViewMixin from .views.analysis_function_selection_widget import AnalysisFunctionSelectionWidget -from quantus.gui.config_loading.views.analysis_params_widget import AnalysisParamsWidget +from .views.analysis_params_widget import AnalysisParamsWidget from .views.analysis_execution_widget import AnalysisExecutionWidget -from quantus.data_objs import UltrasoundRfImage, BmodeSeg, RfAnalysisConfig -from quantus.analysis.paramap.framework import ParamapAnalysis +from engines.ceus.src.data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.seg import CeusSeg +from engines.ceus.src.time_series_analysis.curves.framework import CurvesAnalysis class AnalysisLoadingViewCoordinator(QStackedWidget, BaseViewMixin): @@ -40,7 +41,7 @@ class AnalysisLoadingViewCoordinator(QStackedWidget, BaseViewMixin): # ============================================================================ - def __init__(self, image_data: UltrasoundRfImage, seg_data: BmodeSeg, config_data: RfAnalysisConfig, parent: Optional[QWidget] = None): + def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, config_data, parent: Optional[QWidget] = None): super().__init__(parent) self.__init_base_view__(parent) self._image_data = image_data @@ -48,11 +49,6 @@ def __init__(self, image_data: UltrasoundRfImage, seg_data: BmodeSeg, config_dat self._config_data = config_data print(f"DEBUG: AnalysisLoadingViewCoordinator - image_data = {image_data is not None}") - if image_data is not None: - print(f"DEBUG: AnalysisLoadingViewCoordinator - scan_name = {image_data.scan_name}") - print(f"DEBUG: AnalysisLoadingViewCoordinator - phantom_name = {image_data.phantom_name}") - else: - print(f"DEBUG: AnalysisLoadingViewCoordinator - image_data is None!") # Widget instances self._function_selection_widget: Optional[AnalysisFunctionSelectionWidget] = None @@ -63,7 +59,7 @@ def __init__(self, image_data: UltrasoundRfImage, seg_data: BmodeSeg, config_dat self._selected_analysis_type: Optional[str] = None self._selected_functions: List[str] = [] self._analysis_params: dict = {} - self._analysis_data: Optional[ParamapAnalysis] = None + self._analysis_data: Optional[CurvesAnalysis] = None # Note: Analysis type selection is now skipped - Paramap is automatically selected # The controller will call show_function_selection directly @@ -106,12 +102,16 @@ def show_error(self, error_message: str) -> None: error_message: Error message to display """ current_widget: BaseViewMixin = self.currentWidget() - current_widget.show_error(error_message) + if current_widget: + current_widget.show_error(error_message) + else: + print(f"ERROR (no active widget): {error_message}") def clear_error(self) -> None: """Clear error message in the current widget.""" current_widget: BaseViewMixin = self.currentWidget() - current_widget.clear_error() + if current_widget: + current_widget.clear_error() # ============================================================================ # NAVIGATION METHODS - Methods to show different widgets @@ -208,7 +208,7 @@ def show_analysis_execution(self, execution_summary: Dict) -> None: self._execution_widget.clear_error() print(f"DEBUG: show_analysis_execution completed - execution screen should be visible") - def show_analysis_results(self, analysis_data: ParamapAnalysis) -> None: + def show_analysis_results(self, analysis_data: CurvesAnalysis) -> None: """ Show analysis results in the execution widget. @@ -260,7 +260,7 @@ def _on_execution_started(self, execution_data: dict) -> None: self._emit_user_action("analysis_execution_started", execution_data) print(f"DEBUG: user_action signal emitted") - def _on_analysis_confirmed(self, analysis_data: ParamapAnalysis) -> None: + def _on_analysis_confirmed(self, analysis_data: CurvesAnalysis) -> None: """ Handle analysis completion confirmation. diff --git a/src/ceus/analysis_loading/views/analysis_execution_widget.py b/src/ceus/analysis_loading/views/analysis_execution_widget.py index 08d5b76..a302e51 100644 --- a/src/ceus/analysis_loading/views/analysis_execution_widget.py +++ b/src/ceus/analysis_loading/views/analysis_execution_widget.py @@ -10,10 +10,11 @@ from PyQt6.QtCore import pyqtSignal, Qt, QTimer from PyQt6.QtGui import QFont -from quantus.gui.mvc.base_view import BaseViewMixin -from quantus.gui.analysis_loading.ui.analysis_execution_ui import Ui_analysisExecution -from quantus.data_objs import UltrasoundRfImage, BmodeSeg, RfAnalysisConfig -from quantus.analysis.paramap.framework import ParamapAnalysis +from ...mvc.base_view import BaseViewMixin +from ..ui.analysis_execution_ui import Ui_analysisExecution +from engines.ceus.src.data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.seg import CeusSeg +from engines.ceus.src.time_series_analysis.curves.framework import CurvesAnalysis class AnalysisExecutionWidget(QWidget, BaseViewMixin): @@ -26,11 +27,11 @@ class AnalysisExecutionWidget(QWidget, BaseViewMixin): # Signals for communicating with controller execution_started = pyqtSignal(dict) # execution_data - analysis_confirmed = pyqtSignal(object) # analysis_data (ParamapAnalysis) + analysis_confirmed = pyqtSignal(object) # analysis_data (CurvesAnalysis) close_requested = pyqtSignal() back_requested = pyqtSignal() - def __init__(self, image_data: UltrasoundRfImage, seg_data: BmodeSeg, config_data: RfAnalysisConfig, parent: Optional[QWidget] = None): + def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, config_data, parent: Optional[QWidget] = None): QWidget.__init__(self, parent) self.__init_base_view__(parent) self._ui = Ui_analysisExecution() @@ -40,7 +41,7 @@ def __init__(self, image_data: UltrasoundRfImage, seg_data: BmodeSeg, config_dat # Current state self._execution_summary: Dict = {} - self._analysis_data: Optional[ParamapAnalysis] = None + self._analysis_data: Optional[CurvesAnalysis] = None self._is_executing = False self._results_shown = False # Track if results have been shown @@ -78,8 +79,8 @@ def setup_ui(self) -> None: # Update labels to reflect inputted image and phantom if self._image_data is not None: - self._ui.image_path_input.setText(self._image_data.scan_name or "No image loaded") - self._ui.phantom_path_input.setText(self._image_data.phantom_name or "No phantom loaded") + self._ui.image_path_input.setText(getattr(self._image_data, 'scan_name', "No image loaded")) + self._ui.phantom_path_input.setText(getattr(self._image_data, 'phantom_name', "No phantom loaded")) else: self._ui.image_path_input.setText("No image loaded") self._ui.phantom_path_input.setText("No phantom loaded") @@ -219,7 +220,7 @@ def _clear_summary_layout(self) -> None: if child.widget(): child.widget().deleteLater() - def show_results(self, analysis_data: ParamapAnalysis) -> None: + def show_results(self, analysis_data: CurvesAnalysis) -> None: """ Show analysis results. diff --git a/src/ceus/analysis_loading/views/analysis_function_selection_widget.py b/src/ceus/analysis_loading/views/analysis_function_selection_widget.py index f36643d..318544a 100644 --- a/src/ceus/analysis_loading/views/analysis_function_selection_widget.py +++ b/src/ceus/analysis_loading/views/analysis_function_selection_widget.py @@ -9,9 +9,10 @@ from PyQt6.QtWidgets import QWidget, QComboBox, QVBoxLayout, QHBoxLayout, QLabel, QSizePolicy from PyQt6.QtCore import pyqtSignal, Qt -from quantus.gui.mvc.base_view import BaseViewMixin -from quantus.gui.analysis_loading.ui.analysis_function_selection_ui import Ui_analysisFunctionSelection -from quantus.data_objs import UltrasoundRfImage, BmodeSeg, RfAnalysisConfig +from ...mvc.base_view import BaseViewMixin +from ..ui.analysis_function_selection_ui import Ui_analysisFunctionSelection +from engines.ceus.src.data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.seg import CeusSeg class AnalysisFunctionSelectionWidget(QWidget, BaseViewMixin): @@ -27,7 +28,7 @@ class AnalysisFunctionSelectionWidget(QWidget, BaseViewMixin): close_requested = pyqtSignal() back_requested = pyqtSignal() - def __init__(self, image_data: UltrasoundRfImage, seg_data: BmodeSeg, config_data: RfAnalysisConfig, parent: Optional[QWidget] = None): + def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, config_data, parent: Optional[QWidget] = None): QWidget.__init__(self, parent) self.__init_base_view__(parent) self._ui = Ui_analysisFunctionSelection() @@ -56,8 +57,8 @@ def setup_ui(self) -> None: # Update labels to reflect inputted image and phantom if self._image_data is not None: - self._ui.image_path_input.setText(self._image_data.scan_name or "No image loaded") - self._ui.phantom_path_input.setText(self._image_data.phantom_name or "No phantom loaded") + self._ui.image_path_input.setText(getattr(self._image_data, 'scan_name', "No image loaded")) + self._ui.phantom_path_input.setText(getattr(self._image_data, 'phantom_name', "No phantom loaded")) else: self._ui.image_path_input.setText("No image loaded") self._ui.phantom_path_input.setText("No phantom loaded") From 18c6469897b582561685d0e34f47a4c759bc0d1d Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 13 Feb 2026 12:03:15 +0100 Subject: [PATCH 46/61] feat(ceus): implement analysis discovery and background execution --- .../analysis_loading_controller.py | 33 ++-- src/ceus/application_model.py | 153 +++++++++++++++++- 2 files changed, 174 insertions(+), 12 deletions(-) diff --git a/src/ceus/analysis_loading/analysis_loading_controller.py b/src/ceus/analysis_loading/analysis_loading_controller.py index 8ddbc27..cbcac1d 100644 --- a/src/ceus/analysis_loading/analysis_loading_controller.py +++ b/src/ceus/analysis_loading/analysis_loading_controller.py @@ -10,7 +10,8 @@ from ..mvc.base_controller import BaseController from .analysis_loading_view_coordinator import AnalysisLoadingViewCoordinator -from engines.ceus.src.data_objs import UltrasoundImage, CeusSeg +from engines.ceus.src.data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.seg import CeusSeg from engines.ceus.src.time_series_analysis.curves.framework import CurvesAnalysis @@ -64,20 +65,30 @@ def _connect_signals(self) -> None: def _setup_analysis_options(self) -> None: """Setup available analysis types and functions in the view.""" analysis_types, analysis_functions = self._model.get_analysis_types() + print(f"DEBUG: Available analysis types: {list(analysis_types.keys())}") - # Automatically select "Paramap" as the analysis type - paramap_type = "paramap" - if paramap_type in analysis_types: - self._selected_analysis_type = paramap_type - if self._model.set_analysis_type(paramap_type): - # Get available functions for Paramap analysis - available_functions = self._model.get_analysis_functions(paramap_type) + # Automatically select the best available analysis type + # Prefer curves_paramap, then curves, or just the first available one + selected_type = None + for preferred in ["curves_paramap", "curves", "paramap"]: + if preferred in analysis_types: + selected_type = preferred + break + + if not selected_type and analysis_types: + selected_type = list(analysis_types.keys())[0] + + if selected_type: + self._selected_analysis_type = selected_type + if self._model.set_analysis_type(selected_type): + # Get available functions for selected analysis type + available_functions = self._model.get_analysis_functions(selected_type) # Skip analysis type selection and go directly to function selection self._view_coordinator.show_function_selection(available_functions) else: - self._view_coordinator.show_error("Failed to set Paramap analysis type") + self._view_coordinator.show_error(f"Failed to set {selected_type} analysis type") else: - self._view_coordinator.show_error("Paramap analysis type not available") + self._view_coordinator.show_error("No analysis types available") def _on_user_action(self, action_name: str, action_data: Any) -> None: """ @@ -98,7 +109,7 @@ def _on_user_action(self, action_name: str, action_data: Any) -> None: print(f"DEBUG: Controller received analysis_execution_started action") print(f"DEBUG: action_data = {action_data}") self._handle_analysis_execution(action_data) - elif action_name == "analysis_completed": + elif action_name == "analysis_loading_completed": self._handle_analysis_completion(action_data) else: # Forward unknown actions to application controller diff --git a/src/ceus/application_model.py b/src/ceus/application_model.py index 1583dfa..5b5be9a 100644 --- a/src/ceus/application_model.py +++ b/src/ceus/application_model.py @@ -12,8 +12,11 @@ from .mvc.base_model import BaseModel from engines.ceus.src.image_loading.options import get_scan_loaders from engines.ceus.src.seg_loading.options import get_seg_loaders +from engines.ceus.src.time_series_analysis.options import get_analysis_types from engines.ceus.src.entrypoints import scan_loading_step, seg_loading_step -from engines.ceus.src.data_objs import UltrasoundImage, CeusSeg +from engines.ceus.src.data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.seg import CeusSeg +from engines.ceus.src.time_series_analysis.curves.framework import CurvesAnalysis class ScanLoadingWorker(QThread): @@ -75,6 +78,56 @@ def run(self): self.error_msg.emit(f"Error loading segmentation: {e}") +class AnalysisWorker(QThread): + """Worker thread for time-consuming analysis operations.""" + finished = pyqtSignal(object) + error_msg = pyqtSignal(str) + + def __init__(self, analysis_type: str, image_data: UltrasoundImage, + config_data: Any, seg_data: CeusSeg, + selected_functions: List[str], analysis_kwargs: Dict[str, Any]): + super().__init__() + self.analysis_type = analysis_type + self.image_data = image_data + self.config_data = config_data + self.seg_data = seg_data + self.selected_functions = selected_functions + self.analysis_kwargs = analysis_kwargs + + def run(self): + """Execute the analysis in background thread.""" + try: + from engines.ceus.src.time_series_analysis.options import get_analysis_types + all_types, _ = get_analysis_types() + + if self.analysis_type not in all_types: + self.error_msg.emit(f"Invalid analysis type: {self.analysis_type}") + return + + analysis_cls = all_types[self.analysis_type] + + # Initialize analysis + analysis_obj = analysis_cls( + self.image_data, + self.seg_data, + self.selected_functions, + **self.analysis_kwargs + ) + + # Execute analysis + # Note: For CEUS, execution might happen during init or via a specific method + # In time_series_analysis/curves/framework.py, init does some setup but maybe not full execution + if hasattr(analysis_obj, 'run'): + analysis_obj.run() + + self.finished.emit(analysis_obj) + + except Exception as e: + import traceback + traceback.print_exc() + self.error_msg.emit(f"Error during analysis: {e}") + + class ApplicationModel(BaseModel): """ Unified application model that manages all data and business logic for the QuantUS GUI. @@ -90,6 +143,7 @@ class ApplicationModel(BaseModel): image_loaded = pyqtSignal(UltrasoundImage) preprocessing_complete = pyqtSignal(UltrasoundImage) segmentation_loaded = pyqtSignal(CeusSeg) + analysis_completed = pyqtSignal(object) # Emits CurvesAnalysis def __init__(self): super().__init__() @@ -106,9 +160,17 @@ def __init__(self): self._seg_data: Optional[CeusSeg] = None self._seg_worker: Optional[SegLoadingWorker] = None + # Analysis state + self._analysis_data: Optional[CurvesAnalysis] = None + self._analysis_types: Dict[str, Any] = {} + self._analysis_functions: Dict[str, Any] = {} + self._selected_analysis_type: Optional[str] = None + self._analysis_worker: Optional[AnalysisWorker] = None + # Initialize loaders self._load_scan_loaders() self._load_seg_loaders() + self._load_analysis_types() def _load_scan_loaders(self) -> None: """Load available scan loaders from backend.""" @@ -123,6 +185,15 @@ def _load_seg_loaders(self) -> None: self._seg_loaders = get_seg_loaders() except Exception as e: self._emit_error(f"Failed to load seg loaders: {e}") + + def _load_analysis_types(self) -> None: + """Load available analysis types from backend.""" + try: + self._analysis_types, self._analysis_functions = get_analysis_types() + except Exception as e: + print(f"Error loading analysis types: {e}") + self._analysis_types = {} + self._analysis_functions = {} # Image Loading Properties and Methods @property @@ -555,3 +626,83 @@ def cleanup(self) -> None: self._seg_worker.quit() self._seg_worker.wait() self._seg_worker = None + + # ============================================================================ + # ANALYSIS METHODS + # ============================================================================ + + def get_analysis_types(self) -> tuple: + """Get available analysis types and functions.""" + return self._analysis_types, self._analysis_functions + + def set_analysis_type(self, analysis_type: str) -> bool: + """ + Set the selected analysis type. + + Args: + analysis_type: Analysis type to select + + Returns: + bool: True if successful + """ + if analysis_type in self._analysis_types: + self._selected_analysis_type = analysis_type + return True + else: + print(f"DEBUG: Invalid analysis type: {analysis_type}") + return False + + def get_analysis_functions(self, analysis_type: str) -> dict: + """ + Get available functions for an analysis type. + + Args: + analysis_type: Analysis type + + Returns: + dict: Available functions for the analysis type + """ + # In CEUS engine, analysis_functions is a flat dict of all available curve functions + # that are applicable to both 'curves' and 'curves_paramap' analysis types. + if analysis_type in self._analysis_functions and isinstance(self._analysis_functions[analysis_type], dict): + return self._analysis_functions[analysis_type] + + return self._analysis_functions + + def set_analysis_data(self, analysis_data: CurvesAnalysis) -> None: + """ + Store completed analysis data. + + Args: + analysis_data: Completed analysis data + """ + self._analysis_data = analysis_data + # Signal that analysis is complete + self.analysis_completed.emit(analysis_data) + + def run_analysis(self, analysis_type: str, image_data: UltrasoundImage, + config_data: Any, seg_data: CeusSeg, + selected_functions: List[str], **kwargs) -> None: + """ + Run the analysis in a background thread. + """ + # Stop existing worker if running + if self._analysis_worker and self._analysis_worker.isRunning(): + self._analysis_worker.quit() + self._analysis_worker.wait() + + self._analysis_worker = AnalysisWorker( + analysis_type, image_data, config_data, seg_data, selected_functions, kwargs + ) + + self._analysis_worker.finished.connect(self._on_analysis_worker_finished) + self._analysis_worker.error_msg.connect(self._emit_error) + + self._set_loading(True) + self._analysis_worker.start() + + def _on_analysis_worker_finished(self, analysis_obj: Any) -> None: + """Handle analysis completion.""" + self._set_loading(False) + self._analysis_data = analysis_obj + self.analysis_completed.emit(analysis_obj) From 46df59b5d8579d276b78d78d8ae9cfcbf4128d76 Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 13 Feb 2026 12:03:20 +0100 Subject: [PATCH 47/61] feat(ceus): add missing analysis parameters widget --- .../views/analysis_params_widget.py | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/ceus/analysis_loading/views/analysis_params_widget.py diff --git a/src/ceus/analysis_loading/views/analysis_params_widget.py b/src/ceus/analysis_loading/views/analysis_params_widget.py new file mode 100644 index 0000000..aea4c51 --- /dev/null +++ b/src/ceus/analysis_loading/views/analysis_params_widget.py @@ -0,0 +1,92 @@ +""" +Analysis Parameters Widget for Analysis Loading + +This widget allows users to configure parameters required for the selected analysis functions. +It dynamically creates input fields based on the required parameters. +""" + +from typing import List, Optional, Dict, Any +from PyQt6.QtWidgets import (QWidget, QLabel, QLineEdit, QDoubleSpinBox, QSpinBox, + QCheckBox, QComboBox, QFormLayout, + QGroupBox, QTextEdit) +from PyQt6.QtCore import pyqtSignal, Qt, QTimer + +from ...mvc.base_view import BaseViewMixin +from ..ui.analysis_params_ui import Ui_analysisParams +from engines.ceus.src.data_objs.image import UltrasoundImage +from engines.ceus.src.data_objs.seg import CeusSeg + + +class AnalysisParamsWidget(QWidget, BaseViewMixin): + """ + Widget for configuring analysis parameters. + + This widget dynamically creates input fields based on the required parameters + for the selected analysis functions. + """ + + # Signals for communicating with controller + params_configured = pyqtSignal(dict) # analysis_params + close_requested = pyqtSignal() + back_requested = pyqtSignal() + + def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, config_data, parent: Optional[QWidget] = None): + QWidget.__init__(self, parent) + self.__init_base_view__(parent) + self._ui = Ui_analysisParams() + self._image_data = image_data + self._seg_data = seg_data + self._config_data = config_data + + # Track parameter inputs + self._param_inputs: Dict[str, QWidget] = {} + self._required_params: List[str] = [] + self._selected_functions: List[str] = [] + + def setup_ui(self) -> None: + """Setup the user interface.""" + self._ui.setupUi(self) + + # Configure layout for parameters configuration (assuming similar structure to QUS) + if hasattr(self._ui, 'full_screen_layout'): + self.setLayout(self._ui.full_screen_layout) + + # Update labels to reflect inputted image + if hasattr(self._ui, 'image_path_input') and self._image_data: + scan_name = getattr(self._image_data, 'scan_name', 'Unknown') + self._ui.image_path_input.setText(scan_name) + + def connect_signals(self) -> None: + """Connect UI signals to internal handlers.""" + if hasattr(self._ui, 'run_analysis_button'): + self._ui.run_analysis_button.clicked.connect(self._on_run_analysis_clicked) + if hasattr(self._ui, 'back_button'): + self._ui.back_button.clicked.connect(self._on_back_clicked) + + def set_required_params(self, required_params: List[str], selected_functions: List[str]) -> None: + """ + Set required parameters and create input fields. + + Args: + required_params: List of required parameter names + selected_functions: List of selected function names + """ + self._required_params = required_params + self._selected_functions = selected_functions + self._create_parameter_inputs() + + 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 + + def _on_run_analysis_clicked(self) -> None: + """Handle run analysis button click.""" + # Collect parameters (simplified) + params = {} + self.params_configured.emit(params) + + def _on_back_clicked(self) -> None: + """Handle back button click.""" + self.back_requested.emit() From 984fb3951bcecd94b93268faeb3f6c998901d95e Mon Sep 17 00:00:00 2001 From: omid Date: Wed, 18 Feb 2026 10:28:25 +0100 Subject: [PATCH 48/61] fix: update .gitignore to include UI files and add missing .ui and _ui.py files --- .gitignore | 2 - .../ui/analysis_execution_ui.py | 295 ++++++ .../ui/analysis_function_selection_ui.py | 274 ++++++ .../analysis_loading/ui/analysis_params.ui | 688 +++++++++++++ .../analysis_loading/ui/analysis_params_ui.py | 292 ++++++ .../image_loading/ui/file_selection_ui.py | 339 +++++++ src/ceus/image_loading/ui/scan_type_ui.py | 235 +++++ src/ceus/seg_loading/ui/draw_roi_ui.py | 571 +++++++++++ src/ceus/seg_loading/ui/draw_voi_ui.py | 861 ++++++++++++++++ .../seg_loading/ui/seg_file_selection_ui.py | 348 +++++++ .../seg_loading/ui/seg_type_selection_ui.py | 257 +++++ .../ui/analysis_function_selection_ui.py | 270 ++++++ .../analysis_loading/ui/analysis_params_ui.py | 302 ++++++ .../ui/config_file_selection_ui.py | 347 +++++++ .../config_loading/ui/config_preview_ui.py | 684 +++++++++++++ .../ui/config_type_selection_ui.py | 279 ++++++ src/qus/config_loading/ui/custom_params_ui.py | 352 +++++++ .../export_loading/ui/export_loading_ui.py | 273 ++++++ src/qus/image_loading/ui/file_selection_ui.py | 411 ++++++++ src/qus/image_loading/ui/scan_type_ui.py | 247 +++++ src/qus/seg_loading/ui/frame_selection_ui.py | 326 +++++++ src/qus/seg_loading/ui/roi_drawing_ui.py | 916 ++++++++++++++++++ src/qus/seg_loading/ui/roi_preview_ui.py | 339 +++++++ .../seg_loading/ui/seg_file_selection_ui.py | 371 +++++++ .../seg_loading/ui/seg_type_selection_ui.py | 280 ++++++ src/qus/seg_loading/ui/voi_drawing_ui.py | 883 +++++++++++++++++ src/qus/seg_loading/ui/voi_preview_ui.py | 684 +++++++++++++ .../ui/visualization_function_selection_ui.py | 346 +++++++ .../ui/visualization_preview_2d_ui.py | 298 ++++++ 29 files changed, 11768 insertions(+), 2 deletions(-) create mode 100644 src/ceus/analysis_loading/ui/analysis_execution_ui.py create mode 100644 src/ceus/analysis_loading/ui/analysis_function_selection_ui.py create mode 100644 src/ceus/analysis_loading/ui/analysis_params.ui create mode 100644 src/ceus/analysis_loading/ui/analysis_params_ui.py create mode 100644 src/ceus/image_loading/ui/file_selection_ui.py create mode 100644 src/ceus/image_loading/ui/scan_type_ui.py create mode 100644 src/ceus/seg_loading/ui/draw_roi_ui.py create mode 100644 src/ceus/seg_loading/ui/draw_voi_ui.py create mode 100644 src/ceus/seg_loading/ui/seg_file_selection_ui.py create mode 100644 src/ceus/seg_loading/ui/seg_type_selection_ui.py create mode 100644 src/qus/analysis_loading/ui/analysis_function_selection_ui.py create mode 100644 src/qus/analysis_loading/ui/analysis_params_ui.py create mode 100644 src/qus/config_loading/ui/config_file_selection_ui.py create mode 100644 src/qus/config_loading/ui/config_preview_ui.py create mode 100644 src/qus/config_loading/ui/config_type_selection_ui.py create mode 100644 src/qus/config_loading/ui/custom_params_ui.py create mode 100644 src/qus/export_loading/ui/export_loading_ui.py create mode 100644 src/qus/image_loading/ui/file_selection_ui.py create mode 100644 src/qus/image_loading/ui/scan_type_ui.py create mode 100644 src/qus/seg_loading/ui/frame_selection_ui.py create mode 100644 src/qus/seg_loading/ui/roi_drawing_ui.py create mode 100644 src/qus/seg_loading/ui/roi_preview_ui.py create mode 100644 src/qus/seg_loading/ui/seg_file_selection_ui.py create mode 100644 src/qus/seg_loading/ui/seg_type_selection_ui.py create mode 100644 src/qus/seg_loading/ui/voi_drawing_ui.py create mode 100644 src/qus/seg_loading/ui/voi_preview_ui.py create mode 100644 src/qus/visualization_loading/ui/visualization_function_selection_ui.py create mode 100644 src/qus/visualization_loading/ui/visualization_preview_2d_ui.py diff --git a/.gitignore b/.gitignore index a1aa127..b269498 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,4 @@ fixed_wheels/ .vscode/ .DS_Store *.so -*.ui -/**/*_ui.py Visualization_Results/ diff --git a/src/ceus/analysis_loading/ui/analysis_execution_ui.py b/src/ceus/analysis_loading/ui/analysis_execution_ui.py new file mode 100644 index 0000000..02e2b23 --- /dev/null +++ b/src/ceus/analysis_loading/ui/analysis_execution_ui.py @@ -0,0 +1,295 @@ +# Form implementation generated from reading ui file 'src\ceus\analysis_loading\ui\analysis_execution.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_analysisExecution(object): + def setupUi(self, analysisExecution): + analysisExecution.setObjectName("analysisExecution") + analysisExecution.resize(1284, 803) + analysisExecution.setMinimumSize(QtCore.QSize(0, 0)) + analysisExecution.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=analysisExecution) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 951, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(200, 41)) + self.back_button.setMaximumSize(QtCore.QSize(200, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.analysis_execution_layout = QtWidgets.QVBoxLayout() + self.analysis_execution_layout.setContentsMargins(30, -1, 30, -1) + self.analysis_execution_layout.setSpacing(50) + self.analysis_execution_layout.setObjectName("analysis_execution_layout") + self.analysis_execution_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_execution_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_execution_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.analysis_execution_label.setScaledContents(False) + self.analysis_execution_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_execution_label.setWordWrap(True) + self.analysis_execution_label.setObjectName("analysis_execution_label") + self.analysis_execution_layout.addWidget(self.analysis_execution_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.progress_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.progress_label.setStyleSheet("QLabel {\n" +" color: rgb(255, 255, 255);\n" +" font-size: 14px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.progress_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.progress_label.setObjectName("progress_label") + self.analysis_execution_layout.addWidget(self.progress_label) + self.progress_bar = QtWidgets.QProgressBar(parent=self.horizontalLayoutWidget_4) + self.progress_bar.setProperty("value", 0) + self.progress_bar.setObjectName("progress_bar") + self.analysis_execution_layout.addWidget(self.progress_bar) + self.execute_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.execute_button.setMinimumSize(QtCore.QSize(200, 41)) + self.execute_button.setMaximumSize(QtCore.QSize(200, 41)) + self.execute_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(0, 150, 0);\n" +" border-radius: 15px;\n" +"}") + self.execute_button.setObjectName("execute_button") + self.analysis_execution_layout.addWidget(self.execute_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.finish_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.finish_button.setEnabled(False) + self.finish_button.setMinimumSize(QtCore.QSize(200, 41)) + self.finish_button.setMaximumSize(QtCore.QSize(200, 41)) + self.finish_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.finish_button.setObjectName("finish_button") + self.analysis_execution_layout.addWidget(self.finish_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.analysis_execution_layout.addItem(spacerItem2) + self.analysis_execution_layout.setStretch(0, 2) + self.analysis_execution_layout.setStretch(1, 2) + self.analysis_execution_layout.setStretch(2, 2) + self.analysis_execution_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.analysis_execution_layout) + + self.retranslateUi(analysisExecution) + QtCore.QMetaObject.connectSlotsByName(analysisExecution) + + def retranslateUi(self, analysisExecution): + _translate = QtCore.QCoreApplication.translate + analysisExecution.setWindowTitle(_translate("analysisExecution", "Analysis Execution")) + self.sidebar.setToolTip(_translate("analysisExecution", "


")) + self.imageSelectionLabelSidebar.setText(_translate("analysisExecution", "Image Selection:")) + self.imageLabel.setText(_translate("analysisExecution", "Image:")) + self.phantomLabel.setText(_translate("analysisExecution", "Phantom:")) + self.image_path_input.setText(_translate("analysisExecution", "Sample filename ")) + self.phantom_path_input.setText(_translate("analysisExecution", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("analysisExecution", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("analysisExecution", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("analysisExecution", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("analysisExecution", "Visualization / Export")) + self.back_button.setText(_translate("analysisExecution", "Back")) + self.analysis_execution_label.setText(_translate("analysisExecution", "Analysis in Progress...")) + self.progress_label.setText(_translate("analysisExecution", "Ready to execute analysis")) + self.execute_button.setText(_translate("analysisExecution", "Execute Analysis")) + self.finish_button.setText(_translate("analysisExecution", "Finish")) diff --git a/src/ceus/analysis_loading/ui/analysis_function_selection_ui.py b/src/ceus/analysis_loading/ui/analysis_function_selection_ui.py new file mode 100644 index 0000000..94106ba --- /dev/null +++ b/src/ceus/analysis_loading/ui/analysis_function_selection_ui.py @@ -0,0 +1,274 @@ +# Form implementation generated from reading ui file 'src\ceus\analysis_loading\ui\analysis_function_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_analysisFunctionSelection(object): + def setupUi(self, analysisFunctionSelection): + analysisFunctionSelection.setObjectName("analysisFunctionSelection") + analysisFunctionSelection.resize(1284, 803) + analysisFunctionSelection.setMinimumSize(QtCore.QSize(0, 0)) + analysisFunctionSelection.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=analysisFunctionSelection) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 951, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.analysis_function_layout = QtWidgets.QVBoxLayout() + self.analysis_function_layout.setContentsMargins(30, -1, 30, -1) + self.analysis_function_layout.setSpacing(20) + self.analysis_function_layout.setObjectName("analysis_function_layout") + self.analysis_function_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_function_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_function_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.analysis_function_label.setScaledContents(False) + self.analysis_function_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_function_label.setWordWrap(True) + self.analysis_function_label.setObjectName("analysis_function_label") + self.analysis_function_layout.addWidget(self.analysis_function_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.functions_content = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.functions_content.setGeometry(QtCore.QRect(0, 0, 69, 69)) + self.functions_content.setObjectName("functions_content") + self.functions_layout = QtWidgets.QVBoxLayout(self.functions_content) + self.functions_layout.setObjectName("functions_layout") + self.analysis_function_layout.addWidget(self.functions_content) + self.next_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.next_button.setMinimumSize(QtCore.QSize(131, 41)) + self.next_button.setMaximumSize(QtCore.QSize(131, 41)) + self.next_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.next_button.setObjectName("next_button") + self.analysis_function_layout.addWidget(self.next_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.analysis_function_layout.addItem(spacerItem2) + self.analysis_function_layout.setStretch(0, 2) + self.analysis_function_layout.setStretch(1, 2) + self.analysis_function_layout.setStretch(2, 2) + self.analysis_function_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.analysis_function_layout) + + self.retranslateUi(analysisFunctionSelection) + QtCore.QMetaObject.connectSlotsByName(analysisFunctionSelection) + + def retranslateUi(self, analysisFunctionSelection): + _translate = QtCore.QCoreApplication.translate + analysisFunctionSelection.setWindowTitle(_translate("analysisFunctionSelection", "Analysis Function Selection")) + self.sidebar.setToolTip(_translate("analysisFunctionSelection", "


")) + self.imageSelectionLabelSidebar.setText(_translate("analysisFunctionSelection", "Image Selection:")) + self.imageLabel.setText(_translate("analysisFunctionSelection", "Image:")) + self.phantomLabel.setText(_translate("analysisFunctionSelection", "Phantom:")) + self.image_path_input.setText(_translate("analysisFunctionSelection", "Sample filename ")) + self.phantom_path_input.setText(_translate("analysisFunctionSelection", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("analysisFunctionSelection", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("analysisFunctionSelection", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("analysisFunctionSelection", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("analysisFunctionSelection", "Visualization / Export")) + self.back_button.setText(_translate("analysisFunctionSelection", "Back")) + self.analysis_function_label.setText(_translate("analysisFunctionSelection", "Select Analysis Function:")) + self.next_button.setText(_translate("analysisFunctionSelection", "Next")) diff --git a/src/ceus/analysis_loading/ui/analysis_params.ui b/src/ceus/analysis_loading/ui/analysis_params.ui new file mode 100644 index 0000000..c373b58 --- /dev/null +++ b/src/ceus/analysis_loading/ui/analysis_params.ui @@ -0,0 +1,688 @@ + + + analysisParams + + + + 0 + 0 + 1284 + 803 + + + + + 0 + 0 + + + + Analysis Parameters Configuration + + + QWidget { + background: rgb(42, 42, 42); +} + + + + + 60 + 20 + 951 + 731 + + + + + + + 0 + + + QLayout::SizeConstraint::SetMaximumSize + + + + + + 341 + 601 + + + + + 241 + 601 + + + + <html><head/><body><p><br/></p></body></html> + + + QWidget { + background-color: rgb(28, 0, 101); +} + + + + + 0 + 0 + 341 + 121 + + + + + 341 + 121 + + + + + 341 + 121 + + + + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 70 + 0 + 191 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold; +} + + + Image Selection: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -60 + 40 + 191 + 51 + + + + QLabel { + font-size: 16px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold; +} + + + Image: + + + Qt::AlignmentFlag::AlignCenter + + + + + + -50 + 70 + 191 + 51 + + + + QLabel { + font-size: 16px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold +} + + + Phantom: + + + Qt::AlignmentFlag::AlignCenter + + + + + + 100 + 40 + 241 + 51 + + + + QLabel { + font-size: 14px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; +} + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + 100 + 70 + 241 + 51 + + + + QLabel { + font-size: 14px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; +} + + + Sample filename + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + + + + + + + 0 + 120 + 341 + 121 + + + + + 341 + 121 + + + + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 40 + 341 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold; +} + + + Segmentation Selection + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 240 + 341 + 121 + + + + + 341 + 121 + + + + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight:bold; +} + + + Analysis Parameter Selection + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 360 + 341 + 121 + + + + + 341 + 121 + + + + + 341 + 121 + + + + QFrame { + background-color: rgb(99, 0, 174); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 0 + 30 + 341 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold; +} + + + CEUS Analysis + + + Qt::AlignmentFlag::AlignCenter + + + + + + + 0 + 480 + 341 + 121 + + + + + 341 + 121 + + + + + 341 + 121 + + + + QFrame { + background-color: rgb(49, 0, 124); + border: 1px solid black; +} + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 301 + 51 + + + + QLabel { + font-size: 21px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); + border: 0px; + font-weight: bold; +} + + + Visualization / Export + + + Qt::AlignmentFlag::AlignCenter + + + + + + + + + + 341 + 16777215 + + + + QFrame { + background-color: rgb(28, 0, 101); +} + + + + QLayout::SizeConstraint::SetMinAndMaxSize + + + 10 + + + 10 + + + 10 + + + 10 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { + color: white; + font-size: 16px; + background: rgb(90, 37, 255); + border-radius: 15px; +} + + + Back + + + + + + + + + + + + 50 + + + 30 + + + 10 + + + 30 + + + 10 + + + + + QLabel { + font-size: 29px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + Analysis in Progress... + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + QLabel { + font-size: 29px; + color: rgb(255, 255, 255); + background-color: rgba(255, 255, 255, 0); +} + + + Configure Analysis Parameters: + + + Qt::TextFormat::AutoText + + + false + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + true + + + + + 0 + 0 + 409 + 284 + + + + + + + + + + QLabel { + color: rgb(0, 255, 0); + font-size: 20px; + background-color: rgba(255, 255, 255, 0); +} + + + Running Analysis.... + + + Qt::AlignmentFlag::AlignCenter + + + + + + + + 131 + 41 + + + + + 131 + 41 + + + + QPushButton { + color: white; + font-size: 16px; + background: rgb(90, 37, 255); + border-radius: 15px; +} + + + Run Analysis + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + + + diff --git a/src/ceus/analysis_loading/ui/analysis_params_ui.py b/src/ceus/analysis_loading/ui/analysis_params_ui.py new file mode 100644 index 0000000..313a371 --- /dev/null +++ b/src/ceus/analysis_loading/ui/analysis_params_ui.py @@ -0,0 +1,292 @@ +# Form implementation generated from reading ui file 'src\ceus\analysis_loading\ui\analysis_params.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_analysisParams(object): + def setupUi(self, analysisParams): + analysisParams.setObjectName("analysisParams") + analysisParams.resize(1284, 803) + analysisParams.setMinimumSize(QtCore.QSize(0, 0)) + analysisParams.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=analysisParams) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 951, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.analysis_params_layout = QtWidgets.QVBoxLayout() + self.analysis_params_layout.setContentsMargins(30, 10, 30, 10) + self.analysis_params_layout.setSpacing(50) + self.analysis_params_layout.setObjectName("analysis_params_layout") + self.analysis_execution_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_execution_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_execution_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_execution_label.setWordWrap(True) + self.analysis_execution_label.setObjectName("analysis_execution_label") + self.analysis_params_layout.addWidget(self.analysis_execution_label) + self.analysis_params_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_params_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_params_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_params_label.setWordWrap(True) + self.analysis_params_label.setObjectName("analysis_params_label") + self.analysis_params_layout.addWidget(self.analysis_params_label) + self.params_scroll_area = QtWidgets.QScrollArea(parent=self.horizontalLayoutWidget_4) + self.params_scroll_area.setWidgetResizable(True) + self.params_scroll_area.setObjectName("params_scroll_area") + self.params_content = QtWidgets.QWidget() + self.params_content.setGeometry(QtCore.QRect(0, 0, 409, 284)) + self.params_content.setObjectName("params_content") + self.params_layout = QtWidgets.QVBoxLayout(self.params_content) + self.params_layout.setObjectName("params_layout") + self.params_scroll_area.setWidget(self.params_content) + self.analysis_params_layout.addWidget(self.params_scroll_area) + self.analysis_running_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_running_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_running_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_running_label.setObjectName("analysis_running_label") + self.analysis_params_layout.addWidget(self.analysis_running_label) + self.run_analysis_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.run_analysis_button.setMinimumSize(QtCore.QSize(131, 41)) + self.run_analysis_button.setMaximumSize(QtCore.QSize(131, 41)) + self.run_analysis_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.run_analysis_button.setObjectName("run_analysis_button") + self.analysis_params_layout.addWidget(self.run_analysis_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.analysis_params_layout.addItem(spacerItem2) + self.full_screen_layout.addLayout(self.analysis_params_layout) + + self.retranslateUi(analysisParams) + QtCore.QMetaObject.connectSlotsByName(analysisParams) + + def retranslateUi(self, analysisParams): + _translate = QtCore.QCoreApplication.translate + analysisParams.setWindowTitle(_translate("analysisParams", "Analysis Parameters Configuration")) + self.imageSelectionLabelSidebar.setText(_translate("analysisParams", "Image Selection:")) + self.imageLabel.setText(_translate("analysisParams", "Image:")) + self.phantomLabel.setText(_translate("analysisParams", "Phantom:")) + self.image_path_input.setText(_translate("analysisParams", "Sample filename ")) + self.phantom_path_input.setText(_translate("analysisParams", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("analysisParams", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("analysisParams", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("analysisParams", "CEUS Analysis")) + self.exportResultsLabel.setText(_translate("analysisParams", "Visualization / Export")) + self.back_button.setText(_translate("analysisParams", "Back")) + self.analysis_execution_label.setText(_translate("analysisParams", "Analysis in Progress...")) + self.analysis_params_label.setText(_translate("analysisParams", "Configure Analysis Parameters:")) + self.analysis_running_label.setText(_translate("analysisParams", "Running Analysis....")) + self.run_analysis_button.setText(_translate("analysisParams", "Run Analysis")) diff --git a/src/ceus/image_loading/ui/file_selection_ui.py b/src/ceus/image_loading/ui/file_selection_ui.py new file mode 100644 index 0000000..644a7ba --- /dev/null +++ b/src/ceus/image_loading/ui/file_selection_ui.py @@ -0,0 +1,339 @@ +# Form implementation generated from reading ui file 'src\ceus\image_loading\ui\file_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_select_scan_file(object): + def setupUi(self, select_scan_file): + select_scan_file.setObjectName("select_scan_file") + select_scan_file.resize(1418, 1539) + select_scan_file.setMinimumSize(QtCore.QSize(201, 31)) + select_scan_file.setMaximumSize(QtCore.QSize(16777215, 16777215)) + select_scan_file.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget = QtWidgets.QWidget(parent=select_scan_file) + self.horizontalLayoutWidget.setGeometry(QtCore.QRect(70, 10, 1545, 1331)) + self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.scanSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.scanSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.scanSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.scanSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.scanSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.scanSelectionSidebar.setObjectName("scanSelectionSidebar") + self.scanSelectionLabelSidebar = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.scanSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanSelectionLabelSidebar.setObjectName("scanSelectionLabelSidebar") + self.scanLabel = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanLabel.setGeometry(QtCore.QRect(-60, 50, 191, 51)) + self.scanLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanLabel.setObjectName("scanLabel") + self.segSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.segSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segSidebar.setObjectName("segSidebar") + self.segSidebarLabel = QtWidgets.QLabel(parent=self.segSidebar) + self.segSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segSidebarLabel.setObjectName("segSidebarLabel") + self.resultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.resultsSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.resultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.resultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.resultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.resultsSidebar.setObjectName("resultsSidebar") + self.resultsLabel = QtWidgets.QLabel(parent=self.resultsSidebar) + self.resultsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.resultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.resultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.resultsLabel.setObjectName("resultsLabel") + self.visualizationsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.visualizationsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.visualizationsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.visualizationsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.visualizationsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.visualizationsSidebar.setObjectName("visualizationsSidebar") + self.visualizationsLabel = QtWidgets.QLabel(parent=self.visualizationsSidebar) + self.visualizationsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.visualizationsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.visualizationsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.visualizationsLabel.setObjectName("visualizationsLabel") + self.analysisConfigSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisConfigSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisConfigSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisConfigSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisConfigSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisConfigSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisConfigSidebar.setObjectName("analysisConfigSidebar") + self.analysisConfigLabel = QtWidgets.QLabel(parent=self.analysisConfigSidebar) + self.analysisConfigLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisConfigLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisConfigLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisConfigLabel.setObjectName("analysisConfigLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame_2 = QtWidgets.QFrame(parent=self.horizontalLayoutWidget) + self.gridFrame_2.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame_2.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame_2.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame_2.setObjectName("gridFrame_2") + self.backButtonGrid_2 = QtWidgets.QGridLayout(self.gridFrame_2) + self.backButtonGrid_2.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid_2.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid_2.setObjectName("backButtonGrid_2") + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame_2) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid_2.addWidget(self.back_button, 1, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid_2.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid_2.addItem(spacerItem1, 1, 1, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame_2) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.img_selection_layout = QtWidgets.QVBoxLayout() + self.img_selection_layout.setContentsMargins(30, 30, 30, 30) + self.img_selection_layout.setSpacing(20) + self.img_selection_layout.setObjectName("img_selection_layout") + self.select_data_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.select_data_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_data_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_data_label.setScaledContents(False) + self.select_data_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_data_label.setWordWrap(True) + self.select_data_label.setObjectName("select_data_label") + self.img_selection_layout.addWidget(self.select_data_label) + self.chooseImgLayout = QtWidgets.QVBoxLayout() + self.chooseImgLayout.setContentsMargins(20, -1, 20, -1) + self.chooseImgLayout.setObjectName("chooseImgLayout") + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem2) + self.image_path_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.image_path_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.image_path_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.image_path_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.image_path_label.setObjectName("image_path_label") + self.chooseImgLayout.addWidget(self.image_path_label) + self.image_path_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget) + self.image_path_input.setMinimumSize(QtCore.QSize(201, 31)) + self.image_path_input.setMaximumSize(QtCore.QSize(401, 31)) + self.image_path_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.image_path_input.setObjectName("image_path_input") + self.chooseImgLayout.addWidget(self.image_path_input, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.chooseImageButtonsLayout = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout.setSpacing(6) + self.chooseImageButtonsLayout.setObjectName("chooseImageButtonsLayout") + self.choose_image_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.choose_image_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_image_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_image_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_image_path_button.setObjectName("choose_image_path_button") + self.chooseImageButtonsLayout.addWidget(self.choose_image_path_button, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.clear_image_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.clear_image_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_image_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_image_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_image_path_button.setObjectName("clear_image_path_button") + self.chooseImageButtonsLayout.addWidget(self.clear_image_path_button, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.chooseImgLayout.addLayout(self.chooseImageButtonsLayout) + spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem3) + self.img_selection_layout.addLayout(self.chooseImgLayout) + self.loading_options_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.loading_options_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_options_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.loading_options_label.setScaledContents(False) + self.loading_options_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_options_label.setWordWrap(True) + self.loading_options_label.setObjectName("loading_options_label") + self.img_selection_layout.addWidget(self.loading_options_label) + self.loading_options_table = QtWidgets.QTableWidget(parent=self.horizontalLayoutWidget) + self.loading_options_table.setStyleSheet("QTableWidget {\n" +" background: rgb(108, 108, 108);\n" +" color: white;\n" +"}") + self.loading_options_table.setDragEnabled(False) + self.loading_options_table.setRowCount(0) + self.loading_options_table.setColumnCount(0) + self.loading_options_table.setObjectName("loading_options_table") + self.loading_options_table.horizontalHeader().setCascadingSectionResizes(False) + self.img_selection_layout.addWidget(self.loading_options_table) + self.generate_image_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.generate_image_button.setMinimumSize(QtCore.QSize(131, 41)) + self.generate_image_button.setMaximumSize(QtCore.QSize(131, 41)) + self.generate_image_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.generate_image_button.setObjectName("generate_image_button") + self.img_selection_layout.addWidget(self.generate_image_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.loading_screen_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.loading_screen_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_screen_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_screen_label.setObjectName("loading_screen_label") + self.img_selection_layout.addWidget(self.loading_screen_label) + self.select_image_error_msg = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.select_image_error_msg.setStyleSheet("QLabel {\n" +" color: rgb(255, 0, 23);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_image_error_msg.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_image_error_msg.setObjectName("select_image_error_msg") + self.img_selection_layout.addWidget(self.select_image_error_msg) + self.img_selection_layout.setStretch(0, 2) + self.img_selection_layout.setStretch(4, 3) + self.img_selection_layout.setStretch(6, 2) + self.full_screen_layout.addLayout(self.img_selection_layout) + self.full_screen_layout.setStretch(1, 5) + + self.retranslateUi(select_scan_file) + QtCore.QMetaObject.connectSlotsByName(select_scan_file) + + def retranslateUi(self, select_scan_file): + _translate = QtCore.QCoreApplication.translate + select_scan_file.setWindowTitle(_translate("select_scan_file", "Select Ultrasound Image")) + self.sidebar.setToolTip(_translate("select_scan_file", "


")) + self.scanSelectionLabelSidebar.setText(_translate("select_scan_file", "Scan Selection:")) + self.scanLabel.setText(_translate("select_scan_file", "Scan:")) + self.segSidebarLabel.setText(_translate("select_scan_file", "Segmentation Selection")) + self.resultsLabel.setText(_translate("select_scan_file", "Results")) + self.visualizationsLabel.setText(_translate("select_scan_file", "Visualizations")) + self.analysisConfigLabel.setText(_translate("select_scan_file", "Analysis Configuration")) + self.back_button.setText(_translate("select_scan_file", "Back")) + self.select_data_label.setText(_translate("select_scan_file", "Select Files to Generate CEUS Scan:")) + self.image_path_label.setText(_translate("select_scan_file", "Input path to scan file\n" +" (.rf, .rfd, .mat, .bin)")) + self.choose_image_path_button.setText(_translate("select_scan_file", "Choose File")) + self.clear_image_path_button.setText(_translate("select_scan_file", "Clear Path")) + self.loading_options_label.setText(_translate("select_scan_file", "\n" +"Scan Loading Options:")) + self.loading_options_table.setSortingEnabled(False) + self.generate_image_button.setText(_translate("select_scan_file", "Generate Image")) + self.loading_screen_label.setText(_translate("select_scan_file", "LOADING....")) + self.select_image_error_msg.setText(_translate("select_scan_file", "ERROR: At least one dimension of phantom data\n" +"smaller than corresponding dimension\n" +"of image data")) diff --git a/src/ceus/image_loading/ui/scan_type_ui.py b/src/ceus/image_loading/ui/scan_type_ui.py new file mode 100644 index 0000000..3dcf3fd --- /dev/null +++ b/src/ceus/image_loading/ui/scan_type_ui.py @@ -0,0 +1,235 @@ +# Form implementation generated from reading ui file 'src\ceus\image_loading\ui\scan_type.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_select_scan_type(object): + def setupUi(self, select_scan_type): + select_scan_type.setObjectName("select_scan_type") + select_scan_type.resize(1512, 893) + select_scan_type.setMinimumSize(QtCore.QSize(201, 31)) + select_scan_type.setMaximumSize(QtCore.QSize(16777215, 16777215)) + select_scan_type.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget = QtWidgets.QWidget(parent=select_scan_type) + self.horizontalLayoutWidget.setGeometry(QtCore.QRect(70, 10, 1545, 844)) + self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.scanSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.scanSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.scanSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.scanSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.scanSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.scanSelectionSidebar.setObjectName("scanSelectionSidebar") + self.scanSelectionLabelSidebar = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.scanSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanSelectionLabelSidebar.setObjectName("scanSelectionLabelSidebar") + self.scanLabel = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanLabel.setGeometry(QtCore.QRect(-60, 50, 191, 51)) + self.scanLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanLabel.setObjectName("scanLabel") + self.segSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.segSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segSidebar.setObjectName("segSidebar") + self.segSidebarLabel = QtWidgets.QLabel(parent=self.segSidebar) + self.segSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segSidebarLabel.setObjectName("segSidebarLabel") + self.resultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.resultsSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.resultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.resultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.resultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.resultsSidebar.setObjectName("resultsSidebar") + self.resultsLabel = QtWidgets.QLabel(parent=self.resultsSidebar) + self.resultsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.resultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.resultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.resultsLabel.setObjectName("resultsLabel") + self.visualizationsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.visualizationsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.visualizationsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.visualizationsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.visualizationsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.visualizationsSidebar.setObjectName("visualizationsSidebar") + self.visualizationsLabel = QtWidgets.QLabel(parent=self.visualizationsSidebar) + self.visualizationsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.visualizationsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.visualizationsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.visualizationsLabel.setObjectName("visualizationsLabel") + self.analysisConfigSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisConfigSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisConfigSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisConfigSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisConfigSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisConfigSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisConfigSidebar.setObjectName("analysisConfigSidebar") + self.analysisConfigLabel = QtWidgets.QLabel(parent=self.analysisConfigSidebar) + self.analysisConfigLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisConfigLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisConfigLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisConfigLabel.setObjectName("analysisConfigLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget) + self.gridFrame.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.select_type_layout = QtWidgets.QVBoxLayout() + self.select_type_layout.setContentsMargins(30, -1, 30, -1) + self.select_type_layout.setSpacing(50) + self.select_type_layout.setObjectName("select_type_layout") + self.select_type_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.select_type_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_type_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_type_label.setScaledContents(False) + self.select_type_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_type_label.setWordWrap(True) + self.select_type_label.setObjectName("select_type_label") + self.select_type_layout.addWidget(self.select_type_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.scan_type_dropdown = QtWidgets.QComboBox(parent=self.horizontalLayoutWidget) + self.scan_type_dropdown.setMinimumSize(QtCore.QSize(180, 41)) + self.scan_type_dropdown.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setPointSize(16) + self.scan_type_dropdown.setFont(font) + self.scan_type_dropdown.setStyleSheet("QComboBox {\n" +" color: white;\n" +"}") + self.scan_type_dropdown.setObjectName("scan_type_dropdown") + self.select_type_layout.addWidget(self.scan_type_dropdown) + self.accept_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.accept_type_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_type_button.setObjectName("accept_type_button") + self.select_type_layout.addWidget(self.accept_type_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.select_type_layout.addItem(spacerItem1) + self.select_type_layout.setStretch(0, 2) + self.select_type_layout.setStretch(1, 2) + self.select_type_layout.setStretch(2, 2) + self.select_type_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.select_type_layout) + self.full_screen_layout.setStretch(0, 1) + self.full_screen_layout.setStretch(1, 5) + + self.retranslateUi(select_scan_type) + QtCore.QMetaObject.connectSlotsByName(select_scan_type) + + def retranslateUi(self, select_scan_type): + _translate = QtCore.QCoreApplication.translate + select_scan_type.setWindowTitle(_translate("select_scan_type", "Select Ultrasound Scan")) + self.sidebar.setToolTip(_translate("select_scan_type", "


")) + self.scanSelectionLabelSidebar.setText(_translate("select_scan_type", "Scan Selection:")) + self.scanLabel.setText(_translate("select_scan_type", "Scan:")) + self.segSidebarLabel.setText(_translate("select_scan_type", "Segmentation Selection")) + self.resultsLabel.setText(_translate("select_scan_type", "Results")) + self.visualizationsLabel.setText(_translate("select_scan_type", "Visualizations")) + self.analysisConfigLabel.setText(_translate("select_scan_type", "Analysis Configuration")) + self.select_type_label.setText(_translate("select_scan_type", "Select Data Type:")) + self.accept_type_button.setText(_translate("select_scan_type", "Accept")) diff --git a/src/ceus/seg_loading/ui/draw_roi_ui.py b/src/ceus/seg_loading/ui/draw_roi_ui.py new file mode 100644 index 0000000..5725f26 --- /dev/null +++ b/src/ceus/seg_loading/ui/draw_roi_ui.py @@ -0,0 +1,571 @@ +# Form implementation generated from reading ui file 'src\ceus\seg_loading\ui\draw_roi.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_constructRoi(object): + def setupUi(self, constructRoi): + constructRoi.setObjectName("constructRoi") + constructRoi.resize(1422, 725) + constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) + constructRoi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(constructRoi) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.full_screen_layout = QtWidgets.QHBoxLayout() + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=constructRoi) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.scanSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.scanSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.scanSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.scanSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.scanSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.scanSelectionSidebar.setObjectName("scanSelectionSidebar") + self.scanSelectionLabelSidebar = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.scanSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanSelectionLabelSidebar.setObjectName("scanSelectionLabelSidebar") + self.scanLabel = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanLabel.setGeometry(QtCore.QRect(-60, 50, 191, 51)) + self.scanLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanLabel.setObjectName("scanLabel") + self.scan_name_input = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scan_name_input.setGeometry(QtCore.QRect(70, 50, 261, 51)) + self.scan_name_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.scan_name_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.scan_name_input.setObjectName("scan_name_input") + self.segSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segSidebar.setObjectName("segSidebar") + self.segSidebarLabel = QtWidgets.QLabel(parent=self.segSidebar) + self.segSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segSidebarLabel.setObjectName("segSidebarLabel") + self.resultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.resultsSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.resultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.resultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.resultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.resultsSidebar.setObjectName("resultsSidebar") + self.resultsLabel = QtWidgets.QLabel(parent=self.resultsSidebar) + self.resultsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.resultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.resultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.resultsLabel.setObjectName("resultsLabel") + self.visualizationsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.visualizationsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.visualizationsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.visualizationsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.visualizationsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.visualizationsSidebar.setObjectName("visualizationsSidebar") + self.visualizationsLabel = QtWidgets.QLabel(parent=self.visualizationsSidebar) + self.visualizationsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.visualizationsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.visualizationsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.visualizationsLabel.setObjectName("visualizationsLabel") + self.analysisConfigSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisConfigSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisConfigSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisConfigSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisConfigSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisConfigSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisConfigSidebar.setObjectName("analysisConfigSidebar") + self.analysisConfigLabel = QtWidgets.QLabel(parent=self.analysisConfigSidebar) + self.analysisConfigLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisConfigLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisConfigLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisConfigLabel.setObjectName("analysisConfigLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame_2 = QtWidgets.QFrame(parent=constructRoi) + self.gridFrame_2.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame_2.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame_2.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame_2.setObjectName("gridFrame_2") + self.backButtonGrid_3 = QtWidgets.QGridLayout(self.gridFrame_2) + self.backButtonGrid_3.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid_3.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid_3.setObjectName("backButtonGrid_3") + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame_2) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid_3.addWidget(self.back_button, 1, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid_3.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid_3.addItem(spacerItem1, 1, 1, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame_2) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.frame_preview_layout = QtWidgets.QVBoxLayout() + self.frame_preview_layout.setContentsMargins(30, 10, 30, 10) + self.frame_preview_layout.setSpacing(10) + self.frame_preview_layout.setObjectName("frame_preview_layout") + self.select_frame_label = QtWidgets.QLabel(parent=constructRoi) + self.select_frame_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_frame_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_frame_label.setScaledContents(False) + self.select_frame_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_frame_label.setWordWrap(True) + self.select_frame_label.setObjectName("select_frame_label") + self.frame_preview_layout.addWidget(self.select_frame_label) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.back_from_drag_button = QtWidgets.QPushButton(parent=constructRoi) + self.back_from_drag_button.setMinimumSize(QtCore.QSize(241, 41)) + self.back_from_drag_button.setMaximumSize(QtCore.QSize(241, 41)) + self.back_from_drag_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.back_from_drag_button.setCheckable(True) + self.back_from_drag_button.setChecked(False) + self.back_from_drag_button.setObjectName("back_from_drag_button") + self.horizontalLayout_4.addWidget(self.back_from_drag_button) + self.save_drag_button = QtWidgets.QPushButton(parent=constructRoi) + self.save_drag_button.setMinimumSize(QtCore.QSize(241, 41)) + self.save_drag_button.setMaximumSize(QtCore.QSize(241, 41)) + self.save_drag_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.save_drag_button.setCheckable(True) + self.save_drag_button.setChecked(False) + self.save_drag_button.setObjectName("save_drag_button") + self.horizontalLayout_4.addWidget(self.save_drag_button) + self.frame_preview_layout.addLayout(self.horizontalLayout_4) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.draw_pts_type_button = QtWidgets.QPushButton(parent=constructRoi) + self.draw_pts_type_button.setMinimumSize(QtCore.QSize(221, 41)) + self.draw_pts_type_button.setMaximumSize(QtCore.QSize(221, 41)) + self.draw_pts_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_pts_type_button.setCheckable(True) + self.draw_pts_type_button.setChecked(False) + self.draw_pts_type_button.setObjectName("draw_pts_type_button") + self.horizontalLayout.addWidget(self.draw_pts_type_button) + self.draw_freehand_drag_type_button = QtWidgets.QPushButton(parent=constructRoi) + self.draw_freehand_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) + self.draw_freehand_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) + self.draw_freehand_drag_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_freehand_drag_type_button.setCheckable(False) + self.draw_freehand_drag_type_button.setChecked(False) + self.draw_freehand_drag_type_button.setObjectName("draw_freehand_drag_type_button") + self.horizontalLayout.addWidget(self.draw_freehand_drag_type_button) + self.draw_rect_drag_type_button = QtWidgets.QPushButton(parent=constructRoi) + self.draw_rect_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) + self.draw_rect_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) + self.draw_rect_drag_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_rect_drag_type_button.setCheckable(False) + self.draw_rect_drag_type_button.setChecked(False) + self.draw_rect_drag_type_button.setObjectName("draw_rect_drag_type_button") + self.horizontalLayout.addWidget(self.draw_rect_drag_type_button) + self.frame_preview_layout.addLayout(self.horizontalLayout) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.clear_roi_button = QtWidgets.QPushButton(parent=constructRoi) + self.clear_roi_button.setMinimumSize(QtCore.QSize(141, 41)) + self.clear_roi_button.setMaximumSize(QtCore.QSize(141, 41)) + self.clear_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_roi_button.setCheckable(False) + self.clear_roi_button.setObjectName("clear_roi_button") + self.horizontalLayout_3.addWidget(self.clear_roi_button) + self.undo_last_pt_button = QtWidgets.QPushButton(parent=constructRoi) + self.undo_last_pt_button.setMinimumSize(QtCore.QSize(141, 41)) + self.undo_last_pt_button.setMaximumSize(QtCore.QSize(141, 41)) + self.undo_last_pt_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.undo_last_pt_button.setCheckable(False) + self.undo_last_pt_button.setObjectName("undo_last_pt_button") + self.horizontalLayout_3.addWidget(self.undo_last_pt_button) + self.close_roi_button = QtWidgets.QPushButton(parent=constructRoi) + self.close_roi_button.setMinimumSize(QtCore.QSize(141, 41)) + self.close_roi_button.setMaximumSize(QtCore.QSize(141, 41)) + self.close_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.close_roi_button.setCheckable(False) + self.close_roi_button.setObjectName("close_roi_button") + self.horizontalLayout_3.addWidget(self.close_roi_button) + self.back_from_pts_button = QtWidgets.QPushButton(parent=constructRoi) + self.back_from_pts_button.setMinimumSize(QtCore.QSize(141, 41)) + self.back_from_pts_button.setMaximumSize(QtCore.QSize(141, 41)) + self.back_from_pts_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_pts_button.setCheckable(False) + self.back_from_pts_button.setObjectName("back_from_pts_button") + self.horizontalLayout_3.addWidget(self.back_from_pts_button) + self.save_pts_button = QtWidgets.QPushButton(parent=constructRoi) + self.save_pts_button.setMinimumSize(QtCore.QSize(141, 41)) + self.save_pts_button.setMaximumSize(QtCore.QSize(141, 41)) + self.save_pts_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_pts_button.setCheckable(False) + self.save_pts_button.setObjectName("save_pts_button") + self.horizontalLayout_3.addWidget(self.save_pts_button) + self.frame_preview_layout.addLayout(self.horizontalLayout_3) + self.save_roi_layout = QtWidgets.QGridLayout() + self.save_roi_layout.setContentsMargins(-1, -1, -1, 10) + self.save_roi_layout.setSpacing(10) + self.save_roi_layout.setObjectName("save_roi_layout") + self.save_folder_input = QtWidgets.QLineEdit(parent=constructRoi) + self.save_folder_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_folder_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_folder_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_folder_input.setObjectName("save_folder_input") + self.save_roi_layout.addWidget(self.save_folder_input, 0, 1, 1, 1) + self.dest_folder_label = QtWidgets.QLabel(parent=constructRoi) + self.dest_folder_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.dest_folder_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.dest_folder_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.dest_folder_label.setObjectName("dest_folder_label") + self.save_roi_layout.addWidget(self.dest_folder_label, 0, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.roi_name_label = QtWidgets.QLabel(parent=constructRoi) + self.roi_name_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.roi_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roi_name_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.roi_name_label.setObjectName("roi_name_label") + self.save_roi_layout.addWidget(self.roi_name_label, 2, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.save_name_input = QtWidgets.QLineEdit(parent=constructRoi) + self.save_name_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_name_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_name_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_name_input.setObjectName("save_name_input") + self.save_roi_layout.addWidget(self.save_name_input, 2, 1, 1, 1) + self.chooseImageButtonsLayout_2 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_2.setSpacing(10) + self.chooseImageButtonsLayout_2.setObjectName("chooseImageButtonsLayout_2") + self.choose_save_folder_button = QtWidgets.QPushButton(parent=constructRoi) + self.choose_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_save_folder_button.setObjectName("choose_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.choose_save_folder_button) + self.clear_save_folder_button = QtWidgets.QPushButton(parent=constructRoi) + self.clear_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_save_folder_button.setObjectName("clear_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.clear_save_folder_button) + self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_2, 0, 2, 1, 1) + self.chooseImageButtonsLayout_4 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_4.setObjectName("chooseImageButtonsLayout_4") + self.save_roi_button = QtWidgets.QPushButton(parent=constructRoi) + self.save_roi_button.setMinimumSize(QtCore.QSize(131, 41)) + self.save_roi_button.setMaximumSize(QtCore.QSize(131, 41)) + self.save_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_roi_button.setObjectName("save_roi_button") + self.chooseImageButtonsLayout_4.addWidget(self.save_roi_button) + self.back_from_save_button = QtWidgets.QPushButton(parent=constructRoi) + self.back_from_save_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_save_button.setObjectName("back_from_save_button") + self.chooseImageButtonsLayout_4.addWidget(self.back_from_save_button) + self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_4, 2, 2, 1, 1) + self.save_roi_layout.setColumnStretch(0, 1) + self.save_roi_layout.setColumnStretch(1, 10) + self.save_roi_layout.setColumnStretch(2, 10) + self.save_roi_layout.setRowStretch(0, 1) + self.save_roi_layout.setRowStretch(1, 10) + self.save_roi_layout.setRowStretch(2, 10) + self.frame_preview_layout.addLayout(self.save_roi_layout) + self.im_display_frame = QtWidgets.QFrame(parent=constructRoi) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(10) + sizePolicy.setVerticalStretch(10) + sizePolicy.setHeightForWidth(self.im_display_frame.sizePolicy().hasHeightForWidth()) + self.im_display_frame.setSizePolicy(sizePolicy) + self.im_display_frame.setMinimumSize(QtCore.QSize(501, 321)) + self.im_display_frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.im_display_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.im_display_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.im_display_frame.setObjectName("im_display_frame") + self.frame_preview_layout.addWidget(self.im_display_frame) + self.frameControlsLayout = QtWidgets.QHBoxLayout() + self.frameControlsLayout.setSpacing(10) + self.frameControlsLayout.setObjectName("frameControlsLayout") + self.frame_slider = QtWidgets.QSlider(parent=constructRoi) + self.frame_slider.setMinimumSize(QtCore.QSize(251, 41)) + self.frame_slider.setMaximumSize(QtCore.QSize(251, 41)) + self.frame_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.frame_slider.setObjectName("frame_slider") + self.frameControlsLayout.addWidget(self.frame_slider) + self.cur_frame_label = QtWidgets.QLabel(parent=constructRoi) + self.cur_frame_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_frame_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.cur_frame_label.setScaledContents(False) + self.cur_frame_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_frame_label.setWordWrap(True) + self.cur_frame_label.setObjectName("cur_frame_label") + self.frameControlsLayout.addWidget(self.cur_frame_label) + self.of_frames_label = QtWidgets.QLabel(parent=constructRoi) + self.of_frames_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.of_frames_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.of_frames_label.setScaledContents(False) + self.of_frames_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.of_frames_label.setWordWrap(True) + self.of_frames_label.setObjectName("of_frames_label") + self.frameControlsLayout.addWidget(self.of_frames_label) + self.total_frames_label = QtWidgets.QLabel(parent=constructRoi) + self.total_frames_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.total_frames_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.total_frames_label.setScaledContents(False) + self.total_frames_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.total_frames_label.setWordWrap(True) + self.total_frames_label.setObjectName("total_frames_label") + self.frameControlsLayout.addWidget(self.total_frames_label) + self.seconds_label = QtWidgets.QLabel(parent=constructRoi) + self.seconds_label.setStyleSheet("QLabel {\n" +" font-size: 12px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.seconds_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.seconds_label.setScaledContents(False) + self.seconds_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.seconds_label.setWordWrap(True) + self.seconds_label.setObjectName("seconds_label") + self.frameControlsLayout.addWidget(self.seconds_label) + self.frame_preview_layout.addLayout(self.frameControlsLayout) + self.frame_preview_layout.setStretch(0, 1) + self.frame_preview_layout.setStretch(6, 1) + self.full_screen_layout.addLayout(self.frame_preview_layout) + self.main_layout.addLayout(self.full_screen_layout) + + self.retranslateUi(constructRoi) + QtCore.QMetaObject.connectSlotsByName(constructRoi) + + def retranslateUi(self, constructRoi): + _translate = QtCore.QCoreApplication.translate + constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("constructRoi", "


")) + self.scanSelectionLabelSidebar.setText(_translate("constructRoi", "Scan Selection:")) + self.scanLabel.setText(_translate("constructRoi", "Scan:")) + self.scan_name_input.setText(_translate("constructRoi", "Sample filename ")) + self.segSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) + self.resultsLabel.setText(_translate("constructRoi", "Results")) + self.visualizationsLabel.setText(_translate("constructRoi", "Visualizations")) + self.analysisConfigLabel.setText(_translate("constructRoi", "Analysis Configuration")) + self.back_button.setText(_translate("constructRoi", "Back")) + self.select_frame_label.setText(_translate("constructRoi", "Select Frame to Segment:")) + self.back_from_drag_button.setText(_translate("constructRoi", "Back")) + self.save_drag_button.setText(_translate("constructRoi", "Save ROI")) + self.draw_pts_type_button.setText(_translate("constructRoi", "Draw Freehand w Points")) + self.draw_freehand_drag_type_button.setText(_translate("constructRoi", "Draw Freehand by Dragging")) + self.draw_rect_drag_type_button.setText(_translate("constructRoi", "Draw Rectangle by Dragging")) + self.clear_roi_button.setText(_translate("constructRoi", "Clear ROI")) + self.undo_last_pt_button.setText(_translate("constructRoi", "Undo Last Point")) + self.close_roi_button.setText(_translate("constructRoi", "Close ROI")) + self.back_from_pts_button.setText(_translate("constructRoi", "Back")) + self.save_pts_button.setText(_translate("constructRoi", "Save ROI")) + self.dest_folder_label.setText(_translate("constructRoi", "Dest Folder")) + self.roi_name_label.setText(_translate("constructRoi", "ROI Name")) + self.choose_save_folder_button.setText(_translate("constructRoi", "Choose Folder")) + self.clear_save_folder_button.setText(_translate("constructRoi", "Clear Path")) + self.save_roi_button.setText(_translate("constructRoi", "Save")) + self.back_from_save_button.setText(_translate("constructRoi", "Back")) + self.cur_frame_label.setText(_translate("constructRoi", "0")) + self.of_frames_label.setText(_translate("constructRoi", "of")) + self.total_frames_label.setText(_translate("constructRoi", "0")) + self.seconds_label.setText(_translate("constructRoi", "seconds")) diff --git a/src/ceus/seg_loading/ui/draw_voi_ui.py b/src/ceus/seg_loading/ui/draw_voi_ui.py new file mode 100644 index 0000000..9f30e18 --- /dev/null +++ b/src/ceus/seg_loading/ui/draw_voi_ui.py @@ -0,0 +1,861 @@ +# Form implementation generated from reading ui file 'src\ceus\seg_loading\ui\draw_voi.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_voi_drawer(object): + def setupUi(self, voi_drawer): + voi_drawer.setObjectName("voi_drawer") + voi_drawer.resize(1512, 832) + voi_drawer.setMinimumSize(QtCore.QSize(0, 0)) + voi_drawer.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=voi_drawer) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(10, -250, 1351, 951)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.scanSelectionSidebar_2 = QtWidgets.QFrame(parent=self.sidebar) + self.scanSelectionSidebar_2.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.scanSelectionSidebar_2.setMinimumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar_2.setMaximumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar_2.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.scanSelectionSidebar_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.scanSelectionSidebar_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.scanSelectionSidebar_2.setObjectName("scanSelectionSidebar_2") + self.scanSelectionLabelSidebar_2 = QtWidgets.QLabel(parent=self.scanSelectionSidebar_2) + self.scanSelectionLabelSidebar_2.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.scanSelectionLabelSidebar_2.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanSelectionLabelSidebar_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanSelectionLabelSidebar_2.setObjectName("scanSelectionLabelSidebar_2") + self.scanLabel_2 = QtWidgets.QLabel(parent=self.scanSelectionSidebar_2) + self.scanLabel_2.setGeometry(QtCore.QRect(-60, 50, 191, 51)) + self.scanLabel_2.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanLabel_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanLabel_2.setObjectName("scanLabel_2") + self.scan_name_input = QtWidgets.QLabel(parent=self.scanSelectionSidebar_2) + self.scan_name_input.setGeometry(QtCore.QRect(70, 50, 261, 51)) + self.scan_name_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.scan_name_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.scan_name_input.setObjectName("scan_name_input") + self.segSidebar_2 = QtWidgets.QFrame(parent=self.sidebar) + self.segSidebar_2.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segSidebar_2.setMaximumSize(QtCore.QSize(341, 121)) + self.segSidebar_2.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segSidebar_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segSidebar_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segSidebar_2.setObjectName("segSidebar_2") + self.segSidebarLabel_2 = QtWidgets.QLabel(parent=self.segSidebar_2) + self.segSidebarLabel_2.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segSidebarLabel_2.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segSidebarLabel_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segSidebarLabel_2.setObjectName("segSidebarLabel_2") + self.resultsSidebar_2 = QtWidgets.QFrame(parent=self.sidebar) + self.resultsSidebar_2.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.resultsSidebar_2.setMinimumSize(QtCore.QSize(341, 121)) + self.resultsSidebar_2.setMaximumSize(QtCore.QSize(341, 121)) + self.resultsSidebar_2.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.resultsSidebar_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.resultsSidebar_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.resultsSidebar_2.setObjectName("resultsSidebar_2") + self.resultsLabel_2 = QtWidgets.QLabel(parent=self.resultsSidebar_2) + self.resultsLabel_2.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.resultsLabel_2.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.resultsLabel_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.resultsLabel_2.setObjectName("resultsLabel_2") + self.visualizationsSidebar_2 = QtWidgets.QFrame(parent=self.sidebar) + self.visualizationsSidebar_2.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.visualizationsSidebar_2.setMinimumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar_2.setMaximumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar_2.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.visualizationsSidebar_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.visualizationsSidebar_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.visualizationsSidebar_2.setObjectName("visualizationsSidebar_2") + self.visualizationsLabel_2 = QtWidgets.QLabel(parent=self.visualizationsSidebar_2) + self.visualizationsLabel_2.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.visualizationsLabel_2.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.visualizationsLabel_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.visualizationsLabel_2.setObjectName("visualizationsLabel_2") + self.analysisConfigSidebar_2 = QtWidgets.QFrame(parent=self.sidebar) + self.analysisConfigSidebar_2.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisConfigSidebar_2.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisConfigSidebar_2.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisConfigSidebar_2.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisConfigSidebar_2.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisConfigSidebar_2.setObjectName("analysisConfigSidebar_2") + self.analysisConfigLabel_2 = QtWidgets.QLabel(parent=self.analysisConfigSidebar_2) + self.analysisConfigLabel_2.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisConfigLabel_2.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisConfigLabel_2.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisConfigLabel_2.setObjectName("analysisConfigLabel_2") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame_3 = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame_3.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame_3.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame_3.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame_3.setObjectName("gridFrame_3") + self.backButtonGrid_4 = QtWidgets.QGridLayout(self.gridFrame_3) + self.backButtonGrid_4.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid_4.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid_4.setObjectName("backButtonGrid_4") + self.observing_label = QtWidgets.QLabel(parent=self.gridFrame_3) + self.observing_label.setStyleSheet("QLabel { background-color : rgb(42, 42, 42); color : red; }") + self.observing_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.observing_label.setObjectName("observing_label") + self.backButtonGrid_4.addWidget(self.observing_label, 0, 0, 1, 1) + self.navigating_label = QtWidgets.QLabel(parent=self.gridFrame_3) + self.navigating_label.setStyleSheet("QLabel { background-color : rgb(42, 42, 42); color : green; }") + self.navigating_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.navigating_label.setObjectName("navigating_label") + self.backButtonGrid_4.addWidget(self.navigating_label, 1, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid_4.addItem(spacerItem, 3, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame_3) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid_4.addWidget(self.back_button, 3, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid_4.addItem(spacerItem1, 2, 0, 1, 1) + self.toggle_crosshair_visibility_button = QtWidgets.QPushButton(parent=self.gridFrame_3) + self.toggle_crosshair_visibility_button.setMinimumSize(QtCore.QSize(131, 41)) + self.toggle_crosshair_visibility_button.setMaximumSize(QtCore.QSize(131, 41)) + self.toggle_crosshair_visibility_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.toggle_crosshair_visibility_button.setObjectName("toggle_crosshair_visibility_button") + self.backButtonGrid_4.addWidget(self.toggle_crosshair_visibility_button, 3, 2, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame_3) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.voi_layout = QtWidgets.QGridLayout() + self.voi_layout.setObjectName("voi_layout") + self.verticalLayout_6 = QtWidgets.QVBoxLayout() + self.verticalLayout_6.setObjectName("verticalLayout_6") + self.sag_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_plane_label.sizePolicy().hasHeightForWidth()) + self.sag_plane_label.setSizePolicy(sizePolicy) + self.sag_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_plane_label.setObjectName("sag_plane_label") + self.verticalLayout_6.addWidget(self.sag_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.sag_plane.sizePolicy().hasHeightForWidth()) + self.sag_plane.setSizePolicy(sizePolicy) + self.sag_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.sag_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.sag_plane.setMouseTracking(True) + self.sag_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.sag_plane.setText("") + self.sag_plane.setObjectName("sag_plane") + self.verticalLayout_6.addWidget(self.sag_plane) + self.horizontalLayout_7 = QtWidgets.QHBoxLayout() + self.horizontalLayout_7.setSpacing(5) + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.sag_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_frame_num.sizePolicy().hasHeightForWidth()) + self.sag_frame_num.setSizePolicy(sizePolicy) + self.sag_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_frame_num.setObjectName("sag_frame_num") + self.horizontalLayout_7.addWidget(self.sag_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_of_label.sizePolicy().hasHeightForWidth()) + self.sag_of_label.setSizePolicy(sizePolicy) + self.sag_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_of_label.setObjectName("sag_of_label") + self.horizontalLayout_7.addWidget(self.sag_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_total_frames.sizePolicy().hasHeightForWidth()) + self.sag_total_frames.setSizePolicy(sizePolicy) + self.sag_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_total_frames.setObjectName("sag_total_frames") + self.horizontalLayout_7.addWidget(self.sag_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_7.setStretch(0, 1) + self.horizontalLayout_7.setStretch(2, 1) + self.verticalLayout_6.addLayout(self.horizontalLayout_7) + self.voi_layout.addLayout(self.verticalLayout_6, 0, 1, 1, 1) + self.verticalLayout_4 = QtWidgets.QVBoxLayout() + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.ax_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_plane_label.sizePolicy().hasHeightForWidth()) + self.ax_plane_label.setSizePolicy(sizePolicy) + self.ax_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_plane_label.setObjectName("ax_plane_label") + self.verticalLayout_4.addWidget(self.ax_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.ax_plane.sizePolicy().hasHeightForWidth()) + self.ax_plane.setSizePolicy(sizePolicy) + self.ax_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.ax_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.ax_plane.setMouseTracking(True) + self.ax_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.ax_plane.setText("") + self.ax_plane.setObjectName("ax_plane") + self.verticalLayout_4.addWidget(self.ax_plane) + self.horizontalLayout_6 = QtWidgets.QHBoxLayout() + self.horizontalLayout_6.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint) + self.horizontalLayout_6.setSpacing(5) + self.horizontalLayout_6.setObjectName("horizontalLayout_6") + self.ax_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_frame_num.sizePolicy().hasHeightForWidth()) + self.ax_frame_num.setSizePolicy(sizePolicy) + self.ax_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_frame_num.setObjectName("ax_frame_num") + self.horizontalLayout_6.addWidget(self.ax_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_of_label.sizePolicy().hasHeightForWidth()) + self.ax_of_label.setSizePolicy(sizePolicy) + self.ax_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_of_label.setObjectName("ax_of_label") + self.horizontalLayout_6.addWidget(self.ax_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_total_frames.sizePolicy().hasHeightForWidth()) + self.ax_total_frames.setSizePolicy(sizePolicy) + self.ax_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_total_frames.setObjectName("ax_total_frames") + self.horizontalLayout_6.addWidget(self.ax_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_6.setStretch(0, 1) + self.horizontalLayout_6.setStretch(2, 1) + self.verticalLayout_4.addLayout(self.horizontalLayout_6) + self.voi_layout.addLayout(self.verticalLayout_4, 0, 0, 1, 1) + self.verticalLayout_7 = QtWidgets.QVBoxLayout() + self.verticalLayout_7.setObjectName("verticalLayout_7") + self.cor_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_plane_label.sizePolicy().hasHeightForWidth()) + self.cor_plane_label.setSizePolicy(sizePolicy) + self.cor_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_plane_label.setObjectName("cor_plane_label") + self.verticalLayout_7.addWidget(self.cor_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.cor_plane.sizePolicy().hasHeightForWidth()) + self.cor_plane.setSizePolicy(sizePolicy) + self.cor_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.cor_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.cor_plane.setMouseTracking(True) + self.cor_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.cor_plane.setText("") + self.cor_plane.setObjectName("cor_plane") + self.verticalLayout_7.addWidget(self.cor_plane) + self.horizontalLayout_8 = QtWidgets.QHBoxLayout() + self.horizontalLayout_8.setSpacing(5) + self.horizontalLayout_8.setObjectName("horizontalLayout_8") + self.cor_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_frame_num.sizePolicy().hasHeightForWidth()) + self.cor_frame_num.setSizePolicy(sizePolicy) + self.cor_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_frame_num.setObjectName("cor_frame_num") + self.horizontalLayout_8.addWidget(self.cor_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_of_label.sizePolicy().hasHeightForWidth()) + self.cor_of_label.setSizePolicy(sizePolicy) + self.cor_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_of_label.setObjectName("cor_of_label") + self.horizontalLayout_8.addWidget(self.cor_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_total_frames.sizePolicy().hasHeightForWidth()) + self.cor_total_frames.setSizePolicy(sizePolicy) + self.cor_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_total_frames.setObjectName("cor_total_frames") + self.horizontalLayout_8.addWidget(self.cor_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_8.setStretch(0, 1) + self.horizontalLayout_8.setStretch(2, 1) + self.verticalLayout_7.addLayout(self.horizontalLayout_8) + self.voi_layout.addLayout(self.verticalLayout_7, 1, 1, 1, 1) + self.verticalLayout_5 = QtWidgets.QVBoxLayout() + self.verticalLayout_5.setContentsMargins(10, -1, 10, 20) + self.verticalLayout_5.setObjectName("verticalLayout_5") + self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.cur_slice_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.cur_slice_label.setScaledContents(False) + self.cur_slice_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cur_slice_label.setWordWrap(True) + self.cur_slice_label.setObjectName("cur_slice_label") + self.verticalLayout_2.addWidget(self.cur_slice_label) + self.horizontalLayout_5 = QtWidgets.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.cur_slice_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.cur_slice_slider.setMinimumSize(QtCore.QSize(285, 0)) + self.cur_slice_slider.setMaximumSize(QtCore.QSize(285, 16777215)) + self.cur_slice_slider.setStyleSheet("QSlider {\n" +" color: white;\n" +"}") + self.cur_slice_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.cur_slice_slider.setObjectName("cur_slice_slider") + self.horizontalLayout_5.addWidget(self.cur_slice_slider, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_spin_box = QtWidgets.QDoubleSpinBox(parent=self.horizontalLayoutWidget_4) + self.cur_slice_spin_box.setMaximumSize(QtCore.QSize(70, 16777215)) + self.cur_slice_spin_box.setStyleSheet("QDoubleSpinBox {\n" +" background: white;\n" +" color: black;\n" +"}") + self.cur_slice_spin_box.setObjectName("cur_slice_spin_box") + self.horizontalLayout_5.addWidget(self.cur_slice_spin_box, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_of_label.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cur_slice_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cur_slice_of_label.setObjectName("cur_slice_of_label") + self.horizontalLayout_5.addWidget(self.cur_slice_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_total = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_total.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_total.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_total.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cur_slice_total.setObjectName("cur_slice_total") + self.horizontalLayout_5.addWidget(self.cur_slice_total, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_5.setStretch(0, 1) + self.verticalLayout_2.addLayout(self.horizontalLayout_5) + self.verticalLayout_5.addLayout(self.verticalLayout_2) + self.voiAlphaLayout_2 = QtWidgets.QVBoxLayout() + self.voiAlphaLayout_2.setObjectName("voiAlphaLayout_2") + self.alpha_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.alpha_label.setScaledContents(False) + self.alpha_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.alpha_label.setWordWrap(True) + self.alpha_label.setObjectName("alpha_label") + self.voiAlphaLayout_2.addWidget(self.alpha_label) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.alpha_status = QtWidgets.QProgressBar(parent=self.horizontalLayoutWidget_4) + self.alpha_status.setMinimumSize(QtCore.QSize(285, 0)) + self.alpha_status.setMaximumSize(QtCore.QSize(285, 16777215)) + self.alpha_status.setProperty("value", 24) + self.alpha_status.setObjectName("alpha_status") + self.horizontalLayout_4.addWidget(self.alpha_status, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_spin_box = QtWidgets.QSpinBox(parent=self.horizontalLayoutWidget_4) + font = QtGui.QFont() + font.setPointSize(13) + self.alpha_spin_box.setFont(font) + self.alpha_spin_box.setStyleSheet("QSpinBox{\n" +" background-color: white,\n" +"}") + self.alpha_spin_box.setObjectName("alpha_spin_box") + self.horizontalLayout_4.addWidget(self.alpha_spin_box, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_of_label.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.alpha_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.alpha_of_label.setObjectName("alpha_of_label") + self.horizontalLayout_4.addWidget(self.alpha_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_total = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_total.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_total.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_total.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.alpha_total.setObjectName("alpha_total") + self.horizontalLayout_4.addWidget(self.alpha_total, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_4.setStretch(0, 1) + self.horizontalLayout_4.setStretch(1, 1) + self.voiAlphaLayout_2.addLayout(self.horizontalLayout_4) + self.verticalLayout_5.addLayout(self.voiAlphaLayout_2) + self.construct_voi_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.construct_voi_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.construct_voi_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.construct_voi_label.setScaledContents(False) + self.construct_voi_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.construct_voi_label.setWordWrap(True) + self.construct_voi_label.setObjectName("construct_voi_label") + self.verticalLayout_5.addWidget(self.construct_voi_label) + self.drawVoiLayout_2 = QtWidgets.QGridLayout() + self.drawVoiLayout_2.setObjectName("drawVoiLayout_2") + self.undo_last_pt_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.undo_last_pt_button.setMinimumSize(QtCore.QSize(0, 36)) + self.undo_last_pt_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.undo_last_pt_button.setCheckable(False) + self.undo_last_pt_button.setObjectName("undo_last_pt_button") + self.drawVoiLayout_2.addWidget(self.undo_last_pt_button, 0, 1, 1, 1) + self.interpolate_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.interpolate_voi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.interpolate_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.interpolate_voi_button.setCheckable(False) + self.interpolate_voi_button.setObjectName("interpolate_voi_button") + self.drawVoiLayout_2.addWidget(self.interpolate_voi_button, 1, 1, 1, 1) + self.draw_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_roi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.draw_roi_button.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.draw_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_roi_button.setCheckable(True) + self.draw_roi_button.setChecked(False) + self.draw_roi_button.setObjectName("draw_roi_button") + self.drawVoiLayout_2.addWidget(self.draw_roi_button, 0, 0, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.undo_last_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.undo_last_roi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.undo_last_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.undo_last_roi_button.setCheckable(False) + self.undo_last_roi_button.setObjectName("undo_last_roi_button") + self.horizontalLayout.addWidget(self.undo_last_roi_button) + self.close_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.close_roi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.close_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.close_roi_button.setCheckable(False) + self.close_roi_button.setObjectName("close_roi_button") + self.horizontalLayout.addWidget(self.close_roi_button) + self.drawVoiLayout_2.addLayout(self.horizontalLayout, 1, 0, 1, 1) + self.verticalLayout_5.addLayout(self.drawVoiLayout_2) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setContentsMargins(-1, -1, 0, 0) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.restart_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.restart_voi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.restart_voi_button.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.restart_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.restart_voi_button.setCheckable(False) + self.restart_voi_button.setObjectName("restart_voi_button") + self.horizontalLayout_2.addWidget(self.restart_voi_button) + self.save_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_voi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.save_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_voi_button.setCheckable(False) + self.save_voi_button.setObjectName("save_voi_button") + self.horizontalLayout_2.addWidget(self.save_voi_button) + self.verticalLayout_5.addLayout(self.horizontalLayout_2) + self.interp_loading_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.interp_loading_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: green;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.interp_loading_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.interp_loading_label.setScaledContents(False) + self.interp_loading_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.interp_loading_label.setWordWrap(True) + self.interp_loading_label.setObjectName("interp_loading_label") + self.verticalLayout_5.addWidget(self.interp_loading_label) + self.saving_voi_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.saving_voi_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: green;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.saving_voi_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.saving_voi_label.setScaledContents(False) + self.saving_voi_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.saving_voi_label.setWordWrap(True) + self.saving_voi_label.setObjectName("saving_voi_label") + self.verticalLayout_5.addWidget(self.saving_voi_label) + self.gridLayout = QtWidgets.QGridLayout() + self.gridLayout.setObjectName("gridLayout") + self.save_folder_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_folder_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_folder_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_folder_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_folder_input.setObjectName("save_folder_input") + self.gridLayout.addWidget(self.save_folder_input, 0, 1, 1, 1) + self.dest_folder_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.dest_folder_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.dest_folder_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.dest_folder_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.dest_folder_label.setObjectName("dest_folder_label") + self.gridLayout.addWidget(self.dest_folder_label, 0, 0, 1, 1) + self.chooseImageButtonsLayout_2 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_2.setSpacing(10) + self.chooseImageButtonsLayout_2.setObjectName("chooseImageButtonsLayout_2") + self.choose_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_save_folder_button.setObjectName("choose_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.choose_save_folder_button) + self.clear_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_save_folder_button.setObjectName("clear_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.clear_save_folder_button) + self.gridLayout.addLayout(self.chooseImageButtonsLayout_2, 0, 2, 1, 1) + self.voi_name_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.voi_name_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.voi_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.voi_name_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.voi_name_label.setObjectName("voi_name_label") + self.gridLayout.addWidget(self.voi_name_label, 1, 0, 1, 1) + self.save_name_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_name_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_name_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_name_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_name_input.setObjectName("save_name_input") + self.gridLayout.addWidget(self.save_name_input, 1, 1, 1, 1) + self.chooseImageButtonsLayout_4 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_4.setObjectName("chooseImageButtonsLayout_4") + self.export_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.export_voi_button.setMinimumSize(QtCore.QSize(131, 41)) + self.export_voi_button.setMaximumSize(QtCore.QSize(131, 41)) + self.export_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.export_voi_button.setObjectName("export_voi_button") + self.chooseImageButtonsLayout_4.addWidget(self.export_voi_button) + self.back_from_save_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_save_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_save_button.setObjectName("back_from_save_button") + self.chooseImageButtonsLayout_4.addWidget(self.back_from_save_button) + self.gridLayout.addLayout(self.chooseImageButtonsLayout_4, 1, 2, 1, 1) + self.verticalLayout_5.addLayout(self.gridLayout) + self.voi_layout.addLayout(self.verticalLayout_5, 1, 0, 1, 1) + self.voi_layout.setColumnStretch(0, 1) + self.voi_layout.setColumnStretch(1, 1) + self.full_screen_layout.addLayout(self.voi_layout) + + self.retranslateUi(voi_drawer) + QtCore.QMetaObject.connectSlotsByName(voi_drawer) + + def retranslateUi(self, voi_drawer): + _translate = QtCore.QCoreApplication.translate + voi_drawer.setWindowTitle(_translate("voi_drawer", "Draw Volume of Interest")) + self.sidebar.setToolTip(_translate("voi_drawer", "


")) + self.scanSelectionLabelSidebar_2.setText(_translate("voi_drawer", "Scan Selection:")) + self.scanLabel_2.setText(_translate("voi_drawer", "Scan:")) + self.scan_name_input.setText(_translate("voi_drawer", "Sample filename ")) + self.segSidebarLabel_2.setText(_translate("voi_drawer", "Segmentation Selection")) + self.resultsLabel_2.setText(_translate("voi_drawer", "Results")) + self.visualizationsLabel_2.setText(_translate("voi_drawer", "Visualizations")) + self.analysisConfigLabel_2.setText(_translate("voi_drawer", "Analysis Configuration")) + self.observing_label.setText(_translate("voi_drawer", "Observing!")) + self.navigating_label.setText(_translate("voi_drawer", "Navigating!")) + self.back_button.setText(_translate("voi_drawer", "Back")) + self.toggle_crosshair_visibility_button.setText(_translate("voi_drawer", "Show/Hide Cross")) + self.sag_plane_label.setText(_translate("voi_drawer", "Sagittal Plane")) + self.sag_frame_num.setText(_translate("voi_drawer", "0")) + self.sag_of_label.setText(_translate("voi_drawer", "of")) + self.sag_total_frames.setText(_translate("voi_drawer", "0")) + self.ax_plane_label.setText(_translate("voi_drawer", "Axial Plane")) + self.ax_frame_num.setText(_translate("voi_drawer", "0")) + self.ax_of_label.setText(_translate("voi_drawer", "of")) + self.ax_total_frames.setText(_translate("voi_drawer", "0")) + self.cor_plane_label.setText(_translate("voi_drawer", "Coronal Plane")) + self.cor_frame_num.setText(_translate("voi_drawer", "0")) + self.cor_of_label.setText(_translate("voi_drawer", "of")) + self.cor_total_frames.setText(_translate("voi_drawer", "0")) + self.cur_slice_label.setText(_translate("voi_drawer", "Current Slice (in seconds):")) + self.cur_slice_of_label.setText(_translate("voi_drawer", "of")) + self.cur_slice_total.setText(_translate("voi_drawer", "0")) + self.alpha_label.setText(_translate("voi_drawer", "VOI Alpha:")) + self.alpha_of_label.setText(_translate("voi_drawer", "of")) + self.alpha_total.setText(_translate("voi_drawer", "255")) + self.construct_voi_label.setText(_translate("voi_drawer", "Construct Volume of Interest (VOI):\n" +"For best results, draw 1 ROI in each plane before interpolating")) + self.undo_last_pt_button.setText(_translate("voi_drawer", "Undo Last Point")) + self.interpolate_voi_button.setText(_translate("voi_drawer", "Interpolate VOI")) + self.draw_roi_button.setText(_translate("voi_drawer", "Draw ROI")) + self.undo_last_roi_button.setText(_translate("voi_drawer", "Undo Last ROI")) + self.close_roi_button.setText(_translate("voi_drawer", "Close ROI")) + self.restart_voi_button.setText(_translate("voi_drawer", "Restart VOI")) + self.save_voi_button.setText(_translate("voi_drawer", "Save VOI")) + self.interp_loading_label.setText(_translate("voi_drawer", "Interpolation Loading...")) + self.saving_voi_label.setText(_translate("voi_drawer", "Saving VOI...")) + self.dest_folder_label.setText(_translate("voi_drawer", "Dest Folder")) + self.choose_save_folder_button.setText(_translate("voi_drawer", "Choose Folder")) + self.clear_save_folder_button.setText(_translate("voi_drawer", "Clear Path")) + self.voi_name_label.setText(_translate("voi_drawer", "VOI Name")) + self.export_voi_button.setText(_translate("voi_drawer", "Save")) + self.back_from_save_button.setText(_translate("voi_drawer", "Back")) diff --git a/src/ceus/seg_loading/ui/seg_file_selection_ui.py b/src/ceus/seg_loading/ui/seg_file_selection_ui.py new file mode 100644 index 0000000..d401d5c --- /dev/null +++ b/src/ceus/seg_loading/ui/seg_file_selection_ui.py @@ -0,0 +1,348 @@ +# Form implementation generated from reading ui file 'src\ceus\seg_loading\ui\seg_file_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_seg_file_selector(object): + def setupUi(self, seg_file_selector): + seg_file_selector.setObjectName("seg_file_selector") + seg_file_selector.resize(1512, 829) + seg_file_selector.setMinimumSize(QtCore.QSize(0, 0)) + seg_file_selector.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=seg_file_selector) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(70, 30, 1198, 751)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar_2 = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar_2.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar_2.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar_2.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar_2.setObjectName("sidebar_2") + self.scanSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar_2) + self.scanSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.scanSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.scanSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.scanSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.scanSelectionSidebar.setObjectName("scanSelectionSidebar") + self.scanSelectionLabelSidebar = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.scanSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanSelectionLabelSidebar.setObjectName("scanSelectionLabelSidebar") + self.scanLabel = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanLabel.setGeometry(QtCore.QRect(-60, 50, 191, 51)) + self.scanLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanLabel.setObjectName("scanLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(70, 50, 261, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.segSidebar = QtWidgets.QFrame(parent=self.sidebar_2) + self.segSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segSidebar.setObjectName("segSidebar") + self.segSidebarLabel = QtWidgets.QLabel(parent=self.segSidebar) + self.segSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segSidebarLabel.setObjectName("segSidebarLabel") + self.resultsSidebar = QtWidgets.QFrame(parent=self.sidebar_2) + self.resultsSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.resultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.resultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.resultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.resultsSidebar.setObjectName("resultsSidebar") + self.resultsLabel = QtWidgets.QLabel(parent=self.resultsSidebar) + self.resultsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.resultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.resultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.resultsLabel.setObjectName("resultsLabel") + self.visualizationsSidebar = QtWidgets.QFrame(parent=self.sidebar_2) + self.visualizationsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.visualizationsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.visualizationsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.visualizationsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.visualizationsSidebar.setObjectName("visualizationsSidebar") + self.visualizationsLabel = QtWidgets.QLabel(parent=self.visualizationsSidebar) + self.visualizationsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.visualizationsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.visualizationsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.visualizationsLabel.setObjectName("visualizationsLabel") + self.analysisConfigSidebar = QtWidgets.QFrame(parent=self.sidebar_2) + self.analysisConfigSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisConfigSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisConfigSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisConfigSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisConfigSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisConfigSidebar.setObjectName("analysisConfigSidebar") + self.analysisConfigLabel = QtWidgets.QLabel(parent=self.analysisConfigSidebar) + self.analysisConfigLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisConfigLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisConfigLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisConfigLabel.setObjectName("analysisConfigLabel") + self.side_bar_layout.addWidget(self.sidebar_2) + self.gridFrame_2 = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame_2.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame_2.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame_2.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame_2.setObjectName("gridFrame_2") + self.backButtonGrid_3 = QtWidgets.QGridLayout(self.gridFrame_2) + self.backButtonGrid_3.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid_3.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid_3.setObjectName("backButtonGrid_3") + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame_2) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid_3.addWidget(self.back_button, 1, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid_3.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid_3.addItem(spacerItem1, 1, 1, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame_2) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.seg_loading_layout = QtWidgets.QVBoxLayout() + self.seg_loading_layout.setContentsMargins(30, 30, 30, 30) + self.seg_loading_layout.setSpacing(20) + self.seg_loading_layout.setObjectName("seg_loading_layout") + self.select_seg_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.select_seg_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_seg_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_seg_label.setScaledContents(False) + self.select_seg_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_seg_label.setWordWrap(True) + self.select_seg_label.setObjectName("select_seg_label") + self.seg_loading_layout.addWidget(self.select_seg_label) + self.chooseImgLayout = QtWidgets.QVBoxLayout() + self.chooseImgLayout.setContentsMargins(20, -1, 20, -1) + self.chooseImgLayout.setObjectName("chooseImgLayout") + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem2) + self.seg_path_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.seg_path_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.seg_path_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.seg_path_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.seg_path_label.setObjectName("seg_path_label") + self.chooseImgLayout.addWidget(self.seg_path_label) + self.seg_path_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.seg_path_input.setMinimumSize(QtCore.QSize(201, 31)) + self.seg_path_input.setMaximumSize(QtCore.QSize(401, 31)) + self.seg_path_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.seg_path_input.setObjectName("seg_path_input") + self.chooseImgLayout.addWidget(self.seg_path_input, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.chooseImageButtonsLayout = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout.setSpacing(1) + self.chooseImageButtonsLayout.setObjectName("chooseImageButtonsLayout") + self.choose_seg_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_seg_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_seg_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_seg_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_seg_path_button.setObjectName("choose_seg_path_button") + self.chooseImageButtonsLayout.addWidget(self.choose_seg_path_button, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.clear_seg_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_seg_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_seg_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_seg_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_seg_path_button.setObjectName("clear_seg_path_button") + self.chooseImageButtonsLayout.addWidget(self.clear_seg_path_button, 0, QtCore.Qt.AlignmentFlag.AlignLeft) + self.chooseImgLayout.addLayout(self.chooseImageButtonsLayout) + spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem3) + self.seg_loading_layout.addLayout(self.chooseImgLayout) + self.loading_options_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.loading_options_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_options_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.loading_options_label.setScaledContents(False) + self.loading_options_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_options_label.setWordWrap(True) + self.loading_options_label.setObjectName("loading_options_label") + self.seg_loading_layout.addWidget(self.loading_options_label) + self.loading_options_table = QtWidgets.QTableWidget(parent=self.horizontalLayoutWidget_4) + self.loading_options_table.setStyleSheet("QTableWidget {\n" +" background: rgb(108, 108, 108);\n" +" color: white;\n" +"}") + self.loading_options_table.setDragEnabled(False) + self.loading_options_table.setRowCount(0) + self.loading_options_table.setColumnCount(0) + self.loading_options_table.setObjectName("loading_options_table") + self.loading_options_table.horizontalHeader().setCascadingSectionResizes(False) + self.seg_loading_layout.addWidget(self.loading_options_table) + self.accept_seg_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_seg_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_seg_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_seg_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_seg_path_button.setObjectName("accept_seg_path_button") + self.seg_loading_layout.addWidget(self.accept_seg_path_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.loading_screen_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.loading_screen_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_screen_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_screen_label.setObjectName("loading_screen_label") + self.seg_loading_layout.addWidget(self.loading_screen_label) + self.select_seg_error_msg = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.select_seg_error_msg.setStyleSheet("QLabel {\n" +" color: rgb(255, 0, 23);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_seg_error_msg.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_seg_error_msg.setObjectName("select_seg_error_msg") + self.seg_loading_layout.addWidget(self.select_seg_error_msg) + self.seg_loading_layout.setStretch(0, 2) + self.seg_loading_layout.setStretch(4, 3) + self.seg_loading_layout.setStretch(6, 2) + self.full_screen_layout.addLayout(self.seg_loading_layout) + + self.retranslateUi(seg_file_selector) + QtCore.QMetaObject.connectSlotsByName(seg_file_selector) + + def retranslateUi(self, seg_file_selector): + _translate = QtCore.QCoreApplication.translate + seg_file_selector.setWindowTitle(_translate("seg_file_selector", "Select Segmentation File")) + self.sidebar_2.setToolTip(_translate("seg_file_selector", "


")) + self.scanSelectionLabelSidebar.setText(_translate("seg_file_selector", "Scan Selection:")) + self.scanLabel.setText(_translate("seg_file_selector", "Scan:")) + self.image_path_input.setText(_translate("seg_file_selector", "Sample filename ")) + self.segSidebarLabel.setText(_translate("seg_file_selector", "Segmentation Selection")) + self.resultsLabel.setText(_translate("seg_file_selector", "Results")) + self.visualizationsLabel.setText(_translate("seg_file_selector", "Visualizations")) + self.analysisConfigLabel.setText(_translate("seg_file_selector", "Analysis Configuration")) + self.back_button.setText(_translate("seg_file_selector", "Back")) + self.select_seg_label.setText(_translate("seg_file_selector", "Select Segmentation File to Load:")) + self.seg_path_label.setText(_translate("seg_file_selector", "Input Path to Image file\n" +" (.rf, .rfd, .mat, .bin)")) + self.choose_seg_path_button.setText(_translate("seg_file_selector", "Choose File")) + self.clear_seg_path_button.setText(_translate("seg_file_selector", "Clear Path")) + self.loading_options_label.setText(_translate("seg_file_selector", "\n" +"Segmentation Loading Options:")) + self.loading_options_table.setSortingEnabled(False) + self.accept_seg_path_button.setText(_translate("seg_file_selector", "Accept")) + self.loading_screen_label.setText(_translate("seg_file_selector", "LOADING....")) + self.select_seg_error_msg.setText(_translate("seg_file_selector", "ERROR: At least one dimension of phantom data\n" +"smaller than corresponding dimension\n" +"of image data")) diff --git a/src/ceus/seg_loading/ui/seg_type_selection_ui.py b/src/ceus/seg_loading/ui/seg_type_selection_ui.py new file mode 100644 index 0000000..0e7c5f7 --- /dev/null +++ b/src/ceus/seg_loading/ui/seg_type_selection_ui.py @@ -0,0 +1,257 @@ +# Form implementation generated from reading ui file 'src\ceus\seg_loading\ui\seg_type_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_seg_type_selector(object): + def setupUi(self, seg_type_selector): + seg_type_selector.setObjectName("seg_type_selector") + seg_type_selector.resize(1287, 806) + seg_type_selector.setMinimumSize(QtCore.QSize(0, 0)) + seg_type_selector.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=seg_type_selector) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(0, 0, 1281, 801)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.scanSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.scanSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.scanSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.scanSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.scanSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.scanSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.scanSelectionSidebar.setObjectName("scanSelectionSidebar") + self.scanSelectionLabelSidebar = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.scanSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanSelectionLabelSidebar.setObjectName("scanSelectionLabelSidebar") + self.scanLabel = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scanLabel.setGeometry(QtCore.QRect(-60, 50, 191, 51)) + self.scanLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.scanLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.scanLabel.setObjectName("scanLabel") + self.scan_name_input = QtWidgets.QLabel(parent=self.scanSelectionSidebar) + self.scan_name_input.setGeometry(QtCore.QRect(70, 50, 261, 51)) + self.scan_name_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.scan_name_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.scan_name_input.setObjectName("scan_name_input") + self.segSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segSidebar.setObjectName("segSidebar") + self.segSidebarLabel = QtWidgets.QLabel(parent=self.segSidebar) + self.segSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segSidebarLabel.setObjectName("segSidebarLabel") + self.resultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.resultsSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.resultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.resultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.resultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.resultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.resultsSidebar.setObjectName("resultsSidebar") + self.resultsLabel = QtWidgets.QLabel(parent=self.resultsSidebar) + self.resultsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.resultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.resultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.resultsLabel.setObjectName("resultsLabel") + self.visualizationsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.visualizationsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.visualizationsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.visualizationsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.visualizationsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.visualizationsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.visualizationsSidebar.setObjectName("visualizationsSidebar") + self.visualizationsLabel = QtWidgets.QLabel(parent=self.visualizationsSidebar) + self.visualizationsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.visualizationsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.visualizationsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.visualizationsLabel.setObjectName("visualizationsLabel") + self.analysisConfigSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisConfigSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisConfigSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisConfigSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisConfigSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisConfigSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisConfigSidebar.setObjectName("analysisConfigSidebar") + self.analysisConfigLabel = QtWidgets.QLabel(parent=self.analysisConfigSidebar) + self.analysisConfigLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisConfigLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisConfigLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisConfigLabel.setObjectName("analysisConfigLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame_2 = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame_2.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame_2.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame_2.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame_2.setObjectName("gridFrame_2") + self.backButtonGrid_3 = QtWidgets.QGridLayout(self.gridFrame_2) + self.backButtonGrid_3.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid_3.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid_3.setObjectName("backButtonGrid_3") + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame_2) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid_3.addWidget(self.back_button, 1, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid_3.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid_3.addItem(spacerItem1, 1, 1, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame_2) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.select_type_layout = QtWidgets.QVBoxLayout() + self.select_type_layout.setContentsMargins(30, -1, 30, -1) + self.select_type_layout.setSpacing(50) + self.select_type_layout.setObjectName("select_type_layout") + self.select_type_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.select_type_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_type_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_type_label.setScaledContents(False) + self.select_type_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_type_label.setWordWrap(True) + self.select_type_label.setObjectName("select_type_label") + self.select_type_layout.addWidget(self.select_type_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.seg_type_dropdown = QtWidgets.QComboBox(parent=self.horizontalLayoutWidget_4) + self.seg_type_dropdown.setMinimumSize(QtCore.QSize(180, 41)) + self.seg_type_dropdown.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setPointSize(16) + self.seg_type_dropdown.setFont(font) + self.seg_type_dropdown.setStyleSheet("QComboBox {\n" +" color: white;\n" +"}") + self.seg_type_dropdown.setObjectName("seg_type_dropdown") + self.select_type_layout.addWidget(self.seg_type_dropdown) + self.accept_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_type_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_type_button.setObjectName("accept_type_button") + self.select_type_layout.addWidget(self.accept_type_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.select_type_layout.addItem(spacerItem2) + self.select_type_layout.setStretch(0, 2) + self.select_type_layout.setStretch(1, 2) + self.select_type_layout.setStretch(2, 2) + self.select_type_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.select_type_layout) + + self.retranslateUi(seg_type_selector) + QtCore.QMetaObject.connectSlotsByName(seg_type_selector) + + def retranslateUi(self, seg_type_selector): + _translate = QtCore.QCoreApplication.translate + seg_type_selector.setWindowTitle(_translate("seg_type_selector", "Select Segmentation Type")) + self.sidebar.setToolTip(_translate("seg_type_selector", "


")) + self.scanSelectionLabelSidebar.setText(_translate("seg_type_selector", "Scan Selection:")) + self.scanLabel.setText(_translate("seg_type_selector", "Scan:")) + self.scan_name_input.setText(_translate("seg_type_selector", "Sample filename ")) + self.segSidebarLabel.setText(_translate("seg_type_selector", "Segmentation Selection")) + self.resultsLabel.setText(_translate("seg_type_selector", "Results")) + self.visualizationsLabel.setText(_translate("seg_type_selector", "Visualizations")) + self.analysisConfigLabel.setText(_translate("seg_type_selector", "Analysis Configuration")) + self.back_button.setText(_translate("seg_type_selector", "Back")) + self.select_type_label.setText(_translate("seg_type_selector", "Select Segmentation Type:")) + self.accept_type_button.setText(_translate("seg_type_selector", "Accept")) diff --git a/src/qus/analysis_loading/ui/analysis_function_selection_ui.py b/src/qus/analysis_loading/ui/analysis_function_selection_ui.py new file mode 100644 index 0000000..e9d8317 --- /dev/null +++ b/src/qus/analysis_loading/ui/analysis_function_selection_ui.py @@ -0,0 +1,270 @@ +# Form implementation generated from reading ui file 'src\qus\analysis_loading\ui\analysis_function_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_analysisFunctionSelection(object): + def setupUi(self, analysisFunctionSelection): + analysisFunctionSelection.setObjectName("analysisFunctionSelection") + analysisFunctionSelection.resize(1284, 803) + analysisFunctionSelection.setMinimumSize(QtCore.QSize(0, 0)) + analysisFunctionSelection.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=analysisFunctionSelection) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 10, 1081, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.analysis_function_layout = QtWidgets.QVBoxLayout() + self.analysis_function_layout.setContentsMargins(30, 30, 10, 10) + self.analysis_function_layout.setSpacing(20) + self.analysis_function_layout.setObjectName("analysis_function_layout") + self.analysis_function_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_function_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_function_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.analysis_function_label.setScaledContents(False) + self.analysis_function_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_function_label.setWordWrap(True) + self.analysis_function_label.setObjectName("analysis_function_label") + self.analysis_function_layout.addWidget(self.analysis_function_label) + self.funcs_list = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_4) + self.funcs_list.setObjectName("funcs_list") + self.analysis_function_layout.addWidget(self.funcs_list) + self.next_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.next_button.setMinimumSize(QtCore.QSize(131, 41)) + self.next_button.setMaximumSize(QtCore.QSize(131, 41)) + self.next_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.next_button.setObjectName("next_button") + self.analysis_function_layout.addWidget(self.next_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.analysis_function_layout.addItem(spacerItem2) + self.analysis_function_layout.setStretch(1, 10) + self.analysis_function_layout.setStretch(2, 1) + self.analysis_function_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.analysis_function_layout) + + self.retranslateUi(analysisFunctionSelection) + QtCore.QMetaObject.connectSlotsByName(analysisFunctionSelection) + + def retranslateUi(self, analysisFunctionSelection): + _translate = QtCore.QCoreApplication.translate + analysisFunctionSelection.setWindowTitle(_translate("analysisFunctionSelection", "Analysis Function Selection")) + self.sidebar.setToolTip(_translate("analysisFunctionSelection", "


")) + self.imageSelectionLabelSidebar.setText(_translate("analysisFunctionSelection", "Image Selection:")) + self.imageLabel.setText(_translate("analysisFunctionSelection", "Image:")) + self.phantomLabel.setText(_translate("analysisFunctionSelection", "Phantom:")) + self.image_path_input.setText(_translate("analysisFunctionSelection", "Sample filename ")) + self.phantom_path_input.setText(_translate("analysisFunctionSelection", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("analysisFunctionSelection", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("analysisFunctionSelection", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("analysisFunctionSelection", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("analysisFunctionSelection", "Visualization / Export")) + self.back_button.setText(_translate("analysisFunctionSelection", "Back")) + self.analysis_function_label.setText(_translate("analysisFunctionSelection", "Select analysis methods to run:")) + self.next_button.setText(_translate("analysisFunctionSelection", "Next")) diff --git a/src/qus/analysis_loading/ui/analysis_params_ui.py b/src/qus/analysis_loading/ui/analysis_params_ui.py new file mode 100644 index 0000000..c4dfc69 --- /dev/null +++ b/src/qus/analysis_loading/ui/analysis_params_ui.py @@ -0,0 +1,302 @@ +# Form implementation generated from reading ui file 'src\qus\analysis_loading\ui\analysis_params.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_analysisParams(object): + def setupUi(self, analysisParams): + analysisParams.setObjectName("analysisParams") + analysisParams.resize(1284, 803) + analysisParams.setMinimumSize(QtCore.QSize(0, 0)) + analysisParams.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=analysisParams) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 951, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.analysis_params_layout = QtWidgets.QVBoxLayout() + self.analysis_params_layout.setContentsMargins(30, 10, 30, 10) + self.analysis_params_layout.setSpacing(50) + self.analysis_params_layout.setObjectName("analysis_params_layout") + self.analysis_execution_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_execution_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_execution_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.analysis_execution_label.setScaledContents(False) + self.analysis_execution_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_execution_label.setWordWrap(True) + self.analysis_execution_label.setObjectName("analysis_execution_label") + self.analysis_params_layout.addWidget(self.analysis_execution_label) + self.analysis_params_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_params_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_params_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.analysis_params_label.setScaledContents(False) + self.analysis_params_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_params_label.setWordWrap(True) + self.analysis_params_label.setObjectName("analysis_params_label") + self.analysis_params_layout.addWidget(self.analysis_params_label) + self.params_scroll_area = QtWidgets.QScrollArea(parent=self.horizontalLayoutWidget_4) + self.params_scroll_area.setWidgetResizable(True) + self.params_scroll_area.setObjectName("params_scroll_area") + self.params_content = QtWidgets.QWidget() + self.params_content.setGeometry(QtCore.QRect(0, 0, 409, 295)) + self.params_content.setObjectName("params_content") + self.params_layout = QtWidgets.QVBoxLayout(self.params_content) + self.params_layout.setObjectName("params_layout") + self.params_scroll_area.setWidget(self.params_content) + self.analysis_params_layout.addWidget(self.params_scroll_area) + self.analysis_running_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_running_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_running_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_running_label.setObjectName("analysis_running_label") + self.analysis_params_layout.addWidget(self.analysis_running_label) + self.run_analysis_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.run_analysis_button.setMinimumSize(QtCore.QSize(131, 41)) + self.run_analysis_button.setMaximumSize(QtCore.QSize(131, 41)) + self.run_analysis_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.run_analysis_button.setObjectName("run_analysis_button") + self.analysis_params_layout.addWidget(self.run_analysis_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.analysis_params_layout.addItem(spacerItem2) + self.analysis_params_layout.setStretch(0, 1) + self.analysis_params_layout.setStretch(1, 1) + self.analysis_params_layout.setStretch(2, 10) + self.analysis_params_layout.setStretch(4, 1) + self.analysis_params_layout.setStretch(5, 1) + self.full_screen_layout.addLayout(self.analysis_params_layout) + + self.retranslateUi(analysisParams) + QtCore.QMetaObject.connectSlotsByName(analysisParams) + + def retranslateUi(self, analysisParams): + _translate = QtCore.QCoreApplication.translate + analysisParams.setWindowTitle(_translate("analysisParams", "Analysis Parameters Configuration")) + self.sidebar.setToolTip(_translate("analysisParams", "


")) + self.imageSelectionLabelSidebar.setText(_translate("analysisParams", "Image Selection:")) + self.imageLabel.setText(_translate("analysisParams", "Image:")) + self.phantomLabel.setText(_translate("analysisParams", "Phantom:")) + self.image_path_input.setText(_translate("analysisParams", "Sample filename ")) + self.phantom_path_input.setText(_translate("analysisParams", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("analysisParams", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("analysisParams", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("analysisParams", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("analysisParams", "Visualization / Export")) + self.back_button.setText(_translate("analysisParams", "Back")) + self.analysis_execution_label.setText(_translate("analysisParams", "Analysis in Progress...")) + self.analysis_params_label.setText(_translate("analysisParams", "Configure Analysis Parameters:")) + self.analysis_running_label.setText(_translate("analysisParams", "Running Analysis....")) + self.run_analysis_button.setText(_translate("analysisParams", "Run Analysis")) diff --git a/src/qus/config_loading/ui/config_file_selection_ui.py b/src/qus/config_loading/ui/config_file_selection_ui.py new file mode 100644 index 0000000..b860a49 --- /dev/null +++ b/src/qus/config_loading/ui/config_file_selection_ui.py @@ -0,0 +1,347 @@ +# Form implementation generated from reading ui file 'src\qus\config_loading\ui\config_file_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_configFileSelection(object): + def setupUi(self, configFileSelection): + configFileSelection.setObjectName("configFileSelection") + configFileSelection.resize(1284, 803) + configFileSelection.setMinimumSize(QtCore.QSize(0, 0)) + configFileSelection.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=configFileSelection) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 1315, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.config_loading_layout = QtWidgets.QVBoxLayout() + self.config_loading_layout.setContentsMargins(30, 30, 30, 30) + self.config_loading_layout.setSpacing(20) + self.config_loading_layout.setObjectName("config_loading_layout") + self.file_selection_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.file_selection_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.file_selection_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.file_selection_label.setScaledContents(False) + self.file_selection_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.file_selection_label.setWordWrap(True) + self.file_selection_label.setObjectName("file_selection_label") + self.config_loading_layout.addWidget(self.file_selection_label) + self.chooseImgLayout = QtWidgets.QVBoxLayout() + self.chooseImgLayout.setContentsMargins(20, -1, 20, -1) + self.chooseImgLayout.setObjectName("chooseImgLayout") + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem2) + self.config_path_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.config_path_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.config_path_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.config_path_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.config_path_label.setObjectName("config_path_label") + self.chooseImgLayout.addWidget(self.config_path_label) + self.config_path_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.config_path_input.setMinimumSize(QtCore.QSize(201, 31)) + self.config_path_input.setMaximumSize(QtCore.QSize(401, 31)) + self.config_path_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.config_path_input.setObjectName("config_path_input") + self.chooseImgLayout.addWidget(self.config_path_input, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.chooseImageButtonsLayout = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout.setSpacing(1) + self.chooseImageButtonsLayout.setObjectName("chooseImageButtonsLayout") + self.choose_config_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_config_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_config_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_config_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_config_path_button.setObjectName("choose_config_path_button") + self.chooseImageButtonsLayout.addWidget(self.choose_config_path_button, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.clear_config_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_config_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_config_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_config_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_config_path_button.setObjectName("clear_config_path_button") + self.chooseImageButtonsLayout.addWidget(self.clear_config_path_button, 0, QtCore.Qt.AlignmentFlag.AlignLeft) + self.chooseImgLayout.addLayout(self.chooseImageButtonsLayout) + spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem3) + self.config_loading_layout.addLayout(self.chooseImgLayout) + self.loading_options_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.loading_options_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_options_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.loading_options_label.setScaledContents(False) + self.loading_options_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_options_label.setWordWrap(True) + self.loading_options_label.setObjectName("loading_options_label") + self.config_loading_layout.addWidget(self.loading_options_label) + self.loading_options_table = QtWidgets.QTableWidget(parent=self.horizontalLayoutWidget_4) + self.loading_options_table.setStyleSheet("QTableWidget {\n" +" background: rgb(108, 108, 108);\n" +" color: white;\n" +"}") + self.loading_options_table.setDragEnabled(False) + self.loading_options_table.setRowCount(0) + self.loading_options_table.setColumnCount(0) + self.loading_options_table.setObjectName("loading_options_table") + self.loading_options_table.horizontalHeader().setCascadingSectionResizes(False) + self.config_loading_layout.addWidget(self.loading_options_table) + self.accept_config_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_config_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_config_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_config_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_config_path_button.setObjectName("accept_config_path_button") + self.config_loading_layout.addWidget(self.accept_config_path_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.config_loading_layout.setStretch(0, 2) + self.config_loading_layout.setStretch(4, 3) + self.full_screen_layout.addLayout(self.config_loading_layout) + + self.retranslateUi(configFileSelection) + QtCore.QMetaObject.connectSlotsByName(configFileSelection) + + def retranslateUi(self, configFileSelection): + _translate = QtCore.QCoreApplication.translate + configFileSelection.setWindowTitle(_translate("configFileSelection", "Config File Selection")) + self.sidebar.setToolTip(_translate("configFileSelection", "


")) + self.imageSelectionLabelSidebar.setText(_translate("configFileSelection", "Image Selection:")) + self.imageLabel.setText(_translate("configFileSelection", "Image:")) + self.phantomLabel.setText(_translate("configFileSelection", "Phantom:")) + self.image_path_input.setText(_translate("configFileSelection", "Sample filename ")) + self.phantom_path_input.setText(_translate("configFileSelection", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("configFileSelection", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("configFileSelection", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("configFileSelection", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("configFileSelection", "Visualization / Export")) + self.back_button.setText(_translate("configFileSelection", "Back")) + self.file_selection_label.setText(_translate("configFileSelection", "Select Configuration File:")) + self.config_path_label.setText(_translate("configFileSelection", "Input path to config file\n" +" (.rf, .rfd, .mat, .bin)")) + self.choose_config_path_button.setText(_translate("configFileSelection", "Choose File")) + self.clear_config_path_button.setText(_translate("configFileSelection", "Clear Path")) + self.loading_options_label.setText(_translate("configFileSelection", "\n" +"Configuration Loading Options:")) + self.loading_options_table.setSortingEnabled(False) + self.accept_config_path_button.setText(_translate("configFileSelection", "Accept")) diff --git a/src/qus/config_loading/ui/config_preview_ui.py b/src/qus/config_loading/ui/config_preview_ui.py new file mode 100644 index 0000000..7574938 --- /dev/null +++ b/src/qus/config_loading/ui/config_preview_ui.py @@ -0,0 +1,684 @@ +# Form implementation generated from reading ui file 'src\qus\config_loading\ui\config_preview.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_configPreview(object): + def setupUi(self, configPreview): + configPreview.setObjectName("configPreview") + configPreview.resize(1284, 803) + configPreview.setMinimumSize(QtCore.QSize(0, 0)) + configPreview.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=configPreview) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 1162, 735)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(90, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(90, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.config_confirm_layout = QtWidgets.QVBoxLayout() + self.config_confirm_layout.setContentsMargins(10, 30, 10, 30) + self.config_confirm_layout.setSpacing(30) + self.config_confirm_layout.setObjectName("config_confirm_layout") + self.config_preview_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.config_preview_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.config_preview_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.config_preview_label.setScaledContents(False) + self.config_preview_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.config_preview_label.setWordWrap(True) + self.config_preview_label.setObjectName("config_preview_label") + self.config_confirm_layout.addWidget(self.config_preview_label) + self.config_desc_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.config_desc_label.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 14px;\n" +"}") + self.config_desc_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.config_desc_label.setWordWrap(True) + self.config_desc_label.setObjectName("config_desc_label") + self.config_confirm_layout.addWidget(self.config_desc_label) + self.configScrollArea = QtWidgets.QScrollArea(parent=self.horizontalLayoutWidget_4) + self.configScrollArea.setStyleSheet("QScrollArea {\n" +" border: none;\n" +" background-color: transparent;\n" +"}\n" +"\n" +"QScrollBar:vertical {\n" +" background-color: rgb(60, 60, 60);\n" +" width: 12px;\n" +" border-radius: 6px;\n" +"}\n" +"\n" +"QScrollBar::handle:vertical {\n" +" background-color: rgb(120, 120, 120);\n" +" border-radius: 6px;\n" +" min-height: 20px;\n" +"}\n" +"\n" +"QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {\n" +" height: 0px;\n" +"}\n" +"\n" +"QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n" +" background-color: transparent;\n" +"}") + self.configScrollArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAsNeeded) + self.configScrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarPolicy.ScrollBarAsNeeded) + self.configScrollArea.setWidgetResizable(True) + self.configScrollArea.setObjectName("configScrollArea") + self.configContainer = QtWidgets.QWidget() + self.configContainer.setGeometry(QtCore.QRect(0, 0, 586, 449)) + self.configContainer.setObjectName("configContainer") + self.config_layout = QtWidgets.QVBoxLayout(self.configContainer) + self.config_layout.setSpacing(20) + self.config_layout.setObjectName("config_layout") + self.freqGroup = QtWidgets.QGroupBox(parent=self.configContainer) + self.freqGroup.setStyleSheet("QGroupBox {\n" +" color: white;\n" +" font-weight: bold;\n" +" border: 2px solid rgb(99, 0, 174);\n" +" border-radius: 5px;\n" +" margin-top: 10px;\n" +" padding-top: 10px;\n" +"}\n" +"\n" +"QGroupBox::title {\n" +" subcontrol-origin: margin;\n" +" left: 10px;\n" +" padding: 0 5px 0 5px;\n" +"}") + self.freqGroup.setObjectName("freqGroup") + self.freq_layout = QtWidgets.QFormLayout(self.freqGroup) + self.freq_layout.setSpacing(10) + self.freq_layout.setObjectName("freq_layout") + self.transducerFreqLabel = QtWidgets.QLabel(parent=self.freqGroup) + self.transducerFreqLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.transducerFreqLabel.setObjectName("transducerFreqLabel") + self.freq_layout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.transducerFreqLabel) + self.transducerFreqValue = QtWidgets.QLabel(parent=self.freqGroup) + self.transducerFreqValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.transducerFreqValue.setObjectName("transducerFreqValue") + self.freq_layout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.transducerFreqValue) + self.analysisFreqLabel = QtWidgets.QLabel(parent=self.freqGroup) + self.analysisFreqLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.analysisFreqLabel.setObjectName("analysisFreqLabel") + self.freq_layout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.analysisFreqLabel) + self.analysisFreqValue = QtWidgets.QLabel(parent=self.freqGroup) + self.analysisFreqValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.analysisFreqValue.setObjectName("analysisFreqValue") + self.freq_layout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.analysisFreqValue) + self.centerFreqLabel = QtWidgets.QLabel(parent=self.freqGroup) + self.centerFreqLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.centerFreqLabel.setObjectName("centerFreqLabel") + self.freq_layout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.centerFreqLabel) + self.centerFreqValue = QtWidgets.QLabel(parent=self.freqGroup) + self.centerFreqValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.centerFreqValue.setObjectName("centerFreqValue") + self.freq_layout.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.centerFreqValue) + self.samplingFreqLabel = QtWidgets.QLabel(parent=self.freqGroup) + self.samplingFreqLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.samplingFreqLabel.setObjectName("samplingFreqLabel") + self.freq_layout.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.samplingFreqLabel) + self.samplingFreqValue = QtWidgets.QLabel(parent=self.freqGroup) + self.samplingFreqValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.samplingFreqValue.setObjectName("samplingFreqValue") + self.freq_layout.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.samplingFreqValue) + self.config_layout.addWidget(self.freqGroup) + self.windowGroup = QtWidgets.QGroupBox(parent=self.configContainer) + self.windowGroup.setStyleSheet("QGroupBox {\n" +" color: white;\n" +" font-weight: bold;\n" +" border: 2px solid rgb(99, 0, 174);\n" +" border-radius: 5px;\n" +" margin-top: 10px;\n" +" padding-top: 10px;\n" +"}\n" +"\n" +"QGroupBox::title {\n" +" subcontrol-origin: margin;\n" +" left: 10px;\n" +" padding: 0 5px 0 5px;\n" +"}") + self.windowGroup.setObjectName("windowGroup") + self.window_layout = QtWidgets.QFormLayout(self.windowGroup) + self.window_layout.setSpacing(10) + self.window_layout.setObjectName("window_layout") + self.axWinSizeLabel = QtWidgets.QLabel(parent=self.windowGroup) + self.axWinSizeLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.axWinSizeLabel.setObjectName("axWinSizeLabel") + self.window_layout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.axWinSizeLabel) + self.axWinSizeValue = QtWidgets.QLabel(parent=self.windowGroup) + self.axWinSizeValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.axWinSizeValue.setObjectName("axWinSizeValue") + self.window_layout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.axWinSizeValue) + self.latWinSizeLabel = QtWidgets.QLabel(parent=self.windowGroup) + self.latWinSizeLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.latWinSizeLabel.setObjectName("latWinSizeLabel") + self.window_layout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.latWinSizeLabel) + self.latWinSizeValue = QtWidgets.QLabel(parent=self.windowGroup) + self.latWinSizeValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.latWinSizeValue.setObjectName("latWinSizeValue") + self.window_layout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.latWinSizeValue) + self.windowThreshLabel = QtWidgets.QLabel(parent=self.windowGroup) + self.windowThreshLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.windowThreshLabel.setObjectName("windowThreshLabel") + self.window_layout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.windowThreshLabel) + self.windowThreshValue = QtWidgets.QLabel(parent=self.windowGroup) + self.windowThreshValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.windowThreshValue.setObjectName("windowThreshValue") + self.window_layout.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.windowThreshValue) + self.axialOverlapLabel = QtWidgets.QLabel(parent=self.windowGroup) + self.axialOverlapLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.axialOverlapLabel.setObjectName("axialOverlapLabel") + self.window_layout.setWidget(3, QtWidgets.QFormLayout.ItemRole.LabelRole, self.axialOverlapLabel) + self.axialOverlapValue = QtWidgets.QLabel(parent=self.windowGroup) + self.axialOverlapValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.axialOverlapValue.setObjectName("axialOverlapValue") + self.window_layout.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.axialOverlapValue) + self.lateralOverlapLabel = QtWidgets.QLabel(parent=self.windowGroup) + self.lateralOverlapLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.lateralOverlapLabel.setObjectName("lateralOverlapLabel") + self.window_layout.setWidget(4, QtWidgets.QFormLayout.ItemRole.LabelRole, self.lateralOverlapLabel) + self.lateralOverlapValue = QtWidgets.QLabel(parent=self.windowGroup) + self.lateralOverlapValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.lateralOverlapValue.setObjectName("lateralOverlapValue") + self.window_layout.setWidget(4, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lateralOverlapValue) + self.config_layout.addWidget(self.windowGroup) + self.group3d = QtWidgets.QGroupBox(parent=self.configContainer) + self.group3d.setStyleSheet("QGroupBox {\n" +" color: white;\n" +" font-weight: bold;\n" +" border: 2px solid rgb(99, 0, 174);\n" +" border-radius: 5px;\n" +" margin-top: 10px;\n" +" padding-top: 10px;\n" +"}\n" +"\n" +"QGroupBox::title {\n" +" subcontrol-origin: margin;\n" +" left: 10px;\n" +" padding: 0 5px 0 5px;\n" +"}") + self.group3d.setObjectName("group3d") + self.layout3d = QtWidgets.QFormLayout(self.group3d) + self.layout3d.setSpacing(10) + self.layout3d.setObjectName("layout3d") + self.corWinSizeLabel = QtWidgets.QLabel(parent=self.group3d) + self.corWinSizeLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.corWinSizeLabel.setObjectName("corWinSizeLabel") + self.layout3d.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.corWinSizeLabel) + self.corWinSizeValue = QtWidgets.QLabel(parent=self.group3d) + self.corWinSizeValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.corWinSizeValue.setObjectName("corWinSizeValue") + self.layout3d.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.corWinSizeValue) + self.coronalOverlapLabel = QtWidgets.QLabel(parent=self.group3d) + self.coronalOverlapLabel.setStyleSheet("QLabel {\n" +" color: white;\n" +" font-size: 12px;\n" +"}") + self.coronalOverlapLabel.setObjectName("coronalOverlapLabel") + self.layout3d.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.coronalOverlapLabel) + self.coronalOverlapValue = QtWidgets.QLabel(parent=self.group3d) + self.coronalOverlapValue.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 127);\n" +" font-size: 12px;\n" +" font-weight: bold;\n" +"}") + self.coronalOverlapValue.setObjectName("coronalOverlapValue") + self.layout3d.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.coronalOverlapValue) + self.config_layout.addWidget(self.group3d) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.config_layout.addItem(spacerItem2) + self.configScrollArea.setWidget(self.configContainer) + self.config_confirm_layout.addWidget(self.configScrollArea) + self.save_option_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_option_button.setMinimumSize(QtCore.QSize(191, 41)) + self.save_option_button.setMaximumSize(QtCore.QSize(191, 41)) + self.save_option_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_option_button.setObjectName("save_option_button") + self.config_confirm_layout.addWidget(self.save_option_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.save_config_layout = QtWidgets.QGridLayout() + self.save_config_layout.setContentsMargins(-1, -1, -1, 10) + self.save_config_layout.setSpacing(10) + self.save_config_layout.setObjectName("save_config_layout") + self.save_folder_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_folder_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_folder_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_folder_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_folder_input.setObjectName("save_folder_input") + self.save_config_layout.addWidget(self.save_folder_input, 0, 1, 1, 1) + self.dest_folder_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.dest_folder_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.dest_folder_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.dest_folder_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.dest_folder_label.setObjectName("dest_folder_label") + self.save_config_layout.addWidget(self.dest_folder_label, 0, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.config_name_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.config_name_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.config_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.config_name_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.config_name_label.setObjectName("config_name_label") + self.save_config_layout.addWidget(self.config_name_label, 2, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.save_name_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_name_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_name_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_name_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_name_input.setObjectName("save_name_input") + self.save_config_layout.addWidget(self.save_name_input, 2, 1, 1, 1) + self.chooseImageButtonsLayout_2 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_2.setSpacing(10) + self.chooseImageButtonsLayout_2.setObjectName("chooseImageButtonsLayout_2") + self.choose_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_save_folder_button.setObjectName("choose_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.choose_save_folder_button) + self.clear_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_save_folder_button.setObjectName("clear_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.clear_save_folder_button) + self.save_config_layout.addLayout(self.chooseImageButtonsLayout_2, 0, 2, 1, 1) + self.chooseImageButtonsLayout_4 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_4.setObjectName("chooseImageButtonsLayout_4") + self.save_config_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_config_button.setMinimumSize(QtCore.QSize(131, 41)) + self.save_config_button.setMaximumSize(QtCore.QSize(131, 41)) + self.save_config_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_config_button.setObjectName("save_config_button") + self.chooseImageButtonsLayout_4.addWidget(self.save_config_button) + self.back_from_save_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_save_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_save_button.setObjectName("back_from_save_button") + self.chooseImageButtonsLayout_4.addWidget(self.back_from_save_button) + self.save_config_layout.addLayout(self.chooseImageButtonsLayout_4, 2, 2, 1, 1) + self.save_config_layout.setColumnStretch(0, 1) + self.save_config_layout.setColumnStretch(1, 10) + self.save_config_layout.setColumnStretch(2, 10) + self.save_config_layout.setRowStretch(0, 1) + self.save_config_layout.setRowStretch(1, 10) + self.save_config_layout.setRowStretch(2, 10) + self.config_confirm_layout.addLayout(self.save_config_layout) + self.confirm_config_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.confirm_config_button.setMinimumSize(QtCore.QSize(191, 41)) + self.confirm_config_button.setMaximumSize(QtCore.QSize(191, 41)) + self.confirm_config_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.confirm_config_button.setObjectName("confirm_config_button") + self.config_confirm_layout.addWidget(self.confirm_config_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.config_confirm_layout.addItem(spacerItem3) + self.config_confirm_layout.setStretch(0, 1) + self.config_confirm_layout.setStretch(5, 1) + self.config_confirm_layout.setStretch(6, 1) + self.full_screen_layout.addLayout(self.config_confirm_layout) + + self.retranslateUi(configPreview) + QtCore.QMetaObject.connectSlotsByName(configPreview) + + def retranslateUi(self, configPreview): + _translate = QtCore.QCoreApplication.translate + configPreview.setWindowTitle(_translate("configPreview", "Configuration Preview")) + self.sidebar.setToolTip(_translate("configPreview", "


")) + self.imageSelectionLabelSidebar.setText(_translate("configPreview", "Image Selection:")) + self.imageLabel.setText(_translate("configPreview", "Image:")) + self.phantomLabel.setText(_translate("configPreview", "Phantom:")) + self.image_path_input.setText(_translate("configPreview", "Sample filename ")) + self.phantom_path_input.setText(_translate("configPreview", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("configPreview", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("configPreview", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("configPreview", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("configPreview", "Visualization / Export")) + self.back_button.setText(_translate("configPreview", "Back")) + self.config_preview_label.setText(_translate("configPreview", "Configuration Preview")) + self.config_desc_label.setText(_translate("configPreview", "Review the analysis configuration parameters below. These settings will be used for the quantitative ultrasound analysis.")) + self.freqGroup.setTitle(_translate("configPreview", "Frequency Parameters")) + self.transducerFreqLabel.setText(_translate("configPreview", "Transducer Frequency Band:")) + self.transducerFreqValue.setText(_translate("configPreview", "Not set")) + self.analysisFreqLabel.setText(_translate("configPreview", "Analysis Frequency Band:")) + self.analysisFreqValue.setText(_translate("configPreview", "Not set")) + self.centerFreqLabel.setText(_translate("configPreview", "Center Frequency:")) + self.centerFreqValue.setText(_translate("configPreview", "Not set")) + self.samplingFreqLabel.setText(_translate("configPreview", "Sampling Frequency:")) + self.samplingFreqValue.setText(_translate("configPreview", "Not set")) + self.windowGroup.setTitle(_translate("configPreview", "Windowing Parameters")) + self.axWinSizeLabel.setText(_translate("configPreview", "Axial Window Size:")) + self.axWinSizeValue.setText(_translate("configPreview", "Not set")) + self.latWinSizeLabel.setText(_translate("configPreview", "Lateral Window Size:")) + self.latWinSizeValue.setText(_translate("configPreview", "Not set")) + self.windowThreshLabel.setText(_translate("configPreview", "Window Threshold:")) + self.windowThreshValue.setText(_translate("configPreview", "Not set")) + self.axialOverlapLabel.setText(_translate("configPreview", "Axial Overlap:")) + self.axialOverlapValue.setText(_translate("configPreview", "Not set")) + self.lateralOverlapLabel.setText(_translate("configPreview", "Lateral Overlap:")) + self.lateralOverlapValue.setText(_translate("configPreview", "Not set")) + self.group3d.setTitle(_translate("configPreview", "3D Parameters")) + self.corWinSizeLabel.setText(_translate("configPreview", "Coronal Window Size:")) + self.corWinSizeValue.setText(_translate("configPreview", "Not used")) + self.coronalOverlapLabel.setText(_translate("configPreview", "Coronal Overlap:")) + self.coronalOverlapValue.setText(_translate("configPreview", "Not used")) + self.save_option_button.setText(_translate("configPreview", "Save Configuration")) + self.dest_folder_label.setText(_translate("configPreview", "Dest Folder")) + self.config_name_label.setText(_translate("configPreview", "Config Name")) + self.choose_save_folder_button.setText(_translate("configPreview", "Choose Folder")) + self.clear_save_folder_button.setText(_translate("configPreview", "Clear Path")) + self.save_config_button.setText(_translate("configPreview", "Save")) + self.back_from_save_button.setText(_translate("configPreview", "Back")) + self.confirm_config_button.setText(_translate("configPreview", "Confirm Configuration")) diff --git a/src/qus/config_loading/ui/config_type_selection_ui.py b/src/qus/config_loading/ui/config_type_selection_ui.py new file mode 100644 index 0000000..094d469 --- /dev/null +++ b/src/qus/config_loading/ui/config_type_selection_ui.py @@ -0,0 +1,279 @@ +# Form implementation generated from reading ui file 'src\qus\config_loading\ui\config_type_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_configTypeSelection(object): + def setupUi(self, configTypeSelection): + configTypeSelection.setObjectName("configTypeSelection") + configTypeSelection.resize(1284, 803) + configTypeSelection.setMinimumSize(QtCore.QSize(0, 0)) + configTypeSelection.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=configTypeSelection) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 951, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.config_type_layout = QtWidgets.QVBoxLayout() + self.config_type_layout.setContentsMargins(30, -1, 30, -1) + self.config_type_layout.setSpacing(50) + self.config_type_layout.setObjectName("config_type_layout") + self.config_type_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.config_type_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.config_type_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.config_type_label.setScaledContents(False) + self.config_type_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.config_type_label.setWordWrap(True) + self.config_type_label.setObjectName("config_type_label") + self.config_type_layout.addWidget(self.config_type_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.config_type_dropdown = QtWidgets.QComboBox(parent=self.horizontalLayoutWidget_4) + self.config_type_dropdown.setMinimumSize(QtCore.QSize(180, 41)) + self.config_type_dropdown.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setPointSize(16) + self.config_type_dropdown.setFont(font) + self.config_type_dropdown.setStyleSheet("QComboBox {\n" +" color: white;\n" +"}") + self.config_type_dropdown.setObjectName("config_type_dropdown") + self.config_type_layout.addWidget(self.config_type_dropdown) + self.accept_config_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_config_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_config_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_config_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_config_button.setObjectName("accept_config_button") + self.config_type_layout.addWidget(self.accept_config_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.config_type_layout.addItem(spacerItem2) + self.config_type_layout.setStretch(0, 2) + self.config_type_layout.setStretch(1, 2) + self.config_type_layout.setStretch(2, 2) + self.config_type_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.config_type_layout) + + self.retranslateUi(configTypeSelection) + QtCore.QMetaObject.connectSlotsByName(configTypeSelection) + + def retranslateUi(self, configTypeSelection): + _translate = QtCore.QCoreApplication.translate + configTypeSelection.setWindowTitle(_translate("configTypeSelection", "Analysis Configuration Loading")) + self.sidebar.setToolTip(_translate("configTypeSelection", "


")) + self.imageSelectionLabelSidebar.setText(_translate("configTypeSelection", "Image Selection:")) + self.imageLabel.setText(_translate("configTypeSelection", "Image:")) + self.phantomLabel.setText(_translate("configTypeSelection", "Phantom:")) + self.image_path_input.setText(_translate("configTypeSelection", "Sample filename ")) + self.phantom_path_input.setText(_translate("configTypeSelection", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("configTypeSelection", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("configTypeSelection", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("configTypeSelection", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("configTypeSelection", "Visualization / Export")) + self.back_button.setText(_translate("configTypeSelection", "Back")) + self.config_type_label.setText(_translate("configTypeSelection", "Select Configuration Type:")) + self.accept_config_button.setText(_translate("configTypeSelection", "Accept")) diff --git a/src/qus/config_loading/ui/custom_params_ui.py b/src/qus/config_loading/ui/custom_params_ui.py new file mode 100644 index 0000000..234c9bf --- /dev/null +++ b/src/qus/config_loading/ui/custom_params_ui.py @@ -0,0 +1,352 @@ +# Form implementation generated from reading ui file 'src\qus\config_loading\ui\custom_params.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_customParams(object): + def setupUi(self, customParams): + customParams.setObjectName("customParams") + customParams.resize(1284, 803) + customParams.setMinimumSize(QtCore.QSize(0, 0)) + customParams.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=customParams) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(60, 20, 951, 731)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.custom_params_layout = QtWidgets.QVBoxLayout() + self.custom_params_layout.setContentsMargins(10, 30, 10, 30) + self.custom_params_layout.setSpacing(30) + self.custom_params_layout.setObjectName("custom_params_layout") + self.custom_params_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.custom_params_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.custom_params_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.custom_params_label.setScaledContents(False) + self.custom_params_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.custom_params_label.setWordWrap(True) + self.custom_params_label.setObjectName("custom_params_label") + self.custom_params_layout.addWidget(self.custom_params_label) + self.scrollArea = QtWidgets.QScrollArea(parent=self.horizontalLayoutWidget_4) + self.scrollArea.setWidgetResizable(True) + self.scrollArea.setObjectName("scrollArea") + self.scrollAreaWidgetContents = QtWidgets.QWidget() + self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 449, 443)) + self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") + self.scrollAreaLayout = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents) + self.scrollAreaLayout.setObjectName("scrollAreaLayout") + self.frequencyGroup = QtWidgets.QGroupBox(parent=self.scrollAreaWidgetContents) + self.frequencyGroup.setObjectName("frequencyGroup") + self.frequencyLayout = QtWidgets.QGridLayout(self.frequencyGroup) + self.frequencyLayout.setObjectName("frequencyLayout") + self.freq1Label = QtWidgets.QLabel(parent=self.frequencyGroup) + self.freq1Label.setObjectName("freq1Label") + self.frequencyLayout.addWidget(self.freq1Label, 0, 0, 1, 1) + self.freq1Start = QtWidgets.QLineEdit(parent=self.frequencyGroup) + self.freq1Start.setObjectName("freq1Start") + self.frequencyLayout.addWidget(self.freq1Start, 0, 1, 1, 1) + self.freq1End = QtWidgets.QLineEdit(parent=self.frequencyGroup) + self.freq1End.setObjectName("freq1End") + self.frequencyLayout.addWidget(self.freq1End, 0, 2, 1, 1) + self.freq2Label = QtWidgets.QLabel(parent=self.frequencyGroup) + self.freq2Label.setObjectName("freq2Label") + self.frequencyLayout.addWidget(self.freq2Label, 1, 0, 1, 1) + self.freq2Start = QtWidgets.QLineEdit(parent=self.frequencyGroup) + self.freq2Start.setObjectName("freq2Start") + self.frequencyLayout.addWidget(self.freq2Start, 1, 1, 1, 1) + self.freq2End = QtWidgets.QLineEdit(parent=self.frequencyGroup) + self.freq2End.setObjectName("freq2End") + self.frequencyLayout.addWidget(self.freq2End, 1, 2, 1, 1) + self.scrollAreaLayout.addWidget(self.frequencyGroup) + self.windowGroup = QtWidgets.QGroupBox(parent=self.scrollAreaWidgetContents) + self.windowGroup.setObjectName("windowGroup") + self.windowLayout = QtWidgets.QGridLayout(self.windowGroup) + self.windowLayout.setObjectName("windowLayout") + self.windowSizeLabel = QtWidgets.QLabel(parent=self.windowGroup) + self.windowSizeLabel.setObjectName("windowSizeLabel") + self.windowLayout.addWidget(self.windowSizeLabel, 0, 0, 1, 1) + self.windowSize = QtWidgets.QLineEdit(parent=self.windowGroup) + self.windowSize.setObjectName("windowSize") + self.windowLayout.addWidget(self.windowSize, 0, 1, 1, 1) + self.overlapLabel = QtWidgets.QLabel(parent=self.windowGroup) + self.overlapLabel.setObjectName("overlapLabel") + self.windowLayout.addWidget(self.overlapLabel, 1, 0, 1, 1) + self.overlap = QtWidgets.QLineEdit(parent=self.windowGroup) + self.overlap.setObjectName("overlap") + self.windowLayout.addWidget(self.overlap, 1, 1, 1, 1) + self.scrollAreaLayout.addWidget(self.windowGroup) + self.analysisGroup = QtWidgets.QGroupBox(parent=self.scrollAreaWidgetContents) + self.analysisGroup.setObjectName("analysisGroup") + self.analysisLayout = QtWidgets.QGridLayout(self.analysisGroup) + self.analysisLayout.setObjectName("analysisLayout") + self.samplingLabel = QtWidgets.QLabel(parent=self.analysisGroup) + self.samplingLabel.setObjectName("samplingLabel") + self.analysisLayout.addWidget(self.samplingLabel, 0, 0, 1, 1) + self.samplingRate = QtWidgets.QLineEdit(parent=self.analysisGroup) + self.samplingRate.setObjectName("samplingRate") + self.analysisLayout.addWidget(self.samplingRate, 0, 1, 1, 1) + self.depthLabel = QtWidgets.QLabel(parent=self.analysisGroup) + self.depthLabel.setObjectName("depthLabel") + self.analysisLayout.addWidget(self.depthLabel, 1, 0, 1, 1) + self.depth = QtWidgets.QLineEdit(parent=self.analysisGroup) + self.depth.setObjectName("depth") + self.analysisLayout.addWidget(self.depth, 1, 1, 1, 1) + self.scrollAreaLayout.addWidget(self.analysisGroup) + self.scrollArea.setWidget(self.scrollAreaWidgetContents) + self.custom_params_layout.addWidget(self.scrollArea) + self.accept_params_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_params_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_params_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_params_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_params_button.setObjectName("accept_params_button") + self.custom_params_layout.addWidget(self.accept_params_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.custom_params_layout.addItem(spacerItem2) + self.custom_params_layout.setStretch(0, 1) + self.custom_params_layout.setStretch(1, 10) + self.custom_params_layout.setStretch(2, 1) + self.custom_params_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.custom_params_layout) + + self.retranslateUi(customParams) + QtCore.QMetaObject.connectSlotsByName(customParams) + + def retranslateUi(self, customParams): + _translate = QtCore.QCoreApplication.translate + customParams.setWindowTitle(_translate("customParams", "Custom Parameters Configuration")) + self.sidebar.setToolTip(_translate("customParams", "


")) + self.imageSelectionLabelSidebar.setText(_translate("customParams", "Image Selection:")) + self.imageLabel.setText(_translate("customParams", "Image:")) + self.phantomLabel.setText(_translate("customParams", "Phantom:")) + self.image_path_input.setText(_translate("customParams", "Sample filename ")) + self.phantom_path_input.setText(_translate("customParams", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("customParams", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("customParams", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("customParams", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("customParams", "Visualization / Export")) + self.back_button.setText(_translate("customParams", "Back")) + self.custom_params_label.setText(_translate("customParams", "Custom Parameters Configuration")) + self.frequencyGroup.setTitle(_translate("customParams", "Frequency Bands")) + self.freq1Label.setText(_translate("customParams", "Band 1 (MHz):")) + self.freq1Start.setPlaceholderText(_translate("customParams", "Start")) + self.freq1End.setPlaceholderText(_translate("customParams", "End")) + self.freq2Label.setText(_translate("customParams", "Band 2 (MHz):")) + self.freq2Start.setPlaceholderText(_translate("customParams", "Start")) + self.freq2End.setPlaceholderText(_translate("customParams", "End")) + self.windowGroup.setTitle(_translate("customParams", "Window Parameters")) + self.windowSizeLabel.setText(_translate("customParams", "Window Size (pixels):")) + self.windowSize.setPlaceholderText(_translate("customParams", "e.g., 64")) + self.overlapLabel.setText(_translate("customParams", "Overlap (%):")) + self.overlap.setPlaceholderText(_translate("customParams", "e.g., 50")) + self.analysisGroup.setTitle(_translate("customParams", "Analysis Parameters")) + self.samplingLabel.setText(_translate("customParams", "Sampling Rate (MHz):")) + self.samplingRate.setPlaceholderText(_translate("customParams", "e.g., 40")) + self.depthLabel.setText(_translate("customParams", "Depth (mm):")) + self.depth.setPlaceholderText(_translate("customParams", "e.g., 30")) + self.accept_params_button.setText(_translate("customParams", "Accept")) diff --git a/src/qus/export_loading/ui/export_loading_ui.py b/src/qus/export_loading/ui/export_loading_ui.py new file mode 100644 index 0000000..34e66b2 --- /dev/null +++ b/src/qus/export_loading/ui/export_loading_ui.py @@ -0,0 +1,273 @@ +# Form implementation generated from reading ui file 'src\qus\export_loading\ui\export_loading.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_exportLoading(object): + def setupUi(self, exportLoading): + exportLoading.setObjectName("exportLoading") + exportLoading.setMinimumSize(QtCore.QSize(1400, 662)) + exportLoading.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(exportLoading) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=exportLoading) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(200, 41)) + self.back_button.setMaximumSize(QtCore.QSize(200, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.export_loading_layout = QtWidgets.QVBoxLayout() + self.export_loading_layout.setContentsMargins(20, 20, 20, 20) + self.export_loading_layout.setSpacing(10) + self.export_loading_layout.setObjectName("export_loading_layout") + self.title_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.title_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.title_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.title_label.setScaledContents(False) + self.title_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.title_label.setWordWrap(False) + self.title_label.setObjectName("title_label") + self.export_loading_layout.addWidget(self.title_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.export_stack = QtWidgets.QStackedWidget(parent=self.horizontalLayoutWidget_4) + self.export_stack.setStyleSheet("QStackedWidget {\n" +" background-color: transparent;\n" +"}") + self.export_stack.setObjectName("export_stack") + self.export_loading_layout.addWidget(self.export_stack) + self.execute_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.execute_button.setMinimumSize(QtCore.QSize(250, 41)) + self.execute_button.setMaximumSize(QtCore.QSize(250, 41)) + self.execute_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(0, 150, 0);\n" +" border-radius: 15px;\n" +"}") + self.execute_button.setObjectName("execute_button") + self.export_loading_layout.addWidget(self.execute_button) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.export_loading_layout.addItem(spacerItem2) + self.export_loading_layout.setStretch(0, 1) + self.export_loading_layout.setStretch(1, 10) + self.export_loading_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.export_loading_layout) + self.main_layout.addWidget(self.horizontalLayoutWidget_4) + + self.retranslateUi(exportLoading) + QtCore.QMetaObject.connectSlotsByName(exportLoading) + + def retranslateUi(self, exportLoading): + _translate = QtCore.QCoreApplication.translate + exportLoading.setWindowTitle(_translate("exportLoading", "Data Export")) + self.sidebar.setToolTip(_translate("exportLoading", "


")) + self.imageSelectionLabelSidebar.setText(_translate("exportLoading", "Image Selection:")) + self.imageLabel.setText(_translate("exportLoading", "Image:")) + self.phantomLabel.setText(_translate("exportLoading", "Phantom:")) + self.image_path_input.setText(_translate("exportLoading", "Sample filename ")) + self.phantom_path_input.setText(_translate("exportLoading", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("exportLoading", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("exportLoading", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("exportLoading", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("exportLoading", "Visualization / Export")) + self.back_button.setText(_translate("exportLoading", "Back")) + self.title_label.setText(_translate("exportLoading", "Data Export Configuration")) + self.execute_button.setText(_translate("exportLoading", "Execute Export")) diff --git a/src/qus/image_loading/ui/file_selection_ui.py b/src/qus/image_loading/ui/file_selection_ui.py new file mode 100644 index 0000000..2d4a308 --- /dev/null +++ b/src/qus/image_loading/ui/file_selection_ui.py @@ -0,0 +1,411 @@ +# Form implementation generated from reading ui file 'src\qus\image_loading\ui\file_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_selectImage(object): + def setupUi(self, selectImage): + selectImage.setObjectName("selectImage") + selectImage.resize(1418, 832) + selectImage.setMinimumSize(QtCore.QSize(201, 31)) + selectImage.setMaximumSize(QtCore.QSize(16777215, 16777215)) + selectImage.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget = QtWidgets.QWidget(parent=selectImage) + self.horizontalLayoutWidget.setGeometry(QtCore.QRect(70, 10, 1545, 844)) + self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget) + self.gridFrame.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.img_selection_layout = QtWidgets.QVBoxLayout() + self.img_selection_layout.setContentsMargins(30, 30, 30, 30) + self.img_selection_layout.setSpacing(20) + self.img_selection_layout.setObjectName("img_selection_layout") + self.select_data_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.select_data_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_data_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_data_label.setScaledContents(False) + self.select_data_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_data_label.setWordWrap(True) + self.select_data_label.setObjectName("select_data_label") + self.img_selection_layout.addWidget(self.select_data_label) + self.chooseImgPhantLayout = QtWidgets.QHBoxLayout() + self.chooseImgPhantLayout.setObjectName("chooseImgPhantLayout") + self.chooseImgLayout = QtWidgets.QVBoxLayout() + self.chooseImgLayout.setContentsMargins(20, -1, 20, -1) + self.chooseImgLayout.setObjectName("chooseImgLayout") + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem2) + self.image_path_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.image_path_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.image_path_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.image_path_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.image_path_label.setObjectName("image_path_label") + self.chooseImgLayout.addWidget(self.image_path_label) + self.image_path_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget) + self.image_path_input.setMinimumSize(QtCore.QSize(201, 31)) + self.image_path_input.setMaximumSize(QtCore.QSize(401, 31)) + self.image_path_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.image_path_input.setObjectName("image_path_input") + self.chooseImgLayout.addWidget(self.image_path_input, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.chooseImageButtonsLayout = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout.setObjectName("chooseImageButtonsLayout") + self.choose_image_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.choose_image_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_image_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_image_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_image_path_button.setObjectName("choose_image_path_button") + self.chooseImageButtonsLayout.addWidget(self.choose_image_path_button) + self.clear_image_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.clear_image_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_image_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_image_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_image_path_button.setObjectName("clear_image_path_button") + self.chooseImageButtonsLayout.addWidget(self.clear_image_path_button) + self.chooseImgLayout.addLayout(self.chooseImageButtonsLayout) + spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem3) + self.chooseImgPhantLayout.addLayout(self.chooseImgLayout) + self.choosePhantomLayout = QtWidgets.QVBoxLayout() + self.choosePhantomLayout.setContentsMargins(20, -1, 20, -1) + self.choosePhantomLayout.setObjectName("choosePhantomLayout") + spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.choosePhantomLayout.addItem(spacerItem4) + self.phantom_path_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.phantom_path_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.phantom_path_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantom_path_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.phantom_path_label.setObjectName("phantom_path_label") + self.choosePhantomLayout.addWidget(self.phantom_path_label) + self.phantom_path_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget) + self.phantom_path_input.setMinimumSize(QtCore.QSize(201, 31)) + self.phantom_path_input.setMaximumSize(QtCore.QSize(401, 31)) + self.phantom_path_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.phantom_path_input.setObjectName("phantom_path_input") + self.choosePhantomLayout.addWidget(self.phantom_path_input, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.choosePhantomButtonsLayout = QtWidgets.QHBoxLayout() + self.choosePhantomButtonsLayout.setObjectName("choosePhantomButtonsLayout") + self.choose_phantom_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.choose_phantom_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_phantom_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_phantom_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_phantom_path_button.setObjectName("choose_phantom_path_button") + self.choosePhantomButtonsLayout.addWidget(self.choose_phantom_path_button) + self.clear_phantom_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.clear_phantom_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_phantom_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_phantom_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_phantom_path_button.setObjectName("clear_phantom_path_button") + self.choosePhantomButtonsLayout.addWidget(self.clear_phantom_path_button) + self.choosePhantomLayout.addLayout(self.choosePhantomButtonsLayout) + spacerItem5 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.choosePhantomLayout.addItem(spacerItem5) + self.chooseImgPhantLayout.addLayout(self.choosePhantomLayout) + self.img_selection_layout.addLayout(self.chooseImgPhantLayout) + self.loading_options_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.loading_options_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_options_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.loading_options_label.setScaledContents(False) + self.loading_options_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_options_label.setWordWrap(True) + self.loading_options_label.setObjectName("loading_options_label") + self.img_selection_layout.addWidget(self.loading_options_label) + self.loading_options_table = QtWidgets.QTableWidget(parent=self.horizontalLayoutWidget) + self.loading_options_table.setStyleSheet("QTableWidget {\n" +" background: rgb(108, 108, 108);\n" +" color: white;\n" +"}") + self.loading_options_table.setDragEnabled(False) + self.loading_options_table.setRowCount(0) + self.loading_options_table.setColumnCount(0) + self.loading_options_table.setObjectName("loading_options_table") + self.loading_options_table.horizontalHeader().setCascadingSectionResizes(False) + self.img_selection_layout.addWidget(self.loading_options_table) + self.generate_image_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.generate_image_button.setMinimumSize(QtCore.QSize(131, 41)) + self.generate_image_button.setMaximumSize(QtCore.QSize(131, 41)) + self.generate_image_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.generate_image_button.setObjectName("generate_image_button") + self.img_selection_layout.addWidget(self.generate_image_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.loading_screen_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.loading_screen_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_screen_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_screen_label.setObjectName("loading_screen_label") + self.img_selection_layout.addWidget(self.loading_screen_label) + self.select_image_error_msg = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.select_image_error_msg.setStyleSheet("QLabel {\n" +" color: rgb(255, 0, 23);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_image_error_msg.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_image_error_msg.setObjectName("select_image_error_msg") + self.img_selection_layout.addWidget(self.select_image_error_msg) + self.img_selection_layout.setStretch(0, 2) + self.img_selection_layout.setStretch(1, 2) + self.img_selection_layout.setStretch(4, 3) + self.img_selection_layout.setStretch(6, 2) + self.full_screen_layout.addLayout(self.img_selection_layout) + self.full_screen_layout.setStretch(0, 1) + self.full_screen_layout.setStretch(1, 5) + + self.retranslateUi(selectImage) + QtCore.QMetaObject.connectSlotsByName(selectImage) + + def retranslateUi(self, selectImage): + _translate = QtCore.QCoreApplication.translate + selectImage.setWindowTitle(_translate("selectImage", "Select Ultrasound Image")) + self.sidebar.setToolTip(_translate("selectImage", "


")) + self.imageSelectionLabelSidebar.setText(_translate("selectImage", "Image Selection:")) + self.imageLabel.setText(_translate("selectImage", "Image:")) + self.phantomLabel.setText(_translate("selectImage", "Phantom:")) + self.roiSidebarLabel.setText(_translate("selectImage", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("selectImage", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("selectImage", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("selectImage", "Analysis Parameter Selection")) + self.back_button.setText(_translate("selectImage", "Back")) + self.select_data_label.setText(_translate("selectImage", "Select Data and Phantom Files to Generate Ultrasound Image:")) + self.image_path_label.setText(_translate("selectImage", "Input Path to Image file\n" +" (.rf, .rfd, .mat, .bin)")) + self.choose_image_path_button.setText(_translate("selectImage", "Choose File")) + self.clear_image_path_button.setText(_translate("selectImage", "Clear Path")) + self.phantom_path_label.setText(_translate("selectImage", "Input Path to Phantom file\n" +" (.rf, .rfd, .mat, .bin)")) + self.choose_phantom_path_button.setText(_translate("selectImage", "Choose File")) + self.clear_phantom_path_button.setText(_translate("selectImage", "Clear Path")) + self.loading_options_label.setText(_translate("selectImage", "\n" +"Image Loading Options:")) + self.loading_options_table.setSortingEnabled(False) + self.generate_image_button.setText(_translate("selectImage", "Generate Image")) + self.loading_screen_label.setText(_translate("selectImage", "LOADING....")) + self.select_image_error_msg.setText(_translate("selectImage", "ERROR: At least one dimension of phantom data\n" +"smaller than corresponding dimension\n" +"of image data")) diff --git a/src/qus/image_loading/ui/scan_type_ui.py b/src/qus/image_loading/ui/scan_type_ui.py new file mode 100644 index 0000000..a67c1c1 --- /dev/null +++ b/src/qus/image_loading/ui/scan_type_ui.py @@ -0,0 +1,247 @@ +# Form implementation generated from reading ui file 'src\qus\image_loading\ui\scan_type.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_selectImage(object): + def setupUi(self, selectImage): + selectImage.setObjectName("selectImage") + selectImage.resize(1512, 832) + selectImage.setMinimumSize(QtCore.QSize(201, 31)) + selectImage.setMaximumSize(QtCore.QSize(16777215, 16777215)) + selectImage.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget = QtWidgets.QWidget(parent=selectImage) + self.horizontalLayoutWidget.setGeometry(QtCore.QRect(70, 10, 1545, 844)) + self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget) + self.gridFrame.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.select_type_layout = QtWidgets.QVBoxLayout() + self.select_type_layout.setContentsMargins(30, -1, 30, -1) + self.select_type_layout.setSpacing(50) + self.select_type_layout.setObjectName("select_type_layout") + self.select_type_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget) + self.select_type_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_type_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_type_label.setScaledContents(False) + self.select_type_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_type_label.setWordWrap(True) + self.select_type_label.setObjectName("select_type_label") + self.select_type_layout.addWidget(self.select_type_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.scan_type_dropdown = QtWidgets.QComboBox(parent=self.horizontalLayoutWidget) + self.scan_type_dropdown.setMinimumSize(QtCore.QSize(180, 41)) + self.scan_type_dropdown.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setPointSize(16) + self.scan_type_dropdown.setFont(font) + self.scan_type_dropdown.setStyleSheet("QComboBox {\n" +" color: white;\n" +"}") + self.scan_type_dropdown.setObjectName("scan_type_dropdown") + self.select_type_layout.addWidget(self.scan_type_dropdown) + self.accept_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget) + self.accept_type_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_type_button.setObjectName("accept_type_button") + self.select_type_layout.addWidget(self.accept_type_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.select_type_layout.addItem(spacerItem1) + self.select_type_layout.setStretch(0, 2) + self.select_type_layout.setStretch(1, 2) + self.select_type_layout.setStretch(2, 2) + self.select_type_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.select_type_layout) + self.full_screen_layout.setStretch(0, 1) + self.full_screen_layout.setStretch(1, 5) + + self.retranslateUi(selectImage) + QtCore.QMetaObject.connectSlotsByName(selectImage) + + def retranslateUi(self, selectImage): + _translate = QtCore.QCoreApplication.translate + selectImage.setWindowTitle(_translate("selectImage", "Select Ultrasound Image")) + self.sidebar.setToolTip(_translate("selectImage", "


")) + self.imageSelectionLabelSidebar.setText(_translate("selectImage", "Image Selection:")) + self.imageLabel.setText(_translate("selectImage", "Image:")) + self.phantomLabel.setText(_translate("selectImage", "Phantom:")) + self.roiSidebarLabel.setText(_translate("selectImage", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("selectImage", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("selectImage", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("selectImage", "Analysis Parameter Selection")) + self.select_type_label.setText(_translate("selectImage", "Select Data Type:")) + self.accept_type_button.setText(_translate("selectImage", "Accept")) diff --git a/src/qus/seg_loading/ui/frame_selection_ui.py b/src/qus/seg_loading/ui/frame_selection_ui.py new file mode 100644 index 0000000..9c9a1cc --- /dev/null +++ b/src/qus/seg_loading/ui/frame_selection_ui.py @@ -0,0 +1,326 @@ +# Form implementation generated from reading ui file 'src\qus\seg_loading\ui\frame_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_constructRoi(object): + def setupUi(self, constructRoi): + constructRoi.setObjectName("constructRoi") + constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) + constructRoi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(constructRoi) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=constructRoi) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.frame_preview_layout = QtWidgets.QVBoxLayout() + self.frame_preview_layout.setContentsMargins(30, 30, 30, 30) + self.frame_preview_layout.setSpacing(10) + self.frame_preview_layout.setObjectName("frame_preview_layout") + self.select_frame_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.select_frame_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_frame_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_frame_label.setScaledContents(False) + self.select_frame_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_frame_label.setWordWrap(True) + self.select_frame_label.setObjectName("select_frame_label") + self.frame_preview_layout.addWidget(self.select_frame_label) + self.im_display_frame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(10) + sizePolicy.setVerticalStretch(10) + sizePolicy.setHeightForWidth(self.im_display_frame.sizePolicy().hasHeightForWidth()) + self.im_display_frame.setSizePolicy(sizePolicy) + self.im_display_frame.setMinimumSize(QtCore.QSize(501, 321)) + self.im_display_frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.im_display_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.im_display_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.im_display_frame.setObjectName("im_display_frame") + self.frame_preview_layout.addWidget(self.im_display_frame) + self.frameControlsLayout = QtWidgets.QHBoxLayout() + self.frameControlsLayout.setSpacing(10) + self.frameControlsLayout.setObjectName("frameControlsLayout") + self.frame_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.frame_slider.setMinimumSize(QtCore.QSize(251, 41)) + self.frame_slider.setMaximumSize(QtCore.QSize(251, 41)) + self.frame_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.frame_slider.setObjectName("frame_slider") + self.frameControlsLayout.addWidget(self.frame_slider) + self.cur_frame_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_frame_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_frame_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.cur_frame_label.setScaledContents(False) + self.cur_frame_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_frame_label.setWordWrap(True) + self.cur_frame_label.setObjectName("cur_frame_label") + self.frameControlsLayout.addWidget(self.cur_frame_label) + self.of_frames_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.of_frames_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.of_frames_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.of_frames_label.setScaledContents(False) + self.of_frames_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.of_frames_label.setWordWrap(True) + self.of_frames_label.setObjectName("of_frames_label") + self.frameControlsLayout.addWidget(self.of_frames_label) + self.total_frames_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.total_frames_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.total_frames_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.total_frames_label.setScaledContents(False) + self.total_frames_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.total_frames_label.setWordWrap(True) + self.total_frames_label.setObjectName("total_frames_label") + self.frameControlsLayout.addWidget(self.total_frames_label) + self.accept_frame_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_frame_button.setMinimumSize(QtCore.QSize(201, 41)) + self.accept_frame_button.setMaximumSize(QtCore.QSize(201, 41)) + self.accept_frame_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_frame_button.setObjectName("accept_frame_button") + self.frameControlsLayout.addWidget(self.accept_frame_button) + self.frame_preview_layout.addLayout(self.frameControlsLayout) + self.frame_preview_layout.setStretch(0, 1) + self.frame_preview_layout.setStretch(2, 1) + self.full_screen_layout.addLayout(self.frame_preview_layout) + self.main_layout.addWidget(self.horizontalLayoutWidget_4) + + self.retranslateUi(constructRoi) + QtCore.QMetaObject.connectSlotsByName(constructRoi) + + def retranslateUi(self, constructRoi): + _translate = QtCore.QCoreApplication.translate + constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("constructRoi", "


")) + self.imageSelectionLabelSidebar.setText(_translate("constructRoi", "Image Selection:")) + self.imageLabel.setText(_translate("constructRoi", "Image:")) + self.phantomLabel.setText(_translate("constructRoi", "Phantom:")) + self.image_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.phantom_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("constructRoi", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) + self.back_button.setText(_translate("constructRoi", "Back")) + self.select_frame_label.setText(_translate("constructRoi", "Select Frame to Segment:")) + self.cur_frame_label.setText(_translate("constructRoi", "0")) + self.of_frames_label.setText(_translate("constructRoi", "of")) + self.total_frames_label.setText(_translate("constructRoi", "0")) + self.accept_frame_button.setText(_translate("constructRoi", "Accept Frame")) diff --git a/src/qus/seg_loading/ui/roi_drawing_ui.py b/src/qus/seg_loading/ui/roi_drawing_ui.py new file mode 100644 index 0000000..fe15aa0 --- /dev/null +++ b/src/qus/seg_loading/ui/roi_drawing_ui.py @@ -0,0 +1,916 @@ +# Form implementation generated from reading ui file 'src\qus\seg_loading\ui\roi_drawing.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_constructRoi(object): + def setupUi(self, constructRoi): + constructRoi.setObjectName("constructRoi") + constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) + constructRoi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(constructRoi) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=constructRoi) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.loading_screen_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.loading_screen_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_screen_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_screen_label.setObjectName("loading_screen_label") + self.side_bar_layout.addWidget(self.loading_screen_label) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.draw_roi_layout = QtWidgets.QVBoxLayout() + self.draw_roi_layout.setContentsMargins(30, 10, 30, 10) + self.draw_roi_layout.setSpacing(10) + self.draw_roi_layout.setObjectName("draw_roi_layout") + self.draw_roi_heading_layout = QtWidgets.QVBoxLayout() + self.draw_roi_heading_layout.setSpacing(5) + self.draw_roi_heading_layout.setObjectName("draw_roi_heading_layout") + self.draw_roi_title_layout = QtWidgets.QHBoxLayout() + self.draw_roi_title_layout.setObjectName("draw_roi_title_layout") + self.pix_dim_layout_cm = QtWidgets.QVBoxLayout() + self.pix_dim_layout_cm.setObjectName("pix_dim_layout_cm") + self.physical_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_dims_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_dims_label.setScaledContents(False) + self.physical_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.physical_dims_label.setWordWrap(True) + self.physical_dims_label.setObjectName("physical_dims_label") + self.pix_dim_layout_cm.addWidget(self.physical_dims_label) + self.pix_dim_grid_cm = QtWidgets.QGridLayout() + self.pix_dim_grid_cm.setObjectName("pix_dim_grid_cm") + self.physical_depth_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_depth_label.setMinimumSize(QtCore.QSize(129, 0)) + self.physical_depth_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_depth_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_depth_label.setScaledContents(False) + self.physical_depth_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_depth_label.setWordWrap(True) + self.physical_depth_label.setObjectName("physical_depth_label") + self.pix_dim_grid_cm.addWidget(self.physical_depth_label, 1, 0, 1, 1) + self.physical_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_width_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_width_val.setScaledContents(False) + self.physical_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_width_val.setWordWrap(True) + self.physical_width_val.setObjectName("physical_width_val") + self.pix_dim_grid_cm.addWidget(self.physical_width_val, 0, 1, 1, 1) + self.physical_depth_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_depth_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_depth_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_depth_val.setScaledContents(False) + self.physical_depth_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_depth_val.setWordWrap(True) + self.physical_depth_val.setObjectName("physical_depth_val") + self.pix_dim_grid_cm.addWidget(self.physical_depth_val, 1, 1, 1, 1) + self.physical_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_width_label.setMinimumSize(QtCore.QSize(129, 0)) + self.physical_width_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_width_label.setScaledContents(False) + self.physical_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_width_label.setWordWrap(True) + self.physical_width_label.setObjectName("physical_width_label") + self.pix_dim_grid_cm.addWidget(self.physical_width_label, 0, 0, 1, 1) + self.pix_dim_layout_cm.addLayout(self.pix_dim_grid_cm) + self.pix_dim_layout_cm.setStretch(0, 1) + self.pix_dim_layout_cm.setStretch(1, 2) + self.draw_roi_title_layout.addLayout(self.pix_dim_layout_cm) + self.construct_roi_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.construct_roi_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.construct_roi_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.construct_roi_label.setScaledContents(False) + self.construct_roi_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.construct_roi_label.setWordWrap(True) + self.construct_roi_label.setObjectName("construct_roi_label") + self.draw_roi_title_layout.addWidget(self.construct_roi_label) + self.pix_dim_layout = QtWidgets.QVBoxLayout() + self.pix_dim_layout.setObjectName("pix_dim_layout") + self.pixel_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_dims_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_dims_label.setScaledContents(False) + self.pixel_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.pixel_dims_label.setWordWrap(True) + self.pixel_dims_label.setObjectName("pixel_dims_label") + self.pix_dim_layout.addWidget(self.pixel_dims_label) + self.pix_dim_grid = QtWidgets.QGridLayout() + self.pix_dim_grid.setObjectName("pix_dim_grid") + self.pixel_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_width_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_width_label.setScaledContents(False) + self.pixel_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_width_label.setWordWrap(True) + self.pixel_width_label.setObjectName("pixel_width_label") + self.pix_dim_grid.addWidget(self.pixel_width_label, 0, 0, 1, 1) + self.pixel_depth_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_depth_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_depth_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_depth_label.setScaledContents(False) + self.pixel_depth_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_depth_label.setWordWrap(True) + self.pixel_depth_label.setObjectName("pixel_depth_label") + self.pix_dim_grid.addWidget(self.pixel_depth_label, 1, 0, 1, 1) + self.pixel_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_width_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_width_val.setScaledContents(False) + self.pixel_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_width_val.setWordWrap(True) + self.pixel_width_val.setObjectName("pixel_width_val") + self.pix_dim_grid.addWidget(self.pixel_width_val, 0, 1, 1, 1) + self.pixel_depth_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.pixel_depth_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.pixel_depth_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.pixel_depth_val.setScaledContents(False) + self.pixel_depth_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.pixel_depth_val.setWordWrap(True) + self.pixel_depth_val.setObjectName("pixel_depth_val") + self.pix_dim_grid.addWidget(self.pixel_depth_val, 1, 1, 1, 1) + self.pix_dim_layout.addLayout(self.pix_dim_grid) + self.pix_dim_layout.setStretch(0, 1) + self.pix_dim_layout.setStretch(1, 2) + self.draw_roi_title_layout.addLayout(self.pix_dim_layout) + self.draw_roi_title_layout.setStretch(0, 1) + self.draw_roi_title_layout.setStretch(1, 2) + self.draw_roi_title_layout.setStretch(2, 1) + self.draw_roi_heading_layout.addLayout(self.draw_roi_title_layout) + self.draw_roi_layout.addLayout(self.draw_roi_heading_layout) + self.brightness_control_layout = QtWidgets.QHBoxLayout() + self.brightness_control_layout.setSpacing(10) + self.brightness_control_layout.setObjectName("brightness_control_layout") + self.brightness_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.brightness_label.setMinimumSize(QtCore.QSize(80, 41)) + self.brightness_label.setMaximumSize(QtCore.QSize(80, 41)) + self.brightness_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.brightness_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.brightness_label.setObjectName("brightness_label") + self.brightness_control_layout.addWidget(self.brightness_label) + self.brightness_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.brightness_slider.setMinimumSize(QtCore.QSize(200, 41)) + self.brightness_slider.setMaximumSize(QtCore.QSize(200, 41)) + self.brightness_slider.setStyleSheet("QSlider::groove:horizontal {\n" +" border: 1px solid #999999;\n" +" height: 8px;\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4);\n" +" margin: 2px 0;\n" +"}\n" +"QSlider::handle:horizontal {\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);\n" +" border: 1px solid #5c5c5c;\n" +" width: 18px;\n" +" margin: 2px 0;\n" +" border-radius: 3px;\n" +"}") + self.brightness_slider.setMinimum(0) + self.brightness_slider.setMaximum(100) + self.brightness_slider.setProperty("value", 0) + self.brightness_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.brightness_slider.setObjectName("brightness_slider") + self.brightness_control_layout.addWidget(self.brightness_slider) + self.brightness_value_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.brightness_value_label.setMinimumSize(QtCore.QSize(40, 41)) + self.brightness_value_label.setMaximumSize(QtCore.QSize(40, 41)) + self.brightness_value_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.brightness_value_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.brightness_value_label.setObjectName("brightness_value_label") + self.brightness_control_layout.addWidget(self.brightness_value_label) + self.draw_roi_layout.addLayout(self.brightness_control_layout) + self.overlay_control_layout = QtWidgets.QHBoxLayout() + self.overlay_control_layout.setSpacing(10) + self.overlay_control_layout.setObjectName("overlay_control_layout") + self.dicom_overlay_checkbox = QtWidgets.QCheckBox(parent=self.horizontalLayoutWidget_4) + self.dicom_overlay_checkbox.setMinimumSize(QtCore.QSize(200, 41)) + self.dicom_overlay_checkbox.setMaximumSize(QtCore.QSize(200, 41)) + self.dicom_overlay_checkbox.setStyleSheet("QCheckBox {\n" +" color: rgb(255, 255, 255);\n" +" font-size: 15px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}\n" +"QCheckBox::indicator {\n" +" width: 20px;\n" +" height: 20px;\n" +" border-radius: 10px;\n" +" background-color: rgb(90, 37, 255);\n" +" border: 2px solid rgb(255, 255, 255);\n" +"}\n" +"QCheckBox::indicator:checked {\n" +" background-color: rgb(90, 37, 255);\n" +" border: 2px solid rgb(255, 255, 255);\n" +"}") + self.dicom_overlay_checkbox.setObjectName("dicom_overlay_checkbox") + self.overlay_control_layout.addWidget(self.dicom_overlay_checkbox) + self.transparency_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.transparency_label.setMinimumSize(QtCore.QSize(100, 41)) + self.transparency_label.setMaximumSize(QtCore.QSize(100, 41)) + self.transparency_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.transparency_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.transparency_label.setObjectName("transparency_label") + self.overlay_control_layout.addWidget(self.transparency_label) + self.transparency_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.transparency_slider.setMinimumSize(QtCore.QSize(200, 41)) + self.transparency_slider.setMaximumSize(QtCore.QSize(200, 41)) + self.transparency_slider.setStyleSheet("QSlider::groove:horizontal {\n" +" border: 1px solid #999999;\n" +" height: 8px;\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 #B1B1B1, stop:1 #c4c4c4);\n" +" margin: 2px 0;\n" +"}\n" +"QSlider::handle:horizontal {\n" +" background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);\n" +" border: 1px solid #5c5c5c;\n" +" width: 18px;\n" +" margin: 2px 0;\n" +" border-radius: 3px;\n" +"}") + self.transparency_slider.setMinimum(0) + self.transparency_slider.setMaximum(100) + self.transparency_slider.setProperty("value", 50) + self.transparency_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.transparency_slider.setObjectName("transparency_slider") + self.overlay_control_layout.addWidget(self.transparency_slider) + self.transparency_value_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.transparency_value_label.setMinimumSize(QtCore.QSize(40, 41)) + self.transparency_value_label.setMaximumSize(QtCore.QSize(40, 41)) + self.transparency_value_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.transparency_value_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.transparency_value_label.setObjectName("transparency_value_label") + self.overlay_control_layout.addWidget(self.transparency_value_label) + self.draw_roi_layout.addLayout(self.overlay_control_layout) + self.load_dicom_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.load_dicom_button.setMinimumSize(QtCore.QSize(241, 41)) + self.load_dicom_button.setMaximumSize(QtCore.QSize(241, 41)) + self.load_dicom_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:hover {\n" +" background-color: rgb(120, 67, 255);\n" +"}\n" +"QPushButton:pressed {\n" +" background-color: rgb(60, 17, 195);\n" +"}") + self.load_dicom_button.setObjectName("load_dicom_button") + self.draw_roi_layout.addWidget(self.load_dicom_button) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.back_from_drag_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_drag_button.setMinimumSize(QtCore.QSize(241, 41)) + self.back_from_drag_button.setMaximumSize(QtCore.QSize(241, 41)) + self.back_from_drag_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.back_from_drag_button.setCheckable(True) + self.back_from_drag_button.setChecked(False) + self.back_from_drag_button.setObjectName("back_from_drag_button") + self.horizontalLayout_4.addWidget(self.back_from_drag_button) + self.save_drag_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_drag_button.setMinimumSize(QtCore.QSize(241, 41)) + self.save_drag_button.setMaximumSize(QtCore.QSize(241, 41)) + self.save_drag_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.save_drag_button.setCheckable(True) + self.save_drag_button.setChecked(False) + self.save_drag_button.setObjectName("save_drag_button") + self.horizontalLayout_4.addWidget(self.save_drag_button) + self.draw_roi_layout.addLayout(self.horizontalLayout_4) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.draw_pts_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_pts_type_button.setMinimumSize(QtCore.QSize(221, 41)) + self.draw_pts_type_button.setMaximumSize(QtCore.QSize(221, 41)) + self.draw_pts_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_pts_type_button.setCheckable(True) + self.draw_pts_type_button.setChecked(False) + self.draw_pts_type_button.setObjectName("draw_pts_type_button") + self.horizontalLayout.addWidget(self.draw_pts_type_button) + self.draw_freehand_drag_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_freehand_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) + self.draw_freehand_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) + self.draw_freehand_drag_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_freehand_drag_type_button.setCheckable(False) + self.draw_freehand_drag_type_button.setChecked(False) + self.draw_freehand_drag_type_button.setObjectName("draw_freehand_drag_type_button") + self.horizontalLayout.addWidget(self.draw_freehand_drag_type_button) + self.draw_rect_drag_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_rect_drag_type_button.setMinimumSize(QtCore.QSize(241, 41)) + self.draw_rect_drag_type_button.setMaximumSize(QtCore.QSize(241, 41)) + self.draw_rect_drag_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_rect_drag_type_button.setCheckable(False) + self.draw_rect_drag_type_button.setChecked(False) + self.draw_rect_drag_type_button.setObjectName("draw_rect_drag_type_button") + self.horizontalLayout.addWidget(self.draw_rect_drag_type_button) + self.draw_roi_layout.addLayout(self.horizontalLayout) + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.clear_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_roi_button.setMinimumSize(QtCore.QSize(141, 41)) + self.clear_roi_button.setMaximumSize(QtCore.QSize(141, 41)) + self.clear_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_roi_button.setCheckable(False) + self.clear_roi_button.setObjectName("clear_roi_button") + self.horizontalLayout_3.addWidget(self.clear_roi_button) + self.undo_last_pt_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.undo_last_pt_button.setMinimumSize(QtCore.QSize(141, 41)) + self.undo_last_pt_button.setMaximumSize(QtCore.QSize(141, 41)) + self.undo_last_pt_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.undo_last_pt_button.setCheckable(False) + self.undo_last_pt_button.setObjectName("undo_last_pt_button") + self.horizontalLayout_3.addWidget(self.undo_last_pt_button) + self.close_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.close_roi_button.setMinimumSize(QtCore.QSize(141, 41)) + self.close_roi_button.setMaximumSize(QtCore.QSize(141, 41)) + self.close_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.close_roi_button.setCheckable(False) + self.close_roi_button.setObjectName("close_roi_button") + self.horizontalLayout_3.addWidget(self.close_roi_button) + self.back_from_pts_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_pts_button.setMinimumSize(QtCore.QSize(141, 41)) + self.back_from_pts_button.setMaximumSize(QtCore.QSize(141, 41)) + self.back_from_pts_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_pts_button.setCheckable(False) + self.back_from_pts_button.setObjectName("back_from_pts_button") + self.horizontalLayout_3.addWidget(self.back_from_pts_button) + self.save_pts_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_pts_button.setMinimumSize(QtCore.QSize(141, 41)) + self.save_pts_button.setMaximumSize(QtCore.QSize(141, 41)) + self.save_pts_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_pts_button.setCheckable(False) + self.save_pts_button.setObjectName("save_pts_button") + self.horizontalLayout_3.addWidget(self.save_pts_button) + self.draw_roi_layout.addLayout(self.horizontalLayout_3) + self.save_roi_layout = QtWidgets.QGridLayout() + self.save_roi_layout.setContentsMargins(-1, -1, -1, 10) + self.save_roi_layout.setSpacing(10) + self.save_roi_layout.setObjectName("save_roi_layout") + self.save_folder_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_folder_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_folder_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_folder_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_folder_input.setObjectName("save_folder_input") + self.save_roi_layout.addWidget(self.save_folder_input, 0, 1, 1, 1) + self.dest_folder_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.dest_folder_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.dest_folder_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.dest_folder_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.dest_folder_label.setObjectName("dest_folder_label") + self.save_roi_layout.addWidget(self.dest_folder_label, 0, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.roi_name_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.roi_name_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.roi_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roi_name_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.roi_name_label.setObjectName("roi_name_label") + self.save_roi_layout.addWidget(self.roi_name_label, 2, 0, 1, 1, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.save_name_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_name_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_name_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_name_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_name_input.setObjectName("save_name_input") + self.save_roi_layout.addWidget(self.save_name_input, 2, 1, 1, 1) + self.chooseImageButtonsLayout_2 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_2.setSpacing(10) + self.chooseImageButtonsLayout_2.setObjectName("chooseImageButtonsLayout_2") + self.choose_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_save_folder_button.setObjectName("choose_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.choose_save_folder_button) + self.clear_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_save_folder_button.setObjectName("clear_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.clear_save_folder_button) + self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_2, 0, 2, 1, 1) + self.chooseImageButtonsLayout_4 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_4.setObjectName("chooseImageButtonsLayout_4") + self.save_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_roi_button.setMinimumSize(QtCore.QSize(131, 41)) + self.save_roi_button.setMaximumSize(QtCore.QSize(131, 41)) + self.save_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_roi_button.setObjectName("save_roi_button") + self.chooseImageButtonsLayout_4.addWidget(self.save_roi_button) + self.back_from_save_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_save_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_save_button.setObjectName("back_from_save_button") + self.chooseImageButtonsLayout_4.addWidget(self.back_from_save_button) + self.save_roi_layout.addLayout(self.chooseImageButtonsLayout_4, 2, 2, 1, 1) + self.save_roi_layout.setColumnStretch(0, 1) + self.save_roi_layout.setColumnStretch(1, 10) + self.save_roi_layout.setColumnStretch(2, 10) + self.save_roi_layout.setRowStretch(0, 1) + self.save_roi_layout.setRowStretch(1, 10) + self.save_roi_layout.setRowStretch(2, 10) + self.draw_roi_layout.addLayout(self.save_roi_layout) + self.im_display_frame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(10) + sizePolicy.setVerticalStretch(10) + sizePolicy.setHeightForWidth(self.im_display_frame.sizePolicy().hasHeightForWidth()) + self.im_display_frame.setSizePolicy(sizePolicy) + self.im_display_frame.setMinimumSize(QtCore.QSize(501, 321)) + self.im_display_frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.im_display_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.im_display_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.im_display_frame.setObjectName("im_display_frame") + self.draw_roi_layout.addWidget(self.im_display_frame) + self.rect_dims_layout = QtWidgets.QHBoxLayout() + self.rect_dims_layout.setObjectName("rect_dims_layout") + self.physical_roi_dims_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_dims_label.setMinimumSize(QtCore.QSize(200, 0)) + self.physical_roi_dims_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_dims_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_dims_label.setScaledContents(False) + self.physical_roi_dims_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.physical_roi_dims_label.setWordWrap(True) + self.physical_roi_dims_label.setObjectName("physical_roi_dims_label") + self.rect_dims_layout.addWidget(self.physical_roi_dims_label) + self.physical_roi_width_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_width_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_width_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_width_label.setScaledContents(False) + self.physical_roi_width_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_width_label.setWordWrap(True) + self.physical_roi_width_label.setObjectName("physical_roi_width_label") + self.rect_dims_layout.addWidget(self.physical_roi_width_label, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.physical_roi_width_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_width_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_width_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_width_val.setScaledContents(False) + self.physical_roi_width_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_width_val.setWordWrap(True) + self.physical_roi_width_val.setObjectName("physical_roi_width_val") + self.rect_dims_layout.addWidget(self.physical_roi_width_val) + self.physical_roi_height_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_height_label.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_height_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_height_label.setScaledContents(False) + self.physical_roi_height_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_height_label.setWordWrap(True) + self.physical_roi_height_label.setObjectName("physical_roi_height_label") + self.rect_dims_layout.addWidget(self.physical_roi_height_label, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.physical_roi_height_val = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.physical_roi_height_val.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.physical_roi_height_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.physical_roi_height_val.setScaledContents(False) + self.physical_roi_height_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.physical_roi_height_val.setWordWrap(True) + self.physical_roi_height_val.setObjectName("physical_roi_height_val") + self.rect_dims_layout.addWidget(self.physical_roi_height_val) + spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.rect_dims_layout.addItem(spacerItem2) + self.rect_dims_layout.setStretch(0, 1) + self.rect_dims_layout.setStretch(1, 1) + self.rect_dims_layout.setStretch(2, 2) + self.rect_dims_layout.setStretch(3, 1) + self.rect_dims_layout.setStretch(4, 2) + self.draw_roi_layout.addLayout(self.rect_dims_layout) + self.draw_roi_layout.setStretch(0, 1) + self.full_screen_layout.addLayout(self.draw_roi_layout) + self.main_layout.addWidget(self.horizontalLayoutWidget_4) + + self.retranslateUi(constructRoi) + QtCore.QMetaObject.connectSlotsByName(constructRoi) + + def retranslateUi(self, constructRoi): + _translate = QtCore.QCoreApplication.translate + constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("constructRoi", "


")) + self.imageSelectionLabelSidebar.setText(_translate("constructRoi", "Image Selection:")) + self.imageLabel.setText(_translate("constructRoi", "Image:")) + self.phantomLabel.setText(_translate("constructRoi", "Phantom:")) + self.image_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.phantom_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("constructRoi", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) + self.back_button.setText(_translate("constructRoi", "Back")) + self.loading_screen_label.setText(_translate("constructRoi", "LOADING....")) + self.physical_dims_label.setText(_translate("constructRoi", "Physical Dims (cm):")) + self.physical_depth_label.setText(_translate("constructRoi", "Depth:")) + self.physical_width_val.setText(_translate("constructRoi", "0")) + self.physical_depth_val.setText(_translate("constructRoi", "0")) + self.physical_width_label.setText(_translate("constructRoi", "Width:")) + self.construct_roi_label.setText(_translate("constructRoi", "Construct Region of Interest (ROI):")) + self.pixel_dims_label.setText(_translate("constructRoi", "Pixel Dims:")) + self.pixel_width_label.setText(_translate("constructRoi", "Width:")) + self.pixel_depth_label.setText(_translate("constructRoi", "Depth:")) + self.pixel_width_val.setText(_translate("constructRoi", "0")) + self.pixel_depth_val.setText(_translate("constructRoi", "0")) + self.brightness_label.setText(_translate("constructRoi", "Brightness:")) + self.brightness_value_label.setText(_translate("constructRoi", "0")) + self.dicom_overlay_checkbox.setText(_translate("constructRoi", "Show DICOM Overlay")) + self.transparency_label.setText(_translate("constructRoi", "Transparency:")) + self.transparency_value_label.setText(_translate("constructRoi", "50")) + self.load_dicom_button.setText(_translate("constructRoi", "Load DICOM File")) + self.back_from_drag_button.setText(_translate("constructRoi", "Back")) + self.save_drag_button.setText(_translate("constructRoi", "Save ROI")) + self.draw_pts_type_button.setText(_translate("constructRoi", "Draw Freehand w Points")) + self.draw_freehand_drag_type_button.setText(_translate("constructRoi", "Draw Freehand by Dragging")) + self.draw_rect_drag_type_button.setText(_translate("constructRoi", "Draw Rectangle by Dragging")) + self.clear_roi_button.setText(_translate("constructRoi", "Clear ROI")) + self.undo_last_pt_button.setText(_translate("constructRoi", "Undo Last Point")) + self.close_roi_button.setText(_translate("constructRoi", "Close ROI")) + self.back_from_pts_button.setText(_translate("constructRoi", "Back")) + self.save_pts_button.setText(_translate("constructRoi", "Save ROI")) + self.dest_folder_label.setText(_translate("constructRoi", "Dest Folder")) + self.roi_name_label.setText(_translate("constructRoi", "ROI Name")) + self.choose_save_folder_button.setText(_translate("constructRoi", "Choose Folder")) + self.clear_save_folder_button.setText(_translate("constructRoi", "Clear Path")) + self.save_roi_button.setText(_translate("constructRoi", "Save")) + self.back_from_save_button.setText(_translate("constructRoi", "Back")) + self.physical_roi_dims_label.setText(_translate("constructRoi", "Rect. Dims (cm):")) + self.physical_roi_width_label.setText(_translate("constructRoi", "Width:")) + self.physical_roi_width_val.setText(_translate("constructRoi", "0")) + self.physical_roi_height_label.setText(_translate("constructRoi", "Depth")) + self.physical_roi_height_val.setText(_translate("constructRoi", "0")) diff --git a/src/qus/seg_loading/ui/roi_preview_ui.py b/src/qus/seg_loading/ui/roi_preview_ui.py new file mode 100644 index 0000000..9b50e03 --- /dev/null +++ b/src/qus/seg_loading/ui/roi_preview_ui.py @@ -0,0 +1,339 @@ +# Form implementation generated from reading ui file 'src\qus\seg_loading\ui\roi_preview.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_constructRoi(object): + def setupUi(self, constructRoi): + constructRoi.setObjectName("constructRoi") + constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) + constructRoi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(constructRoi) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=constructRoi) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.confirmation_layout = QtWidgets.QVBoxLayout() + self.confirmation_layout.setContentsMargins(30, 10, 30, 10) + self.confirmation_layout.setSpacing(10) + self.confirmation_layout.setObjectName("confirmation_layout") + self.segmentation_confirmation_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.segmentation_confirmation_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.segmentation_confirmation_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.segmentation_confirmation_label.setScaledContents(False) + self.segmentation_confirmation_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentation_confirmation_label.setWordWrap(True) + self.segmentation_confirmation_label.setObjectName("segmentation_confirmation_label") + self.confirmation_layout.addWidget(self.segmentation_confirmation_label) + self.seg_confirmation_info = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.seg_confirmation_info.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.seg_confirmation_info.setObjectName("seg_confirmation_info") + self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.seg_confirmation_info) + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.segmentation_name_label = QtWidgets.QLabel(parent=self.seg_confirmation_info) + self.segmentation_name_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.segmentation_name_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.segmentation_name_label.setScaledContents(False) + self.segmentation_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentation_name_label.setWordWrap(False) + self.segmentation_name_label.setObjectName("segmentation_name_label") + self.horizontalLayout_7.addWidget(self.segmentation_name_label, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.segmentation_name_val = QtWidgets.QLabel(parent=self.seg_confirmation_info) + self.segmentation_name_val.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.segmentation_name_val.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.segmentation_name_val.setScaledContents(False) + self.segmentation_name_val.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentation_name_val.setWordWrap(True) + self.segmentation_name_val.setObjectName("segmentation_name_val") + self.horizontalLayout_7.addWidget(self.segmentation_name_val, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.confirmation_layout.addWidget(self.seg_confirmation_info, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.seg_options_buttons = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.seg_options_buttons.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.seg_options_buttons.setObjectName("seg_options_buttons") + self.horizontalLayout_10 = QtWidgets.QHBoxLayout(self.seg_options_buttons) + self.horizontalLayout_10.setObjectName("horizontalLayout_10") + self.confirm_seg_button = QtWidgets.QPushButton(parent=self.seg_options_buttons) + self.confirm_seg_button.setMinimumSize(QtCore.QSize(221, 41)) + self.confirm_seg_button.setMaximumSize(QtCore.QSize(221, 41)) + self.confirm_seg_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.confirm_seg_button.setCheckable(True) + self.confirm_seg_button.setChecked(False) + self.confirm_seg_button.setObjectName("confirm_seg_button") + self.horizontalLayout_10.addWidget(self.confirm_seg_button, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.back_from_confirm_button = QtWidgets.QPushButton(parent=self.seg_options_buttons) + self.back_from_confirm_button.setMinimumSize(QtCore.QSize(241, 41)) + self.back_from_confirm_button.setMaximumSize(QtCore.QSize(241, 41)) + self.back_from_confirm_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.back_from_confirm_button.setCheckable(False) + self.back_from_confirm_button.setChecked(False) + self.back_from_confirm_button.setObjectName("back_from_confirm_button") + self.horizontalLayout_10.addWidget(self.back_from_confirm_button, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.confirmation_layout.addWidget(self.seg_options_buttons) + self.im_display_frame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(10) + sizePolicy.setVerticalStretch(10) + sizePolicy.setHeightForWidth(self.im_display_frame.sizePolicy().hasHeightForWidth()) + self.im_display_frame.setSizePolicy(sizePolicy) + self.im_display_frame.setMinimumSize(QtCore.QSize(501, 321)) + self.im_display_frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.im_display_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.im_display_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.im_display_frame.setObjectName("im_display_frame") + self.confirmation_layout.addWidget(self.im_display_frame) + self.confirmation_frame_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.confirmation_frame_label.setMinimumSize(QtCore.QSize(200, 0)) + self.confirmation_frame_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.confirmation_frame_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.confirmation_frame_label.setScaledContents(False) + self.confirmation_frame_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.confirmation_frame_label.setWordWrap(True) + self.confirmation_frame_label.setObjectName("confirmation_frame_label") + self.confirmation_layout.addWidget(self.confirmation_frame_label, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.confirmation_layout.setStretch(0, 1) + self.confirmation_layout.setStretch(1, 1) + self.full_screen_layout.addLayout(self.confirmation_layout) + self.main_layout.addWidget(self.horizontalLayoutWidget_4) + + self.retranslateUi(constructRoi) + QtCore.QMetaObject.connectSlotsByName(constructRoi) + + def retranslateUi(self, constructRoi): + _translate = QtCore.QCoreApplication.translate + constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("constructRoi", "


")) + self.imageSelectionLabelSidebar.setText(_translate("constructRoi", "Image Selection:")) + self.imageLabel.setText(_translate("constructRoi", "Image:")) + self.phantomLabel.setText(_translate("constructRoi", "Phantom:")) + self.image_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.phantom_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("constructRoi", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) + self.segmentation_confirmation_label.setText(_translate("constructRoi", "Segmentation:")) + self.segmentation_name_label.setText(_translate("constructRoi", "Segmentation Name: ")) + self.segmentation_name_val.setText(_translate("constructRoi", "NAME")) + self.confirm_seg_button.setText(_translate("constructRoi", "Confirm")) + self.back_from_confirm_button.setText(_translate("constructRoi", "Back")) + self.confirmation_frame_label.setText(_translate("constructRoi", "Frame: 0")) diff --git a/src/qus/seg_loading/ui/seg_file_selection_ui.py b/src/qus/seg_loading/ui/seg_file_selection_ui.py new file mode 100644 index 0000000..c669a12 --- /dev/null +++ b/src/qus/seg_loading/ui/seg_file_selection_ui.py @@ -0,0 +1,371 @@ +# Form implementation generated from reading ui file 'src\qus\seg_loading\ui\seg_file_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_constructRoi(object): + def setupUi(self, constructRoi): + constructRoi.setObjectName("constructRoi") + constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) + constructRoi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(constructRoi) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=constructRoi) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.seg_loading_layout = QtWidgets.QVBoxLayout() + self.seg_loading_layout.setContentsMargins(30, 30, 30, 30) + self.seg_loading_layout.setSpacing(20) + self.seg_loading_layout.setObjectName("seg_loading_layout") + self.select_seg_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.select_seg_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_seg_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_seg_label.setScaledContents(False) + self.select_seg_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_seg_label.setWordWrap(True) + self.select_seg_label.setObjectName("select_seg_label") + self.seg_loading_layout.addWidget(self.select_seg_label) + self.chooseImgLayout = QtWidgets.QVBoxLayout() + self.chooseImgLayout.setContentsMargins(20, -1, 20, -1) + self.chooseImgLayout.setObjectName("chooseImgLayout") + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem2) + self.seg_path_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.seg_path_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.seg_path_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.seg_path_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.seg_path_label.setObjectName("seg_path_label") + self.chooseImgLayout.addWidget(self.seg_path_label) + self.seg_path_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.seg_path_input.setMinimumSize(QtCore.QSize(201, 31)) + self.seg_path_input.setMaximumSize(QtCore.QSize(401, 31)) + self.seg_path_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.seg_path_input.setObjectName("seg_path_input") + self.chooseImgLayout.addWidget(self.seg_path_input, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.chooseImageButtonsLayout = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout.setSpacing(1) + self.chooseImageButtonsLayout.setObjectName("chooseImageButtonsLayout") + self.choose_seg_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_seg_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_seg_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_seg_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_seg_path_button.setObjectName("choose_seg_path_button") + self.chooseImageButtonsLayout.addWidget(self.choose_seg_path_button, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.clear_seg_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_seg_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_seg_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_seg_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_seg_path_button.setObjectName("clear_seg_path_button") + self.chooseImageButtonsLayout.addWidget(self.clear_seg_path_button, 0, QtCore.Qt.AlignmentFlag.AlignLeft) + self.chooseImgLayout.addLayout(self.chooseImageButtonsLayout) + spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem3) + self.seg_loading_layout.addLayout(self.chooseImgLayout) + self.loading_options_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.loading_options_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_options_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.loading_options_label.setScaledContents(False) + self.loading_options_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_options_label.setWordWrap(True) + self.loading_options_label.setObjectName("loading_options_label") + self.seg_loading_layout.addWidget(self.loading_options_label) + self.loading_options_table = QtWidgets.QTableWidget(parent=self.horizontalLayoutWidget_4) + self.loading_options_table.setStyleSheet("QTableWidget {\n" +" background: rgb(108, 108, 108);\n" +" color: white;\n" +"}") + self.loading_options_table.setDragEnabled(False) + self.loading_options_table.setRowCount(0) + self.loading_options_table.setColumnCount(0) + self.loading_options_table.setObjectName("loading_options_table") + self.loading_options_table.horizontalHeader().setCascadingSectionResizes(False) + self.seg_loading_layout.addWidget(self.loading_options_table) + self.accept_seg_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_seg_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_seg_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_seg_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_seg_path_button.setObjectName("accept_seg_path_button") + self.seg_loading_layout.addWidget(self.accept_seg_path_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.loading_screen_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.loading_screen_label.setStyleSheet("QLabel {\n" +" color: rgb(0, 255, 0);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.loading_screen_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.loading_screen_label.setObjectName("loading_screen_label") + self.seg_loading_layout.addWidget(self.loading_screen_label) + self.select_seg_error_msg = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.select_seg_error_msg.setStyleSheet("QLabel {\n" +" color: rgb(255, 0, 23);\n" +" font-size: 20px;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_seg_error_msg.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_seg_error_msg.setObjectName("select_seg_error_msg") + self.seg_loading_layout.addWidget(self.select_seg_error_msg) + self.seg_loading_layout.setStretch(0, 2) + self.seg_loading_layout.setStretch(4, 3) + self.seg_loading_layout.setStretch(6, 2) + self.full_screen_layout.addLayout(self.seg_loading_layout) + self.main_layout.addWidget(self.horizontalLayoutWidget_4) + + self.retranslateUi(constructRoi) + QtCore.QMetaObject.connectSlotsByName(constructRoi) + + def retranslateUi(self, constructRoi): + _translate = QtCore.QCoreApplication.translate + constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("constructRoi", "


")) + self.imageSelectionLabelSidebar.setText(_translate("constructRoi", "Image Selection:")) + self.imageLabel.setText(_translate("constructRoi", "Image:")) + self.phantomLabel.setText(_translate("constructRoi", "Phantom:")) + self.image_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.phantom_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("constructRoi", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) + self.back_button.setText(_translate("constructRoi", "Back")) + self.select_seg_label.setText(_translate("constructRoi", "Select Segmentation File to Load:")) + self.seg_path_label.setText(_translate("constructRoi", "Input Path to Image file\n" +" (.rf, .rfd, .mat, .bin)")) + self.choose_seg_path_button.setText(_translate("constructRoi", "Choose File")) + self.clear_seg_path_button.setText(_translate("constructRoi", "Clear Path")) + self.loading_options_label.setText(_translate("constructRoi", "\n" +"Segmentation Loading Options:")) + self.loading_options_table.setSortingEnabled(False) + self.accept_seg_path_button.setText(_translate("constructRoi", "Accept")) + self.loading_screen_label.setText(_translate("constructRoi", "LOADING....")) + self.select_seg_error_msg.setText(_translate("constructRoi", "ERROR: At least one dimension of phantom data\n" +"smaller than corresponding dimension\n" +"of image data")) diff --git a/src/qus/seg_loading/ui/seg_type_selection_ui.py b/src/qus/seg_loading/ui/seg_type_selection_ui.py new file mode 100644 index 0000000..c5e9a43 --- /dev/null +++ b/src/qus/seg_loading/ui/seg_type_selection_ui.py @@ -0,0 +1,280 @@ +# Form implementation generated from reading ui file 'src\qus\seg_loading\ui\seg_type_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_constructRoi(object): + def setupUi(self, constructRoi): + constructRoi.setObjectName("constructRoi") + constructRoi.setMinimumSize(QtCore.QSize(1400, 662)) + constructRoi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(constructRoi) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=constructRoi) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.select_type_layout = QtWidgets.QVBoxLayout() + self.select_type_layout.setContentsMargins(30, -1, 30, -1) + self.select_type_layout.setSpacing(50) + self.select_type_layout.setObjectName("select_type_layout") + self.select_type_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.select_type_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.select_type_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.select_type_label.setScaledContents(False) + self.select_type_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.select_type_label.setWordWrap(True) + self.select_type_label.setObjectName("select_type_label") + self.select_type_layout.addWidget(self.select_type_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.seg_type_dropdown = QtWidgets.QComboBox(parent=self.horizontalLayoutWidget_4) + self.seg_type_dropdown.setMinimumSize(QtCore.QSize(180, 41)) + self.seg_type_dropdown.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setPointSize(16) + self.seg_type_dropdown.setFont(font) + self.seg_type_dropdown.setStyleSheet("QComboBox {\n" +" color: white;\n" +"}") + self.seg_type_dropdown.setObjectName("seg_type_dropdown") + self.select_type_layout.addWidget(self.seg_type_dropdown) + self.accept_type_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.accept_type_button.setMinimumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setMaximumSize(QtCore.QSize(131, 41)) + self.accept_type_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.accept_type_button.setObjectName("accept_type_button") + self.select_type_layout.addWidget(self.accept_type_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.select_type_layout.addItem(spacerItem2) + self.select_type_layout.setStretch(0, 2) + self.select_type_layout.setStretch(1, 2) + self.select_type_layout.setStretch(2, 2) + self.select_type_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.select_type_layout) + self.main_layout.addWidget(self.horizontalLayoutWidget_4) + + self.retranslateUi(constructRoi) + QtCore.QMetaObject.connectSlotsByName(constructRoi) + + def retranslateUi(self, constructRoi): + _translate = QtCore.QCoreApplication.translate + constructRoi.setWindowTitle(_translate("constructRoi", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("constructRoi", "


")) + self.imageSelectionLabelSidebar.setText(_translate("constructRoi", "Image Selection:")) + self.imageLabel.setText(_translate("constructRoi", "Image:")) + self.phantomLabel.setText(_translate("constructRoi", "Phantom:")) + self.image_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.phantom_path_input.setText(_translate("constructRoi", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("constructRoi", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("constructRoi", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("constructRoi", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("constructRoi", "Analysis Parameter Selection")) + self.back_button.setText(_translate("constructRoi", "Back")) + self.select_type_label.setText(_translate("constructRoi", "Select Segmentation Type:")) + self.accept_type_button.setText(_translate("constructRoi", "Accept")) diff --git a/src/qus/seg_loading/ui/voi_drawing_ui.py b/src/qus/seg_loading/ui/voi_drawing_ui.py new file mode 100644 index 0000000..55f89c3 --- /dev/null +++ b/src/qus/seg_loading/ui/voi_drawing_ui.py @@ -0,0 +1,883 @@ +# Form implementation generated from reading ui file 'src\qus\seg_loading\ui\voi_drawing.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_voi_drawer(object): + def setupUi(self, voi_drawer): + voi_drawer.setObjectName("voi_drawer") + voi_drawer.resize(1512, 823) + voi_drawer.setMinimumSize(QtCore.QSize(0, 0)) + voi_drawer.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=voi_drawer) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(10, -200, 1636, 951)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + self.observing_label = QtWidgets.QLabel(parent=self.gridFrame) + self.observing_label.setStyleSheet("QLabel { background-color : rgb(42, 42, 42); color : red; }") + self.observing_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.observing_label.setObjectName("observing_label") + self.backButtonGrid.addWidget(self.observing_label, 1, 0, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 4, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem, 4, 1, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem1, 3, 0, 1, 1) + self.navigating_label = QtWidgets.QLabel(parent=self.gridFrame) + self.navigating_label.setStyleSheet("QLabel { background-color : rgb(42, 42, 42); color : green; }") + self.navigating_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.navigating_label.setObjectName("navigating_label") + self.backButtonGrid.addWidget(self.navigating_label, 0, 0, 1, 1) + self.toggle_crosshair_visibility_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.toggle_crosshair_visibility_button.setMinimumSize(QtCore.QSize(131, 41)) + self.toggle_crosshair_visibility_button.setMaximumSize(QtCore.QSize(131, 41)) + self.toggle_crosshair_visibility_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.toggle_crosshair_visibility_button.setObjectName("toggle_crosshair_visibility_button") + self.backButtonGrid.addWidget(self.toggle_crosshair_visibility_button, 4, 2, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.voi_layout = QtWidgets.QGridLayout() + self.voi_layout.setObjectName("voi_layout") + self.verticalLayout_6 = QtWidgets.QVBoxLayout() + self.verticalLayout_6.setObjectName("verticalLayout_6") + self.sag_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_plane_label.sizePolicy().hasHeightForWidth()) + self.sag_plane_label.setSizePolicy(sizePolicy) + self.sag_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_plane_label.setObjectName("sag_plane_label") + self.verticalLayout_6.addWidget(self.sag_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.sag_plane.sizePolicy().hasHeightForWidth()) + self.sag_plane.setSizePolicy(sizePolicy) + self.sag_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.sag_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.sag_plane.setMouseTracking(True) + self.sag_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.sag_plane.setText("") + self.sag_plane.setObjectName("sag_plane") + self.verticalLayout_6.addWidget(self.sag_plane) + self.horizontalLayout_7 = QtWidgets.QHBoxLayout() + self.horizontalLayout_7.setSpacing(5) + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.sag_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_frame_num.sizePolicy().hasHeightForWidth()) + self.sag_frame_num.setSizePolicy(sizePolicy) + self.sag_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_frame_num.setObjectName("sag_frame_num") + self.horizontalLayout_7.addWidget(self.sag_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_of_label.sizePolicy().hasHeightForWidth()) + self.sag_of_label.setSizePolicy(sizePolicy) + self.sag_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_of_label.setObjectName("sag_of_label") + self.horizontalLayout_7.addWidget(self.sag_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_total_frames.sizePolicy().hasHeightForWidth()) + self.sag_total_frames.setSizePolicy(sizePolicy) + self.sag_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_total_frames.setObjectName("sag_total_frames") + self.horizontalLayout_7.addWidget(self.sag_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_7.setStretch(0, 1) + self.horizontalLayout_7.setStretch(2, 1) + self.verticalLayout_6.addLayout(self.horizontalLayout_7) + self.voi_layout.addLayout(self.verticalLayout_6, 0, 1, 1, 1) + self.verticalLayout_4 = QtWidgets.QVBoxLayout() + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.ax_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_plane_label.sizePolicy().hasHeightForWidth()) + self.ax_plane_label.setSizePolicy(sizePolicy) + self.ax_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_plane_label.setObjectName("ax_plane_label") + self.verticalLayout_4.addWidget(self.ax_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.ax_plane.sizePolicy().hasHeightForWidth()) + self.ax_plane.setSizePolicy(sizePolicy) + self.ax_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.ax_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.ax_plane.setMouseTracking(True) + self.ax_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.ax_plane.setText("") + self.ax_plane.setObjectName("ax_plane") + self.verticalLayout_4.addWidget(self.ax_plane) + self.horizontalLayout_6 = QtWidgets.QHBoxLayout() + self.horizontalLayout_6.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint) + self.horizontalLayout_6.setSpacing(5) + self.horizontalLayout_6.setObjectName("horizontalLayout_6") + self.ax_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_frame_num.sizePolicy().hasHeightForWidth()) + self.ax_frame_num.setSizePolicy(sizePolicy) + self.ax_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_frame_num.setObjectName("ax_frame_num") + self.horizontalLayout_6.addWidget(self.ax_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_of_label.sizePolicy().hasHeightForWidth()) + self.ax_of_label.setSizePolicy(sizePolicy) + self.ax_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_of_label.setObjectName("ax_of_label") + self.horizontalLayout_6.addWidget(self.ax_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_total_frames.sizePolicy().hasHeightForWidth()) + self.ax_total_frames.setSizePolicy(sizePolicy) + self.ax_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_total_frames.setObjectName("ax_total_frames") + self.horizontalLayout_6.addWidget(self.ax_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_6.setStretch(0, 1) + self.horizontalLayout_6.setStretch(2, 1) + self.verticalLayout_4.addLayout(self.horizontalLayout_6) + self.voi_layout.addLayout(self.verticalLayout_4, 0, 0, 1, 1) + self.verticalLayout_7 = QtWidgets.QVBoxLayout() + self.verticalLayout_7.setObjectName("verticalLayout_7") + self.cor_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_plane_label.sizePolicy().hasHeightForWidth()) + self.cor_plane_label.setSizePolicy(sizePolicy) + self.cor_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_plane_label.setObjectName("cor_plane_label") + self.verticalLayout_7.addWidget(self.cor_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.cor_plane.sizePolicy().hasHeightForWidth()) + self.cor_plane.setSizePolicy(sizePolicy) + self.cor_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.cor_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.cor_plane.setMouseTracking(True) + self.cor_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.cor_plane.setText("") + self.cor_plane.setObjectName("cor_plane") + self.verticalLayout_7.addWidget(self.cor_plane) + self.horizontalLayout_8 = QtWidgets.QHBoxLayout() + self.horizontalLayout_8.setSpacing(5) + self.horizontalLayout_8.setObjectName("horizontalLayout_8") + self.cor_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_frame_num.sizePolicy().hasHeightForWidth()) + self.cor_frame_num.setSizePolicy(sizePolicy) + self.cor_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_frame_num.setObjectName("cor_frame_num") + self.horizontalLayout_8.addWidget(self.cor_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_of_label.sizePolicy().hasHeightForWidth()) + self.cor_of_label.setSizePolicy(sizePolicy) + self.cor_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_of_label.setObjectName("cor_of_label") + self.horizontalLayout_8.addWidget(self.cor_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_total_frames.sizePolicy().hasHeightForWidth()) + self.cor_total_frames.setSizePolicy(sizePolicy) + self.cor_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_total_frames.setObjectName("cor_total_frames") + self.horizontalLayout_8.addWidget(self.cor_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_8.setStretch(0, 1) + self.horizontalLayout_8.setStretch(2, 1) + self.verticalLayout_7.addLayout(self.horizontalLayout_8) + self.voi_layout.addLayout(self.verticalLayout_7, 1, 1, 1, 1) + self.verticalLayout_5 = QtWidgets.QVBoxLayout() + self.verticalLayout_5.setContentsMargins(10, -1, 10, 20) + self.verticalLayout_5.setObjectName("verticalLayout_5") + self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.cur_slice_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.cur_slice_label.setScaledContents(False) + self.cur_slice_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cur_slice_label.setWordWrap(True) + self.cur_slice_label.setObjectName("cur_slice_label") + self.verticalLayout_2.addWidget(self.cur_slice_label) + self.horizontalLayout_5 = QtWidgets.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.cur_slice_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.cur_slice_slider.setMinimumSize(QtCore.QSize(285, 0)) + self.cur_slice_slider.setMaximumSize(QtCore.QSize(285, 16777215)) + self.cur_slice_slider.setStyleSheet("QSlider {\n" +" color: white;\n" +"}") + self.cur_slice_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.cur_slice_slider.setObjectName("cur_slice_slider") + self.horizontalLayout_5.addWidget(self.cur_slice_slider, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_spin_box = QtWidgets.QDoubleSpinBox(parent=self.horizontalLayoutWidget_4) + self.cur_slice_spin_box.setMaximumSize(QtCore.QSize(70, 16777215)) + self.cur_slice_spin_box.setStyleSheet("QDoubleSpinBox {\n" +" background: white;\n" +" color: black;\n" +"}") + self.cur_slice_spin_box.setObjectName("cur_slice_spin_box") + self.horizontalLayout_5.addWidget(self.cur_slice_spin_box, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_of_label.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cur_slice_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cur_slice_of_label.setObjectName("cur_slice_of_label") + self.horizontalLayout_5.addWidget(self.cur_slice_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_total = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_total.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_total.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_total.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cur_slice_total.setObjectName("cur_slice_total") + self.horizontalLayout_5.addWidget(self.cur_slice_total, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_5.setStretch(0, 1) + self.verticalLayout_2.addLayout(self.horizontalLayout_5) + self.verticalLayout_5.addLayout(self.verticalLayout_2) + self.voiAlphaLayout_2 = QtWidgets.QVBoxLayout() + self.voiAlphaLayout_2.setObjectName("voiAlphaLayout_2") + self.alpha_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.alpha_label.setScaledContents(False) + self.alpha_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.alpha_label.setWordWrap(True) + self.alpha_label.setObjectName("alpha_label") + self.voiAlphaLayout_2.addWidget(self.alpha_label) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.alpha_status = QtWidgets.QProgressBar(parent=self.horizontalLayoutWidget_4) + self.alpha_status.setMinimumSize(QtCore.QSize(285, 0)) + self.alpha_status.setMaximumSize(QtCore.QSize(285, 16777215)) + self.alpha_status.setProperty("value", 24) + self.alpha_status.setObjectName("alpha_status") + self.horizontalLayout_4.addWidget(self.alpha_status, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_spin_box = QtWidgets.QSpinBox(parent=self.horizontalLayoutWidget_4) + font = QtGui.QFont() + font.setPointSize(13) + self.alpha_spin_box.setFont(font) + self.alpha_spin_box.setStyleSheet("QSpinBox{\n" +" background-color: white,\n" +"}") + self.alpha_spin_box.setObjectName("alpha_spin_box") + self.horizontalLayout_4.addWidget(self.alpha_spin_box, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_of_label.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.alpha_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.alpha_of_label.setObjectName("alpha_of_label") + self.horizontalLayout_4.addWidget(self.alpha_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_total = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_total.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_total.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_total.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.alpha_total.setObjectName("alpha_total") + self.horizontalLayout_4.addWidget(self.alpha_total, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_4.setStretch(0, 1) + self.horizontalLayout_4.setStretch(1, 1) + self.voiAlphaLayout_2.addLayout(self.horizontalLayout_4) + self.verticalLayout_5.addLayout(self.voiAlphaLayout_2) + self.construct_voi_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.construct_voi_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.construct_voi_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.construct_voi_label.setScaledContents(False) + self.construct_voi_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.construct_voi_label.setWordWrap(True) + self.construct_voi_label.setObjectName("construct_voi_label") + self.verticalLayout_5.addWidget(self.construct_voi_label) + self.drawVoiLayout_2 = QtWidgets.QGridLayout() + self.drawVoiLayout_2.setObjectName("drawVoiLayout_2") + self.undo_last_pt_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.undo_last_pt_button.setMinimumSize(QtCore.QSize(0, 36)) + self.undo_last_pt_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.undo_last_pt_button.setCheckable(False) + self.undo_last_pt_button.setObjectName("undo_last_pt_button") + self.drawVoiLayout_2.addWidget(self.undo_last_pt_button, 0, 1, 1, 1) + self.interpolate_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.interpolate_voi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.interpolate_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.interpolate_voi_button.setCheckable(False) + self.interpolate_voi_button.setObjectName("interpolate_voi_button") + self.drawVoiLayout_2.addWidget(self.interpolate_voi_button, 1, 1, 1, 1) + self.draw_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.draw_roi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.draw_roi_button.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.draw_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.draw_roi_button.setCheckable(True) + self.draw_roi_button.setChecked(False) + self.draw_roi_button.setObjectName("draw_roi_button") + self.drawVoiLayout_2.addWidget(self.draw_roi_button, 0, 0, 1, 1) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.undo_last_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.undo_last_roi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.undo_last_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.undo_last_roi_button.setCheckable(False) + self.undo_last_roi_button.setObjectName("undo_last_roi_button") + self.horizontalLayout.addWidget(self.undo_last_roi_button) + self.close_roi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.close_roi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.close_roi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.close_roi_button.setCheckable(False) + self.close_roi_button.setObjectName("close_roi_button") + self.horizontalLayout.addWidget(self.close_roi_button) + self.drawVoiLayout_2.addLayout(self.horizontalLayout, 1, 0, 1, 1) + self.verticalLayout_5.addLayout(self.drawVoiLayout_2) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setContentsMargins(-1, -1, 0, 0) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.restart_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.restart_voi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.restart_voi_button.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.restart_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.restart_voi_button.setCheckable(False) + self.restart_voi_button.setObjectName("restart_voi_button") + self.horizontalLayout_2.addWidget(self.restart_voi_button) + self.save_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.save_voi_button.setMinimumSize(QtCore.QSize(0, 36)) + self.save_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.save_voi_button.setCheckable(False) + self.save_voi_button.setObjectName("save_voi_button") + self.horizontalLayout_2.addWidget(self.save_voi_button) + self.verticalLayout_5.addLayout(self.horizontalLayout_2) + self.interp_loading_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.interp_loading_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: green;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.interp_loading_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.interp_loading_label.setScaledContents(False) + self.interp_loading_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.interp_loading_label.setWordWrap(True) + self.interp_loading_label.setObjectName("interp_loading_label") + self.verticalLayout_5.addWidget(self.interp_loading_label) + self.saving_voi_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.saving_voi_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: green;\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.saving_voi_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.saving_voi_label.setScaledContents(False) + self.saving_voi_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.saving_voi_label.setWordWrap(True) + self.saving_voi_label.setObjectName("saving_voi_label") + self.verticalLayout_5.addWidget(self.saving_voi_label) + self.gridLayout = QtWidgets.QGridLayout() + self.gridLayout.setObjectName("gridLayout") + self.save_folder_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_folder_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_folder_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_folder_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_folder_input.setObjectName("save_folder_input") + self.gridLayout.addWidget(self.save_folder_input, 0, 1, 1, 1) + self.dest_folder_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.dest_folder_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.dest_folder_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.dest_folder_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.dest_folder_label.setObjectName("dest_folder_label") + self.gridLayout.addWidget(self.dest_folder_label, 0, 0, 1, 1) + self.chooseImageButtonsLayout_2 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_2.setSpacing(10) + self.chooseImageButtonsLayout_2.setObjectName("chooseImageButtonsLayout_2") + self.choose_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_save_folder_button.setObjectName("choose_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.choose_save_folder_button) + self.clear_save_folder_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_save_folder_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_save_folder_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_save_folder_button.setObjectName("clear_save_folder_button") + self.chooseImageButtonsLayout_2.addWidget(self.clear_save_folder_button) + self.gridLayout.addLayout(self.chooseImageButtonsLayout_2, 0, 2, 1, 1) + self.voi_name_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.voi_name_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.voi_name_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.voi_name_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.voi_name_label.setObjectName("voi_name_label") + self.gridLayout.addWidget(self.voi_name_label, 1, 0, 1, 1) + self.save_name_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.save_name_input.setMinimumSize(QtCore.QSize(201, 31)) + self.save_name_input.setMaximumSize(QtCore.QSize(401, 31)) + self.save_name_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.save_name_input.setObjectName("save_name_input") + self.gridLayout.addWidget(self.save_name_input, 1, 1, 1, 1) + self.chooseImageButtonsLayout_4 = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout_4.setObjectName("chooseImageButtonsLayout_4") + self.export_voi_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.export_voi_button.setMinimumSize(QtCore.QSize(131, 41)) + self.export_voi_button.setMaximumSize(QtCore.QSize(131, 41)) + self.export_voi_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.export_voi_button.setObjectName("export_voi_button") + self.chooseImageButtonsLayout_4.addWidget(self.export_voi_button) + self.back_from_save_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_save_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_from_save_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_from_save_button.setObjectName("back_from_save_button") + self.chooseImageButtonsLayout_4.addWidget(self.back_from_save_button) + self.gridLayout.addLayout(self.chooseImageButtonsLayout_4, 1, 2, 1, 1) + self.verticalLayout_5.addLayout(self.gridLayout) + self.voi_layout.addLayout(self.verticalLayout_5, 1, 0, 1, 1) + self.voi_layout.setColumnStretch(0, 1) + self.voi_layout.setColumnStretch(1, 1) + self.full_screen_layout.addLayout(self.voi_layout) + + self.retranslateUi(voi_drawer) + QtCore.QMetaObject.connectSlotsByName(voi_drawer) + + def retranslateUi(self, voi_drawer): + _translate = QtCore.QCoreApplication.translate + voi_drawer.setWindowTitle(_translate("voi_drawer", "Draw Volume of Interest")) + self.sidebar.setToolTip(_translate("voi_drawer", "


")) + self.imageSelectionLabelSidebar.setText(_translate("voi_drawer", "Image Selection:")) + self.imageLabel.setText(_translate("voi_drawer", "Image:")) + self.phantomLabel.setText(_translate("voi_drawer", "Phantom:")) + self.image_path_input.setText(_translate("voi_drawer", "Sample filename ")) + self.phantom_path_input.setText(_translate("voi_drawer", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("voi_drawer", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("voi_drawer", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("voi_drawer", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("voi_drawer", "Analysis Parameter Selection")) + self.observing_label.setText(_translate("voi_drawer", "Observing!")) + self.back_button.setText(_translate("voi_drawer", "Back")) + self.navigating_label.setText(_translate("voi_drawer", "Navigating!")) + self.toggle_crosshair_visibility_button.setText(_translate("voi_drawer", "Show/Hide Cross")) + self.sag_plane_label.setText(_translate("voi_drawer", "Sagittal Plane")) + self.sag_frame_num.setText(_translate("voi_drawer", "0")) + self.sag_of_label.setText(_translate("voi_drawer", "of")) + self.sag_total_frames.setText(_translate("voi_drawer", "0")) + self.ax_plane_label.setText(_translate("voi_drawer", "Axial Plane")) + self.ax_frame_num.setText(_translate("voi_drawer", "0")) + self.ax_of_label.setText(_translate("voi_drawer", "of")) + self.ax_total_frames.setText(_translate("voi_drawer", "0")) + self.cor_plane_label.setText(_translate("voi_drawer", "Coronal Plane")) + self.cor_frame_num.setText(_translate("voi_drawer", "0")) + self.cor_of_label.setText(_translate("voi_drawer", "of")) + self.cor_total_frames.setText(_translate("voi_drawer", "0")) + self.cur_slice_label.setText(_translate("voi_drawer", "Current Slice (in seconds):")) + self.cur_slice_of_label.setText(_translate("voi_drawer", "of")) + self.cur_slice_total.setText(_translate("voi_drawer", "0")) + self.alpha_label.setText(_translate("voi_drawer", "VOI Alpha:")) + self.alpha_of_label.setText(_translate("voi_drawer", "of")) + self.alpha_total.setText(_translate("voi_drawer", "255")) + self.construct_voi_label.setText(_translate("voi_drawer", "Construct Volume of Interest (VOI):\n" +"For best results, draw 1 ROI in each plane before interpolating")) + self.undo_last_pt_button.setText(_translate("voi_drawer", "Undo Last Point")) + self.interpolate_voi_button.setText(_translate("voi_drawer", "Interpolate VOI")) + self.draw_roi_button.setText(_translate("voi_drawer", "Draw ROI")) + self.undo_last_roi_button.setText(_translate("voi_drawer", "Undo Last ROI")) + self.close_roi_button.setText(_translate("voi_drawer", "Close ROI")) + self.restart_voi_button.setText(_translate("voi_drawer", "Restart VOI")) + self.save_voi_button.setText(_translate("voi_drawer", "Save VOI")) + self.interp_loading_label.setText(_translate("voi_drawer", "Interpolation Loading...")) + self.saving_voi_label.setText(_translate("voi_drawer", "Saving VOI...")) + self.dest_folder_label.setText(_translate("voi_drawer", "Dest Folder")) + self.choose_save_folder_button.setText(_translate("voi_drawer", "Choose Folder")) + self.clear_save_folder_button.setText(_translate("voi_drawer", "Clear Path")) + self.voi_name_label.setText(_translate("voi_drawer", "VOI Name")) + self.export_voi_button.setText(_translate("voi_drawer", "Save")) + self.back_from_save_button.setText(_translate("voi_drawer", "Back")) diff --git a/src/qus/seg_loading/ui/voi_preview_ui.py b/src/qus/seg_loading/ui/voi_preview_ui.py new file mode 100644 index 0000000..b21648a --- /dev/null +++ b/src/qus/seg_loading/ui/voi_preview_ui.py @@ -0,0 +1,684 @@ +# Form implementation generated from reading ui file 'src\qus\seg_loading\ui\voi_preview.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_confirm_voi(object): + def setupUi(self, confirm_voi): + confirm_voi.setObjectName("confirm_voi") + confirm_voi.resize(1512, 823) + confirm_voi.setMinimumSize(QtCore.QSize(0, 0)) + confirm_voi.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=confirm_voi) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(10, -200, 1636, 951)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(49, 0, 124);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + self.observing_label = QtWidgets.QLabel(parent=self.gridFrame) + self.observing_label.setStyleSheet("QLabel { background-color : rgb(42, 42, 42); color : red; }") + self.observing_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.observing_label.setObjectName("observing_label") + self.backButtonGrid.addWidget(self.observing_label, 1, 0, 1, 1) + spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem, 4, 1, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem1, 3, 0, 1, 1) + self.navigating_label = QtWidgets.QLabel(parent=self.gridFrame) + self.navigating_label.setStyleSheet("QLabel { background-color : rgb(42, 42, 42); color : green; }") + self.navigating_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.navigating_label.setObjectName("navigating_label") + self.backButtonGrid.addWidget(self.navigating_label, 0, 0, 1, 1) + self.toggle_crosshair_visibility_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.toggle_crosshair_visibility_button.setMinimumSize(QtCore.QSize(131, 41)) + self.toggle_crosshair_visibility_button.setMaximumSize(QtCore.QSize(131, 41)) + self.toggle_crosshair_visibility_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.toggle_crosshair_visibility_button.setObjectName("toggle_crosshair_visibility_button") + self.backButtonGrid.addWidget(self.toggle_crosshair_visibility_button, 4, 2, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.voi_layout = QtWidgets.QGridLayout() + self.voi_layout.setObjectName("voi_layout") + self.verticalLayout_6 = QtWidgets.QVBoxLayout() + self.verticalLayout_6.setObjectName("verticalLayout_6") + self.sag_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_plane_label.sizePolicy().hasHeightForWidth()) + self.sag_plane_label.setSizePolicy(sizePolicy) + self.sag_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_plane_label.setObjectName("sag_plane_label") + self.verticalLayout_6.addWidget(self.sag_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.sag_plane.sizePolicy().hasHeightForWidth()) + self.sag_plane.setSizePolicy(sizePolicy) + self.sag_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.sag_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.sag_plane.setMouseTracking(True) + self.sag_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.sag_plane.setText("") + self.sag_plane.setObjectName("sag_plane") + self.verticalLayout_6.addWidget(self.sag_plane) + self.horizontalLayout_7 = QtWidgets.QHBoxLayout() + self.horizontalLayout_7.setSpacing(5) + self.horizontalLayout_7.setObjectName("horizontalLayout_7") + self.sag_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_frame_num.sizePolicy().hasHeightForWidth()) + self.sag_frame_num.setSizePolicy(sizePolicy) + self.sag_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_frame_num.setObjectName("sag_frame_num") + self.horizontalLayout_7.addWidget(self.sag_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_of_label.sizePolicy().hasHeightForWidth()) + self.sag_of_label.setSizePolicy(sizePolicy) + self.sag_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.sag_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_of_label.setObjectName("sag_of_label") + self.horizontalLayout_7.addWidget(self.sag_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sag_total_frames.sizePolicy().hasHeightForWidth()) + self.sag_total_frames.setSizePolicy(sizePolicy) + self.sag_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.sag_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.sag_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.sag_total_frames.setObjectName("sag_total_frames") + self.horizontalLayout_7.addWidget(self.sag_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_7.setStretch(0, 1) + self.horizontalLayout_7.setStretch(2, 1) + self.verticalLayout_6.addLayout(self.horizontalLayout_7) + self.voi_layout.addLayout(self.verticalLayout_6, 0, 1, 1, 1) + self.verticalLayout_4 = QtWidgets.QVBoxLayout() + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.ax_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_plane_label.sizePolicy().hasHeightForWidth()) + self.ax_plane_label.setSizePolicy(sizePolicy) + self.ax_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_plane_label.setObjectName("ax_plane_label") + self.verticalLayout_4.addWidget(self.ax_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.ax_plane.sizePolicy().hasHeightForWidth()) + self.ax_plane.setSizePolicy(sizePolicy) + self.ax_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.ax_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.ax_plane.setMouseTracking(True) + self.ax_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.ax_plane.setText("") + self.ax_plane.setObjectName("ax_plane") + self.verticalLayout_4.addWidget(self.ax_plane) + self.horizontalLayout_6 = QtWidgets.QHBoxLayout() + self.horizontalLayout_6.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint) + self.horizontalLayout_6.setSpacing(5) + self.horizontalLayout_6.setObjectName("horizontalLayout_6") + self.ax_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_frame_num.sizePolicy().hasHeightForWidth()) + self.ax_frame_num.setSizePolicy(sizePolicy) + self.ax_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_frame_num.setObjectName("ax_frame_num") + self.horizontalLayout_6.addWidget(self.ax_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_of_label.sizePolicy().hasHeightForWidth()) + self.ax_of_label.setSizePolicy(sizePolicy) + self.ax_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.ax_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_of_label.setObjectName("ax_of_label") + self.horizontalLayout_6.addWidget(self.ax_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ax_total_frames.sizePolicy().hasHeightForWidth()) + self.ax_total_frames.setSizePolicy(sizePolicy) + self.ax_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.ax_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.ax_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.ax_total_frames.setObjectName("ax_total_frames") + self.horizontalLayout_6.addWidget(self.ax_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_6.setStretch(0, 1) + self.horizontalLayout_6.setStretch(2, 1) + self.verticalLayout_4.addLayout(self.horizontalLayout_6) + self.voi_layout.addLayout(self.verticalLayout_4, 0, 0, 1, 1) + self.verticalLayout_7 = QtWidgets.QVBoxLayout() + self.verticalLayout_7.setObjectName("verticalLayout_7") + self.cor_plane_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_plane_label.sizePolicy().hasHeightForWidth()) + self.cor_plane_label.setSizePolicy(sizePolicy) + self.cor_plane_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_plane_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_plane_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_plane_label.setObjectName("cor_plane_label") + self.verticalLayout_7.addWidget(self.cor_plane_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_plane = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(1) + sizePolicy.setHeightForWidth(self.cor_plane.sizePolicy().hasHeightForWidth()) + self.cor_plane.setSizePolicy(sizePolicy) + self.cor_plane.setMinimumSize(QtCore.QSize(321, 301)) + self.cor_plane.setCursor(QtGui.QCursor(QtCore.Qt.CursorShape.ArrowCursor)) + self.cor_plane.setMouseTracking(True) + self.cor_plane.setFrameShape(QtWidgets.QFrame.Shape.Box) + self.cor_plane.setText("") + self.cor_plane.setObjectName("cor_plane") + self.verticalLayout_7.addWidget(self.cor_plane) + self.horizontalLayout_8 = QtWidgets.QHBoxLayout() + self.horizontalLayout_8.setSpacing(5) + self.horizontalLayout_8.setObjectName("horizontalLayout_8") + self.cor_frame_num = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_frame_num.sizePolicy().hasHeightForWidth()) + self.cor_frame_num.setSizePolicy(sizePolicy) + self.cor_frame_num.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_frame_num.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_frame_num.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_frame_num.setObjectName("cor_frame_num") + self.horizontalLayout_8.addWidget(self.cor_frame_num, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_of_label.sizePolicy().hasHeightForWidth()) + self.cor_of_label.setSizePolicy(sizePolicy) + self.cor_of_label.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cor_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_of_label.setObjectName("cor_of_label") + self.horizontalLayout_8.addWidget(self.cor_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_total_frames = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cor_total_frames.sizePolicy().hasHeightForWidth()) + self.cor_total_frames.setSizePolicy(sizePolicy) + self.cor_total_frames.setStyleSheet("QLabel {\n" +" font-size: 15px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cor_total_frames.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cor_total_frames.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cor_total_frames.setObjectName("cor_total_frames") + self.horizontalLayout_8.addWidget(self.cor_total_frames, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_8.setStretch(0, 1) + self.horizontalLayout_8.setStretch(2, 1) + self.verticalLayout_7.addLayout(self.horizontalLayout_8) + self.voi_layout.addLayout(self.verticalLayout_7, 1, 1, 1, 1) + self.verticalLayout_5 = QtWidgets.QVBoxLayout() + self.verticalLayout_5.setContentsMargins(10, -1, 10, 20) + self.verticalLayout_5.setObjectName("verticalLayout_5") + self.verticalLayout_2 = QtWidgets.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.cur_slice_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.cur_slice_label.setScaledContents(False) + self.cur_slice_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cur_slice_label.setWordWrap(True) + self.cur_slice_label.setObjectName("cur_slice_label") + self.verticalLayout_2.addWidget(self.cur_slice_label) + self.horizontalLayout_5 = QtWidgets.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.cur_slice_slider = QtWidgets.QSlider(parent=self.horizontalLayoutWidget_4) + self.cur_slice_slider.setMinimumSize(QtCore.QSize(285, 0)) + self.cur_slice_slider.setMaximumSize(QtCore.QSize(285, 16777215)) + self.cur_slice_slider.setStyleSheet("QSlider {\n" +" color: white;\n" +"}") + self.cur_slice_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) + self.cur_slice_slider.setObjectName("cur_slice_slider") + self.horizontalLayout_5.addWidget(self.cur_slice_slider, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_spin_box = QtWidgets.QDoubleSpinBox(parent=self.horizontalLayoutWidget_4) + self.cur_slice_spin_box.setMaximumSize(QtCore.QSize(70, 16777215)) + self.cur_slice_spin_box.setStyleSheet("QDoubleSpinBox {\n" +" background: white;\n" +" color: black;\n" +"}") + self.cur_slice_spin_box.setObjectName("cur_slice_spin_box") + self.horizontalLayout_5.addWidget(self.cur_slice_spin_box, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_of_label.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.cur_slice_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cur_slice_of_label.setObjectName("cur_slice_of_label") + self.horizontalLayout_5.addWidget(self.cur_slice_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_total = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.cur_slice_total.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.cur_slice_total.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.cur_slice_total.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.cur_slice_total.setObjectName("cur_slice_total") + self.horizontalLayout_5.addWidget(self.cur_slice_total, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_5.setStretch(0, 1) + self.verticalLayout_2.addLayout(self.horizontalLayout_5) + self.verticalLayout_5.addLayout(self.verticalLayout_2) + self.voiAlphaLayout_2 = QtWidgets.QVBoxLayout() + self.voiAlphaLayout_2.setObjectName("voiAlphaLayout_2") + self.alpha_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_label.setStyleSheet("QLabel {\n" +" font-size: 20px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.alpha_label.setScaledContents(False) + self.alpha_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.alpha_label.setWordWrap(True) + self.alpha_label.setObjectName("alpha_label") + self.voiAlphaLayout_2.addWidget(self.alpha_label) + self.horizontalLayout_4 = QtWidgets.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.alpha_status = QtWidgets.QProgressBar(parent=self.horizontalLayoutWidget_4) + self.alpha_status.setMinimumSize(QtCore.QSize(285, 0)) + self.alpha_status.setMaximumSize(QtCore.QSize(285, 16777215)) + self.alpha_status.setProperty("value", 24) + self.alpha_status.setObjectName("alpha_status") + self.horizontalLayout_4.addWidget(self.alpha_status, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_spin_box = QtWidgets.QSpinBox(parent=self.horizontalLayoutWidget_4) + font = QtGui.QFont() + font.setPointSize(13) + self.alpha_spin_box.setFont(font) + self.alpha_spin_box.setStyleSheet("QSpinBox{\n" +" background-color: white,\n" +"}") + self.alpha_spin_box.setObjectName("alpha_spin_box") + self.horizontalLayout_4.addWidget(self.alpha_spin_box, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_of_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_of_label.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_of_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.alpha_of_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.alpha_of_label.setObjectName("alpha_of_label") + self.horizontalLayout_4.addWidget(self.alpha_of_label, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_total = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.alpha_total.setStyleSheet("QLabel {\n" +" font-size: 17px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.alpha_total.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.alpha_total.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.alpha_total.setObjectName("alpha_total") + self.horizontalLayout_4.addWidget(self.alpha_total, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.horizontalLayout_4.setStretch(0, 1) + self.horizontalLayout_4.setStretch(1, 1) + self.voiAlphaLayout_2.addLayout(self.horizontalLayout_4) + self.verticalLayout_5.addLayout(self.voiAlphaLayout_2) + self.confirmation_frame_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.confirmation_frame_label.setMinimumSize(QtCore.QSize(0, 0)) + self.confirmation_frame_label.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.confirmation_frame_label.setStyleSheet("QLabel {\n" +" font-size: 18px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.confirmation_frame_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.confirmation_frame_label.setScaledContents(False) + self.confirmation_frame_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.confirmation_frame_label.setWordWrap(True) + self.confirmation_frame_label.setObjectName("confirmation_frame_label") + self.verticalLayout_5.addWidget(self.confirmation_frame_label) + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setContentsMargins(-1, -1, 0, 0) + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.confirm_seg_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.confirm_seg_button.setMinimumSize(QtCore.QSize(221, 41)) + self.confirm_seg_button.setMaximumSize(QtCore.QSize(221, 41)) + self.confirm_seg_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.confirm_seg_button.setCheckable(True) + self.confirm_seg_button.setChecked(False) + self.confirm_seg_button.setObjectName("confirm_seg_button") + self.horizontalLayout_2.addWidget(self.confirm_seg_button) + self.back_from_confirm_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.back_from_confirm_button.setMinimumSize(QtCore.QSize(241, 41)) + self.back_from_confirm_button.setMaximumSize(QtCore.QSize(241, 41)) + self.back_from_confirm_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}\n" +"QPushButton:checked {\n" +" color:white; \n" +" font-size: 16px;\n" +" background: rgb(45, 0, 110);\n" +" border-radius: 15px;\n" +"}\n" +"") + self.back_from_confirm_button.setCheckable(False) + self.back_from_confirm_button.setChecked(False) + self.back_from_confirm_button.setObjectName("back_from_confirm_button") + self.horizontalLayout_2.addWidget(self.back_from_confirm_button) + self.verticalLayout_5.addLayout(self.horizontalLayout_2) + self.voi_layout.addLayout(self.verticalLayout_5, 1, 0, 1, 1) + self.voi_layout.setColumnStretch(0, 1) + self.voi_layout.setColumnStretch(1, 1) + self.full_screen_layout.addLayout(self.voi_layout) + + self.retranslateUi(confirm_voi) + QtCore.QMetaObject.connectSlotsByName(confirm_voi) + + def retranslateUi(self, confirm_voi): + _translate = QtCore.QCoreApplication.translate + confirm_voi.setWindowTitle(_translate("confirm_voi", "Draw Volume of Interest")) + self.sidebar.setToolTip(_translate("confirm_voi", "


")) + self.imageSelectionLabelSidebar.setText(_translate("confirm_voi", "Image Selection:")) + self.imageLabel.setText(_translate("confirm_voi", "Image:")) + self.phantomLabel.setText(_translate("confirm_voi", "Phantom:")) + self.image_path_input.setText(_translate("confirm_voi", "Sample filename ")) + self.phantom_path_input.setText(_translate("confirm_voi", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("confirm_voi", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("confirm_voi", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("confirm_voi", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("confirm_voi", "Analysis Parameter Selection")) + self.observing_label.setText(_translate("confirm_voi", "Observing!")) + self.navigating_label.setText(_translate("confirm_voi", "Navigating!")) + self.toggle_crosshair_visibility_button.setText(_translate("confirm_voi", "Show/Hide Cross")) + self.sag_plane_label.setText(_translate("confirm_voi", "Sagittal Plane")) + self.sag_frame_num.setText(_translate("confirm_voi", "0")) + self.sag_of_label.setText(_translate("confirm_voi", "of")) + self.sag_total_frames.setText(_translate("confirm_voi", "0")) + self.ax_plane_label.setText(_translate("confirm_voi", "Axial Plane")) + self.ax_frame_num.setText(_translate("confirm_voi", "0")) + self.ax_of_label.setText(_translate("confirm_voi", "of")) + self.ax_total_frames.setText(_translate("confirm_voi", "0")) + self.cor_plane_label.setText(_translate("confirm_voi", "Coronal Plane")) + self.cor_frame_num.setText(_translate("confirm_voi", "0")) + self.cor_of_label.setText(_translate("confirm_voi", "of")) + self.cor_total_frames.setText(_translate("confirm_voi", "0")) + self.cur_slice_label.setText(_translate("confirm_voi", "Current Slice (in seconds):")) + self.cur_slice_of_label.setText(_translate("confirm_voi", "of")) + self.cur_slice_total.setText(_translate("confirm_voi", "0")) + self.alpha_label.setText(_translate("confirm_voi", "VOI Alpha:")) + self.alpha_of_label.setText(_translate("confirm_voi", "of")) + self.alpha_total.setText(_translate("confirm_voi", "255")) + self.confirmation_frame_label.setText(_translate("confirm_voi", "Frame: 0")) + self.confirm_seg_button.setText(_translate("confirm_voi", "Confirm")) + self.back_from_confirm_button.setText(_translate("confirm_voi", "Back")) diff --git a/src/qus/visualization_loading/ui/visualization_function_selection_ui.py b/src/qus/visualization_loading/ui/visualization_function_selection_ui.py new file mode 100644 index 0000000..44db660 --- /dev/null +++ b/src/qus/visualization_loading/ui/visualization_function_selection_ui.py @@ -0,0 +1,346 @@ +# Form implementation generated from reading ui file 'src\qus\visualization_loading\ui\visualization_function_selection.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_visualizationFunctionSelection(object): + def setupUi(self, visualizationFunctionSelection): + visualizationFunctionSelection.setObjectName("visualizationFunctionSelection") + visualizationFunctionSelection.resize(1400, 1070) + visualizationFunctionSelection.setMinimumSize(QtCore.QSize(1400, 662)) + visualizationFunctionSelection.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.horizontalLayoutWidget_4 = QtWidgets.QWidget(parent=visualizationFunctionSelection) + self.horizontalLayoutWidget_4.setGeometry(QtCore.QRect(50, 10, 1151, 801)) + self.horizontalLayoutWidget_4.setObjectName("horizontalLayoutWidget_4") + self.full_screen_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_4) + self.full_screen_layout.setContentsMargins(0, 0, 0, 0) + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=self.horizontalLayoutWidget_4) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.segmentationSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.segmentationSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.segmentationSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.segmentationSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.segmentationSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.segmentationSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.segmentationSidebar.setObjectName("segmentationSidebar") + self.segmentationSidebarLabel = QtWidgets.QLabel(parent=self.segmentationSidebar) + self.segmentationSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.segmentationSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.segmentationSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.segmentationSidebarLabel.setObjectName("segmentationSidebarLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=self.horizontalLayoutWidget_4) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid.addWidget(self.back_button, 1, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.visualization_function_layout = QtWidgets.QVBoxLayout() + self.visualization_function_layout.setContentsMargins(30, 30, 10, 10) + self.visualization_function_layout.setSpacing(20) + self.visualization_function_layout.setObjectName("visualization_function_layout") + self.analysis_function_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.analysis_function_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.analysis_function_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.analysis_function_label.setScaledContents(False) + self.analysis_function_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysis_function_label.setWordWrap(True) + self.analysis_function_label.setObjectName("analysis_function_label") + self.visualization_function_layout.addWidget(self.analysis_function_label) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.funcs_list = QtWidgets.QListWidget(parent=self.horizontalLayoutWidget_4) + self.funcs_list.setObjectName("funcs_list") + self.horizontalLayout.addWidget(self.funcs_list) + self.chooseImgLayout = QtWidgets.QVBoxLayout() + self.chooseImgLayout.setContentsMargins(5, -1, 5, -1) + self.chooseImgLayout.setObjectName("chooseImgLayout") + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem2) + self.dest_path_label = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.dest_path_label.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.dest_path_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.dest_path_label.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.dest_path_label.setObjectName("dest_path_label") + self.chooseImgLayout.addWidget(self.dest_path_label) + self.dest_path_input = QtWidgets.QLineEdit(parent=self.horizontalLayoutWidget_4) + self.dest_path_input.setMinimumSize(QtCore.QSize(201, 31)) + self.dest_path_input.setMaximumSize(QtCore.QSize(401, 31)) + self.dest_path_input.setStyleSheet("QLineEdit {\n" +" background-color: rgb(249, 249, 249);\n" +" color: black;\n" +"}") + self.dest_path_input.setObjectName("dest_path_input") + self.chooseImgLayout.addWidget(self.dest_path_input, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.chooseImageButtonsLayout = QtWidgets.QHBoxLayout() + self.chooseImageButtonsLayout.setSpacing(1) + self.chooseImageButtonsLayout.setObjectName("chooseImageButtonsLayout") + self.choose_dest_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.choose_dest_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.choose_dest_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.choose_dest_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.choose_dest_path_button.setObjectName("choose_dest_path_button") + self.chooseImageButtonsLayout.addWidget(self.choose_dest_path_button, 0, QtCore.Qt.AlignmentFlag.AlignRight) + self.clear_dest_path_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.clear_dest_path_button.setMinimumSize(QtCore.QSize(131, 41)) + self.clear_dest_path_button.setMaximumSize(QtCore.QSize(131, 41)) + self.clear_dest_path_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.clear_dest_path_button.setObjectName("clear_dest_path_button") + self.chooseImageButtonsLayout.addWidget(self.clear_dest_path_button) + self.chooseImgLayout.addLayout(self.chooseImageButtonsLayout) + self.clear_dest_path_hint = QtWidgets.QLabel(parent=self.horizontalLayoutWidget_4) + self.clear_dest_path_hint.setStyleSheet("QLabel {\n" +" background-color: rgba(255, 255, 255, 0);\n" +" color: white;\n" +" font-size: 17px;\n" +"}") + self.clear_dest_path_hint.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.clear_dest_path_hint.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.NoTextInteraction) + self.clear_dest_path_hint.setObjectName("clear_dest_path_hint") + self.chooseImgLayout.addWidget(self.clear_dest_path_hint) + spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.chooseImgLayout.addItem(spacerItem3) + self.horizontalLayout.addLayout(self.chooseImgLayout) + self.horizontalLayout.setStretch(0, 10) + self.horizontalLayout.setStretch(1, 1) + self.visualization_function_layout.addLayout(self.horizontalLayout) + self.next_button = QtWidgets.QPushButton(parent=self.horizontalLayoutWidget_4) + self.next_button.setMinimumSize(QtCore.QSize(131, 41)) + self.next_button.setMaximumSize(QtCore.QSize(131, 41)) + self.next_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.next_button.setObjectName("next_button") + self.visualization_function_layout.addWidget(self.next_button, 0, QtCore.Qt.AlignmentFlag.AlignHCenter|QtCore.Qt.AlignmentFlag.AlignVCenter) + spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.visualization_function_layout.addItem(spacerItem4) + self.visualization_function_layout.setStretch(0, 1) + self.visualization_function_layout.setStretch(1, 10) + self.visualization_function_layout.setStretch(2, 1) + self.visualization_function_layout.setStretch(3, 1) + self.full_screen_layout.addLayout(self.visualization_function_layout) + + self.retranslateUi(visualizationFunctionSelection) + QtCore.QMetaObject.connectSlotsByName(visualizationFunctionSelection) + + def retranslateUi(self, visualizationFunctionSelection): + _translate = QtCore.QCoreApplication.translate + visualizationFunctionSelection.setWindowTitle(_translate("visualizationFunctionSelection", "Visualization Configuration Loading")) + self.sidebar.setToolTip(_translate("visualizationFunctionSelection", "


")) + self.imageSelectionLabelSidebar.setText(_translate("visualizationFunctionSelection", "Image Selection:")) + self.imageLabel.setText(_translate("visualizationFunctionSelection", "Image:")) + self.phantomLabel.setText(_translate("visualizationFunctionSelection", "Phantom:")) + self.image_path_input.setText(_translate("visualizationFunctionSelection", "Sample filename ")) + self.phantom_path_input.setText(_translate("visualizationFunctionSelection", "Sample filename ")) + self.segmentationSidebarLabel.setText(_translate("visualizationFunctionSelection", "Segmentation Selection")) + self.analysisParamsLabel.setText(_translate("visualizationFunctionSelection", "Analysis Parameter Selection")) + self.rfAnalysisLabel.setText(_translate("visualizationFunctionSelection", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("visualizationFunctionSelection", "Visualization / Export")) + self.back_button.setText(_translate("visualizationFunctionSelection", "Back")) + self.analysis_function_label.setText(_translate("visualizationFunctionSelection", "Select visualization functions to run:")) + self.dest_path_label.setText(_translate("visualizationFunctionSelection", "Destination folder:")) + self.choose_dest_path_button.setText(_translate("visualizationFunctionSelection", "Choose File")) + self.clear_dest_path_button.setText(_translate("visualizationFunctionSelection", "Clear Path")) + self.clear_dest_path_hint.setText(_translate("visualizationFunctionSelection", "\n" +"Default destination folder\n" +"saves results internally.\n" +"Modify for persistent exporting.")) + self.next_button.setText(_translate("visualizationFunctionSelection", "Next")) diff --git a/src/qus/visualization_loading/ui/visualization_preview_2d_ui.py b/src/qus/visualization_loading/ui/visualization_preview_2d_ui.py new file mode 100644 index 0000000..44a4431 --- /dev/null +++ b/src/qus/visualization_loading/ui/visualization_preview_2d_ui.py @@ -0,0 +1,298 @@ +# Form implementation generated from reading ui file 'src\qus\visualization_loading\ui\visualization_preview_2d.ui' +# +# Created by: PyQt6 UI code generator 6.9.1 +# +# WARNING: Any manual changes made to this file will be lost when pyuic6 is +# run again. Do not edit this file unless you know what you are doing. + + +from PyQt6 import QtCore, QtGui, QtWidgets + + +class Ui_visualization_preview_2d(object): + def setupUi(self, visualization_preview_2d): + visualization_preview_2d.setObjectName("visualization_preview_2d") + visualization_preview_2d.resize(1400, 764) + visualization_preview_2d.setMinimumSize(QtCore.QSize(1400, 662)) + visualization_preview_2d.setStyleSheet("QWidget {\n" +" background: rgb(42, 42, 42);\n" +"}") + self.main_layout = QtWidgets.QVBoxLayout(visualization_preview_2d) + self.main_layout.setContentsMargins(0, 0, 0, 0) + self.main_layout.setObjectName("main_layout") + self.full_screen_layout = QtWidgets.QHBoxLayout() + self.full_screen_layout.setObjectName("full_screen_layout") + self.side_bar_layout = QtWidgets.QVBoxLayout() + self.side_bar_layout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMaximumSize) + self.side_bar_layout.setSpacing(0) + self.side_bar_layout.setObjectName("side_bar_layout") + self.sidebar = QtWidgets.QWidget(parent=visualization_preview_2d) + self.sidebar.setMinimumSize(QtCore.QSize(341, 601)) + self.sidebar.setMaximumSize(QtCore.QSize(241, 601)) + self.sidebar.setStyleSheet("QWidget {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.sidebar.setObjectName("sidebar") + self.imageSelectionSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.imageSelectionSidebar.setGeometry(QtCore.QRect(0, 0, 341, 121)) + self.imageSelectionSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.imageSelectionSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.imageSelectionSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.imageSelectionSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.imageSelectionSidebar.setObjectName("imageSelectionSidebar") + self.imageSelectionLabelSidebar = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageSelectionLabelSidebar.setGeometry(QtCore.QRect(70, 0, 191, 51)) + self.imageSelectionLabelSidebar.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageSelectionLabelSidebar.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageSelectionLabelSidebar.setObjectName("imageSelectionLabelSidebar") + self.imageLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.imageLabel.setGeometry(QtCore.QRect(-60, 40, 191, 51)) + self.imageLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.imageLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.imageLabel.setObjectName("imageLabel") + self.phantomLabel = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantomLabel.setGeometry(QtCore.QRect(-50, 70, 191, 51)) + self.phantomLabel.setStyleSheet("QLabel {\n" +" font-size: 16px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold\n" +"}") + self.phantomLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.phantomLabel.setObjectName("phantomLabel") + self.image_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.image_path_input.setGeometry(QtCore.QRect(100, 40, 241, 51)) + self.image_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.image_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.image_path_input.setObjectName("image_path_input") + self.phantom_path_input = QtWidgets.QLabel(parent=self.imageSelectionSidebar) + self.phantom_path_input.setGeometry(QtCore.QRect(100, 70, 241, 51)) + self.phantom_path_input.setStyleSheet("QLabel {\n" +" font-size: 14px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +"}") + self.phantom_path_input.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.phantom_path_input.setObjectName("phantom_path_input") + self.roiSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.roiSidebar.setGeometry(QtCore.QRect(0, 120, 341, 121)) + self.roiSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.roiSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.roiSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.roiSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.roiSidebar.setObjectName("roiSidebar") + self.roiSidebarLabel = QtWidgets.QLabel(parent=self.roiSidebar) + self.roiSidebarLabel.setGeometry(QtCore.QRect(0, 40, 341, 51)) + self.roiSidebarLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.roiSidebarLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.roiSidebarLabel.setObjectName("roiSidebarLabel") + self.rfAnalysisSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.rfAnalysisSidebar.setGeometry(QtCore.QRect(0, 360, 341, 121)) + self.rfAnalysisSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.rfAnalysisSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.rfAnalysisSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.rfAnalysisSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.rfAnalysisSidebar.setObjectName("rfAnalysisSidebar") + self.rfAnalysisLabel = QtWidgets.QLabel(parent=self.rfAnalysisSidebar) + self.rfAnalysisLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.rfAnalysisLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.rfAnalysisLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.rfAnalysisLabel.setObjectName("rfAnalysisLabel") + self.exportResultsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.exportResultsSidebar.setGeometry(QtCore.QRect(0, 480, 341, 121)) + self.exportResultsSidebar.setMinimumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.exportResultsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.exportResultsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.exportResultsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.exportResultsSidebar.setObjectName("exportResultsSidebar") + self.exportResultsLabel = QtWidgets.QLabel(parent=self.exportResultsSidebar) + self.exportResultsLabel.setGeometry(QtCore.QRect(20, 30, 301, 51)) + self.exportResultsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight: bold;\n" +"}") + self.exportResultsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.exportResultsLabel.setObjectName("exportResultsLabel") + self.analysisParamsSidebar = QtWidgets.QFrame(parent=self.sidebar) + self.analysisParamsSidebar.setGeometry(QtCore.QRect(0, 240, 341, 121)) + self.analysisParamsSidebar.setMaximumSize(QtCore.QSize(341, 121)) + self.analysisParamsSidebar.setStyleSheet("QFrame {\n" +" background-color: rgb(99, 0, 174);\n" +" border: 1px solid black;\n" +"}") + self.analysisParamsSidebar.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.analysisParamsSidebar.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.analysisParamsSidebar.setObjectName("analysisParamsSidebar") + self.analysisParamsLabel = QtWidgets.QLabel(parent=self.analysisParamsSidebar) + self.analysisParamsLabel.setGeometry(QtCore.QRect(0, 30, 341, 51)) + self.analysisParamsLabel.setStyleSheet("QLabel {\n" +" font-size: 21px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +" border: 0px;\n" +" font-weight:bold;\n" +"}") + self.analysisParamsLabel.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.analysisParamsLabel.setObjectName("analysisParamsLabel") + self.side_bar_layout.addWidget(self.sidebar) + self.gridFrame = QtWidgets.QFrame(parent=visualization_preview_2d) + self.gridFrame.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame.setObjectName("gridFrame") + self.backButtonGrid = QtWidgets.QGridLayout(self.gridFrame) + self.backButtonGrid.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid.setObjectName("backButtonGrid") + self.gridFrame_2 = QtWidgets.QFrame(parent=self.gridFrame) + self.gridFrame_2.setMinimumSize(QtCore.QSize(341, 0)) + self.gridFrame_2.setMaximumSize(QtCore.QSize(341, 16777215)) + self.gridFrame_2.setStyleSheet("QFrame {\n" +" background-color: rgb(28, 0, 101);\n" +"}") + self.gridFrame_2.setObjectName("gridFrame_2") + self.backButtonGrid_2 = QtWidgets.QGridLayout(self.gridFrame_2) + self.backButtonGrid_2.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetMinAndMaxSize) + self.backButtonGrid_2.setContentsMargins(10, 10, 10, 10) + self.backButtonGrid_2.setObjectName("backButtonGrid_2") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.backButtonGrid_2.addItem(spacerItem, 0, 0, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.backButtonGrid_2.addItem(spacerItem1, 1, 1, 1, 1) + self.back_button = QtWidgets.QPushButton(parent=self.gridFrame_2) + self.back_button.setMinimumSize(QtCore.QSize(131, 41)) + self.back_button.setMaximumSize(QtCore.QSize(131, 41)) + self.back_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.back_button.setObjectName("back_button") + self.backButtonGrid_2.addWidget(self.back_button, 1, 0, 1, 1) + self.backButtonGrid.addWidget(self.gridFrame_2, 0, 0, 1, 1) + self.side_bar_layout.addWidget(self.gridFrame) + self.full_screen_layout.addLayout(self.side_bar_layout) + self.preview_layout = QtWidgets.QVBoxLayout() + self.preview_layout.setContentsMargins(30, 10, 30, 10) + self.preview_layout.setSpacing(10) + self.preview_layout.setObjectName("preview_layout") + self.visualization_preview_label = QtWidgets.QLabel(parent=visualization_preview_2d) + self.visualization_preview_label.setStyleSheet("QLabel {\n" +" font-size: 29px;\n" +" color: rgb(255, 255, 255);\n" +" background-color: rgba(255, 255, 255, 0);\n" +"}") + self.visualization_preview_label.setTextFormat(QtCore.Qt.TextFormat.AutoText) + self.visualization_preview_label.setScaledContents(False) + self.visualization_preview_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.visualization_preview_label.setWordWrap(True) + self.visualization_preview_label.setObjectName("visualization_preview_label") + self.preview_layout.addWidget(self.visualization_preview_label) + self.visualization_dropdown = QtWidgets.QComboBox(parent=visualization_preview_2d) + self.visualization_dropdown.setMinimumSize(QtCore.QSize(180, 41)) + self.visualization_dropdown.setMaximumSize(QtCore.QSize(16777215, 16777215)) + font = QtGui.QFont() + font.setPointSize(16) + self.visualization_dropdown.setFont(font) + self.visualization_dropdown.setStyleSheet("QComboBox {\n" +" color: white;\n" +"}") + self.visualization_dropdown.setObjectName("visualization_dropdown") + self.preview_layout.addWidget(self.visualization_dropdown) + self.visualization_display_frame = QtWidgets.QFrame(parent=visualization_preview_2d) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(10) + sizePolicy.setVerticalStretch(10) + sizePolicy.setHeightForWidth(self.visualization_display_frame.sizePolicy().hasHeightForWidth()) + self.visualization_display_frame.setSizePolicy(sizePolicy) + self.visualization_display_frame.setMinimumSize(QtCore.QSize(501, 321)) + self.visualization_display_frame.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.visualization_display_frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) + self.visualization_display_frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) + self.visualization_display_frame.setObjectName("visualization_display_frame") + self.preview_layout.addWidget(self.visualization_display_frame) + self.export_numerical_data_button = QtWidgets.QPushButton(parent=visualization_preview_2d) + self.export_numerical_data_button.setMinimumSize(QtCore.QSize(181, 41)) + self.export_numerical_data_button.setMaximumSize(QtCore.QSize(181, 41)) + self.export_numerical_data_button.setStyleSheet("QPushButton {\n" +" color: white;\n" +" font-size: 16px;\n" +" background: rgb(90, 37, 255);\n" +" border-radius: 15px;\n" +"}") + self.export_numerical_data_button.setObjectName("export_numerical_data_button") + self.preview_layout.addWidget(self.export_numerical_data_button, 0, QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignVCenter) + self.preview_layout.setStretch(0, 1) + self.full_screen_layout.addLayout(self.preview_layout) + self.main_layout.addLayout(self.full_screen_layout) + + self.retranslateUi(visualization_preview_2d) + QtCore.QMetaObject.connectSlotsByName(visualization_preview_2d) + + def retranslateUi(self, visualization_preview_2d): + _translate = QtCore.QCoreApplication.translate + visualization_preview_2d.setWindowTitle(_translate("visualization_preview_2d", "Select Region of Interest")) + self.sidebar.setToolTip(_translate("visualization_preview_2d", "


")) + self.imageSelectionLabelSidebar.setText(_translate("visualization_preview_2d", "Image Selection:")) + self.imageLabel.setText(_translate("visualization_preview_2d", "Image:")) + self.phantomLabel.setText(_translate("visualization_preview_2d", "Phantom:")) + self.image_path_input.setText(_translate("visualization_preview_2d", "Sample filename ")) + self.phantom_path_input.setText(_translate("visualization_preview_2d", "Sample filename ")) + self.roiSidebarLabel.setText(_translate("visualization_preview_2d", "Segmentation Selection")) + self.rfAnalysisLabel.setText(_translate("visualization_preview_2d", "Radio Frequency Data Analysis")) + self.exportResultsLabel.setText(_translate("visualization_preview_2d", "Visualization / Export")) + self.analysisParamsLabel.setText(_translate("visualization_preview_2d", "Analysis Parameter Selection")) + self.back_button.setText(_translate("visualization_preview_2d", "Back")) + self.visualization_preview_label.setText(_translate("visualization_preview_2d", "Visualization Previews")) + self.export_numerical_data_button.setText(_translate("visualization_preview_2d", "Export Numerical Data")) From a8ceaf986520327a9022925de136b5cd64934b10 Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 20 Feb 2026 11:34:29 +0100 Subject: [PATCH 49/61] Fix GUI loading of saved NIfTI VOI - update seg loading components --- engines/ceus | 2 +- src/ceus/application_model.py | 13 + src/ceus/seg_loading/__init__.py | 2 + .../seg_loading/seg_loading_controller.py | 5 +- .../seg_loading_view_coordinator.py | 28 +- src/ceus/seg_loading/views/draw_roi_widget.py | 63 ++ src/ceus/seg_loading/views/draw_voi_widget.py | 81 ++- .../seg_loading/views/seg_preview_widget.py | 672 ++++++++++++++++++ 8 files changed, 838 insertions(+), 28 deletions(-) create mode 100644 src/ceus/seg_loading/views/seg_preview_widget.py diff --git a/engines/ceus b/engines/ceus index 8eaccd8..ac0a06f 160000 --- a/engines/ceus +++ b/engines/ceus @@ -1 +1 @@ -Subproject commit 8eaccd8b856aeeb4e9a27de35646d69506dcb630 +Subproject commit ac0a06faa707e4c9ff87aa8ae86276e47b7e8aa6 diff --git a/src/ceus/application_model.py b/src/ceus/application_model.py index 5b5be9a..25e62c0 100644 --- a/src/ceus/application_model.py +++ b/src/ceus/application_model.py @@ -614,6 +614,19 @@ def _on_segmentation_loading_complete(self, seg_data: CeusSeg) -> None: else: print(f"DEBUG: Segmentation loading failed - invalid seg data") self._emit_error("Failed to load segmentation data") + + def set_manual_segmentation(self, seg_data: CeusSeg) -> None: + """ + Set manually drawn segmentation data. + + Args: + seg_data: Manually drawn segmentation data + """ + if seg_data and hasattr(seg_data, 'seg_mask') and seg_data.seg_mask is not None: + self._seg_data = seg_data + self.segmentation_loaded.emit(seg_data) + else: + self._emit_error("Invalid manual segmentation data") def cleanup(self) -> None: """Clean up resources.""" diff --git a/src/ceus/seg_loading/__init__.py b/src/ceus/seg_loading/__init__.py index 9047816..120438d 100644 --- a/src/ceus/seg_loading/__init__.py +++ b/src/ceus/seg_loading/__init__.py @@ -8,6 +8,8 @@ # Individual widget components from .views.seg_type_selection_widget import SegTypeSelectionWidget from .views.seg_file_selection_widget import SegFileSelectionWidget +from .views.seg_preview_widget import SegPreviewWidget +from .views.draw_roi_widget import DrawROIWidget __all__ = [ 'SegmentationLoadingModel', diff --git a/src/ceus/seg_loading/seg_loading_controller.py b/src/ceus/seg_loading/seg_loading_controller.py index d8caf7c..b444d0d 100644 --- a/src/ceus/seg_loading/seg_loading_controller.py +++ b/src/ceus/seg_loading/seg_loading_controller.py @@ -65,7 +65,10 @@ def handle_user_action(self, action_name: str, action_data: Any) -> None: elif action_name == 'load_segmentation': self._handle_segmentation_loading(action_data) elif action_name == 'segmentation_confirmed': - pass # Handle confirmation action in the application controller + # Ensure the model has the confirmed segmentation data + # This is especially important for manually drawn segmentations + if action_data: + self.model.set_manual_segmentation(action_data) else: raise ValueError(f"Unknown action: {action_name}") diff --git a/src/ceus/seg_loading/seg_loading_view_coordinator.py b/src/ceus/seg_loading/seg_loading_view_coordinator.py index 19c3183..70b5e76 100644 --- a/src/ceus/seg_loading/seg_loading_view_coordinator.py +++ b/src/ceus/seg_loading/seg_loading_view_coordinator.py @@ -15,6 +15,7 @@ from .views.seg_file_selection_widget import SegFileSelectionWidget from .views.draw_roi_widget import DrawROIWidget from .views.draw_voi_widget import DrawVOIWidget +from .views.seg_preview_widget import SegPreviewWidget from engines.ceus.src.data_objs import UltrasoundImage, CeusSeg @@ -48,6 +49,7 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None self._seg_type_widget: Optional[SegTypeSelectionWidget] = None self._seg_file_widget: Optional[SegFileSelectionWidget] = None self._voi_drawing_widget: Optional[DrawVOIWidget] = None + self._seg_preview_widget: Optional[SegPreviewWidget] = None # Current state self._selected_seg_type: Optional[str] = None @@ -109,6 +111,7 @@ def reset_to_seg_type_selection(self) -> None: widgets_to_remove = [ self._seg_file_widget, self._voi_drawing_widget, + self._seg_preview_widget, ] for widget in widgets_to_remove: @@ -181,6 +184,7 @@ def show_voi_drawing(self) -> None: self._voi_drawing_widget = DrawVOIWidget(self._image_data) # Connect signals to handle user actions + self._voi_drawing_widget.segmentation_completed.connect(self.show_segmentation_preview) self._voi_drawing_widget.back_requested.connect(self.reset_to_seg_type_selection) self._voi_drawing_widget.close_requested.connect(self.close_requested.emit) @@ -193,6 +197,7 @@ def show_roi_drawing(self) -> None: self._roi_drawing_widget = DrawROIWidget(self._image_data) # Connect signals to handle user actions + self._roi_drawing_widget.segmentation_completed.connect(self.show_segmentation_preview) self._roi_drawing_widget.back_requested.connect(self.reset_to_seg_type_selection) self._roi_drawing_widget.close_requested.connect(self.close_requested.emit) @@ -207,13 +212,26 @@ def show_segmentation_preview(self, seg_data: CeusSeg) -> None: Args: seg_data: Loaded segmentation data """ + # Avoid redundant preview if already showing this data + if self._seg_preview_widget and self._seg_data is seg_data: + self.setCurrentWidget(self._seg_preview_widget) + return + self._seg_data = seg_data - # For now, since CEUS specific preview widgets are not yet implemented, - # we automatically confirm the segmentation to allow the workflow to continue. - # This prevents the application from getting "stuck" after loading. - print(f"DEBUG: Segmentation loaded, automatically confirming (Preview not yet implemented for CEUS)") - self.user_action.emit('segmentation_confirmed', seg_data) + # Create and setup segmentation preview widget + self._seg_preview_widget = SegPreviewWidget(self._image_data, seg_data) + + # Connect signals to handle user actions + self._seg_preview_widget.segmentation_confirmed.connect( + lambda: self.user_action.emit('segmentation_confirmed', seg_data) + ) + self._seg_preview_widget.back_requested.connect(self.reset_to_seg_type_selection) + self._seg_preview_widget.close_requested.connect(self.close_requested.emit) + + # Add to stack and show + self.addWidget(self._seg_preview_widget) + self.setCurrentWidget(self._seg_preview_widget) # ============================================================================ # USER ACTION HANDLING - Process user interactions and communicate with controller diff --git a/src/ceus/seg_loading/views/draw_roi_widget.py b/src/ceus/seg_loading/views/draw_roi_widget.py index 6ae71a3..5c2d891 100644 --- a/src/ceus/seg_loading/views/draw_roi_widget.py +++ b/src/ceus/seg_loading/views/draw_roi_widget.py @@ -20,6 +20,7 @@ from ..ui.draw_roi_ui import Ui_constructRoi from engines.ceus.src.data_objs import UltrasoundImage from engines.ceus.src.image_preprocessing.functions import enhance_clahe, enhance_gamma +from engines.ceus.src.data_objs.seg import CeusSeg # Philips CEUS Colormap: Grayscale -> Red -> Yellow philips_colors = [ @@ -42,6 +43,7 @@ class DrawROIWidget(QWidget, BaseViewMixin): # Signals for communicating with controller segmentation_saved = pyqtSignal(str) # emit with saved file path + segmentation_completed = pyqtSignal(object) # CeusSeg object back_requested = pyqtSignal() close_requested = pyqtSignal() @@ -117,6 +119,8 @@ def _setup_ui(self) -> None: 'roi_name_label', 'save_name_input', 'save_roi_button', 'back_from_save_button', ] + self._save_objects = self._save_seg_menu_objects + self._draw_types_objects = [ 'draw_rect_drag_type_button', 'draw_freehand_drag_type_button', 'draw_pts_type_button', ] @@ -133,6 +137,17 @@ def _setup_ui(self) -> None: # Setup matplotlib canvas for frame preview self._setup_matplotlib_canvas() + + # Add a "Confirm & Review" button programmatically + from PyQt6.QtWidgets import QPushButton + self.confirm_review_button = QPushButton("Confirm && Review", parent=self) + self.confirm_review_button.setMinimumSize(self._ui.save_roi_button.minimumSize()) + self.confirm_review_button.setMaximumSize(self._ui.save_roi_button.maximumSize()) + self.confirm_review_button.setStyleSheet(self._ui.save_roi_button.styleSheet()) + # Position it next to the save button in the layout + self._ui.chooseImageButtonsLayout_4.addWidget(self.confirm_review_button) + self.confirm_review_button.hide() + self._setup_enhancement_controls() # Display frame preview @@ -166,6 +181,7 @@ def _connect_signals(self) -> None: self._ui.clear_save_folder_button.clicked.connect(self._ui.save_folder_input.clear) self._ui.back_from_save_button.clicked.connect(self._show_draw_type_selection) self._ui.save_roi_button.clicked.connect(self._on_save_roi) + self.confirm_review_button.clicked.connect(self._on_confirm_review_clicked) def _initialize_frame_preview(self) -> None: """Initialize the frame preview with optimized matplotlib setup.""" @@ -740,6 +756,7 @@ def _select_dest_folder(self) -> None: def _hide_save_menu(self) -> None: """Hide the save menu.""" + self.confirm_review_button.hide() for obj_name in self._save_seg_menu_objects: widget = getattr(self._ui, obj_name, None) if widget: @@ -780,6 +797,7 @@ def _show_save_menu(self) -> None: widget.show() else: print(f"Warning: Widget '{obj_name}' not found in UI") + self.confirm_review_button.show() def _hide_draw_type_selection(self) -> None: """Hide the draw type selection layout.""" @@ -938,3 +956,48 @@ def _on_save_roi(self) -> None: self.segmentation_saved.emit(nii_path) print(f"Segmentation saved to: {nii_path}") + + def _on_confirm_review_clicked(self) -> None: + """Handle confirmation and transition to formal review screen.""" + + # Ensure there is a drawn ROI to confirm + if len(self._roi_plot_coords[0]) < 3: + self.show_error("Please draw a valid region of interest before confirming.") + return + + # Create binary mask from drawn ROI + spline = [(self._roi_plot_coords[0][i], self._roi_plot_coords[1][i]) for i in range(len(self._roi_plot_coords[0]))] + + # Note: self._all_frames shape is [t, y, x] (or similar) + # Based on _on_save_roi, it seems to be [t, y, x] + mask_2d = Image.new("L", (self._all_frames[self._frame].shape[1], self._all_frames[self._frame].shape[0]), 0) + ImageDraw.Draw(mask_2d).polygon(spline, outline=1, fill=1) + mask_2d = np.array(mask_2d, dtype=np.uint8) + + # Create CeusSeg object + seg_data = CeusSeg() + seg_data.seg_name = f"Manual_{self._image_data.scan_name}" + + # CEUS expects 3D mask (x, y, z) + # We need to create a 3D mask where this 2D ROI is on one slice or repeated. + # However, for consistency with DrawVOIWidget, we probably want a 3D volume. + # If DrawROIWidget is only for a single frame, z_len should match what is expected. + x_len, y_len, z_len = self._image_data.pixel_data.shape[:3] + seg_mask = np.zeros((x_len, y_len, z_len), dtype=np.uint8) + + # Translate 2D mask [y, x] to [x, y, z] slice + # Assuming the ROI was drawn on a specific slice? + # Actually DrawROIWidget seems to be for 2D images or a specific frame. + # If the image is 4D [x, y, z, t], maybe it was drawn on the central slice? + # Let's assume it was for 2D or we put it on the middle slice of 3D. + mid_z = z_len // 2 + + # Handle shape mismatch if any + if mask_2d.shape[1] == x_len and mask_2d.shape[0] == y_len: + seg_mask[:, :, mid_z] = mask_2d.T + + seg_data.seg_mask = seg_mask + seg_data.pixdim = self._image_data.pixdim[:3] + + # Emit signal to coordinator + self.segmentation_completed.emit(seg_data) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 9797fe9..3ad604e 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -4,22 +4,24 @@ from pathlib import Path from typing import Optional, Tuple, List -import numpy as np -import nibabel as nib from scipy.ndimage import binary_fill_holes, binary_erosion -import matplotlib.pyplot as plt -import matplotlib.animation as anim from matplotlib.backends.backend_qtagg import FigureCanvas from matplotlib.path import Path as Mpl_Path from matplotlib.colors import LinearSegmentedColormap +from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QFileDialog, QSlider, QVBoxLayout, QFrame, QCheckBox, QPushButton +from PyQt6.QtCore import QEvent, pyqtSignal, Qt, QThread + +import numpy as np +import nibabel as nib +import matplotlib.pyplot as plt +import matplotlib.animation as anim import scipy.interpolate as interpolate from scipy.spatial import ConvexHull -from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QFileDialog, QSlider, QVBoxLayout, QFrame, QCheckBox -from PyQt6.QtCore import QEvent, pyqtSignal, Qt, QThread +import traceback from ...mvc.base_view import BaseViewMixin from ..ui.draw_voi_ui import Ui_voi_drawer -from engines.ceus.src.data_objs import UltrasoundImage +from engines.ceus.src.data_objs import UltrasoundImage, CeusSeg from .spline import calculateSpline3D, calculateSpline from engines.ceus.src.image_preprocessing.functions import enhance_clahe, enhance_gamma @@ -99,7 +101,6 @@ def run(self): self.finished.emit(voi_mask) except Exception as e: - import traceback traceback.print_exc() self.error_msg.emit(f"Error interpolating VOI: {e}") @@ -130,6 +131,7 @@ class DrawVOIWidget(QWidget, BaseViewMixin): # Signals for communicating with controller file_selected = pyqtSignal(dict) # {'seg_path': str, 'seg_type': str} + segmentation_completed = pyqtSignal(object) # CeusSeg object back_requested = pyqtSignal() close_requested = pyqtSignal() @@ -177,7 +179,7 @@ def __init__(self, image_data: UltrasoundImage, parent: Optional[QWidget] = None # Per-plane resources (axial, sagittal, coronal) self._ax_sag_cor_matplotlib_canvases = [None, None, None] self._ax_sag_cor_planes = (None, None, None) - self._ax_sag_cor_index_maps = ((0, 1), (2, 1), (2, 0)) # dims that vary per plane + self._ax_sag_cor_index_maps = ((0, 1), (2, 1), (0, 2)) # (horiz_dim, vert_dim) self._ax_sag_cor_animations = [None, None, None] self._ax_sag_cor_plane_artists = [None, None, None] self._ax_sag_cor_crosshair_lines = [(None, None), (None, None), (None, None)] @@ -307,6 +309,17 @@ def _setup_ui(self) -> None: self._ui.restart_voi_button, self._ui.save_voi_button, ] + + # Add a "Confirm & Review" button programmatically + self.confirm_review_button = QPushButton("Confirm && Review", parent=self._ui.horizontalLayoutWidget_4) + self.confirm_review_button.setMinimumSize(self._ui.save_voi_button.minimumSize()) + self.confirm_review_button.setMaximumSize(self._ui.save_voi_button.maximumSize()) + self.confirm_review_button.setStyleSheet(self._ui.save_voi_button.styleSheet()) + # Move it to a reasonable position - maybe next to save button + self.confirm_review_button.setGeometry(self._ui.save_voi_button.geometry().translated(0, 50)) + self.confirm_review_button.hide() + self._voi_decision_widgets.append(self.confirm_review_button) + self._save_voi_widgets = [ self._ui.back_from_save_button, self._ui.dest_folder_label, @@ -485,22 +498,22 @@ def _update_aspect_ratios(self) -> None: try: pix = self._image_data.pixdim - # Index 0: Axial (Plane 0) + # Index 0: Axial (Plane 0) -> (Y, X) -> Rows=Y, Cols=X -> dy / dx if self._ax_sag_cor_matplotlib_canvases[0]: dx, dy = pix[0], pix[1] aspect = (dy / dx if dx != 0 else 1.0) * self._width_scale_axial self._ax_sag_cor_matplotlib_canvases[0].figure.gca().set_aspect(aspect) - # Index 1: Sagittal (Plane 1) + # Index 1: Sagittal (Plane 1) -> 90 CW Rotation -> (Y, Z) -> Rows=Y, Cols=Z -> dy / dz if self._ax_sag_cor_matplotlib_canvases[1]: dy, dz = pix[1], pix[2] aspect = (dy / dz if dz != 0 else 1.0) * self._width_scale_sagittal self._ax_sag_cor_matplotlib_canvases[1].figure.gca().set_aspect(aspect) - # Index 2: Coronal (Plane 2) + # Index 2: Coronal (Plane 2) -> (Z, X) -> Rows=Z, Cols=X -> dz / dx if self._ax_sag_cor_matplotlib_canvases[2]: dx, dz = pix[0], pix[2] - aspect = (dx / dz if dz != 0 else 1.0) * self._width_scale_coronal + aspect = (dz / dx if dx != 0 else 1.0) * self._width_scale_coronal self._ax_sag_cor_matplotlib_canvases[2].figure.gca().set_aspect(aspect) for canvas in self._ax_sag_cor_matplotlib_canvases: @@ -612,10 +625,12 @@ def _get_plane_slice(self, plane_ix: int): if arr.ndim != 2: arr = arr.squeeze() - # Axial plane (index 0) needs transpose for correct orientation - if plane_ix == 0: - arr = arr.T - return arr + # All planes need transpose to match (Vertical, Horizontal) orientation. + # Sagittal (plane 1) specifically needs a 90 deg clockwise rotation. + arr_t = arr.T + if plane_ix == 1: + return np.rot90(arr_t, k=-1) + return arr_t def _enhance_volume(self, volume_3d: np.ndarray) -> np.ndarray: """Enhance a 3D image volume using predefined enhancement methods in the backend engine.""" @@ -635,10 +650,12 @@ def _get_mask_slice(self, plane_ix: int): """Return RGBA numpy slice for the mask of the given plane index.""" idx = self._get_plane_indices(plane_ix)[:-1] # no time dimension arr = self._roi_masks_overlap[idx] - # Mask needs transpose for correct orientation to match the image slice - if plane_ix == 0: - arr = np.transpose(arr, (1, 0, 2)) # Transpose for axial plane - return arr + # All planes need transpose to match the image slice orientation. + # Sagittal (plane 1) specifically needs a 90 deg clockwise rotation. + arr_reg = np.transpose(arr, (1, 0, 2)) + if plane_ix == 1: + return np.rot90(arr_reg, k=-1) + return arr_reg def _get_plane_indices(self, plane_ix: int) -> Tuple[int]: """Return a list of indices for the given plane.""" @@ -806,6 +823,7 @@ def _connect_signals(self) -> None: self._ui.back_from_save_button.clicked.connect(self._on_back_from_save) self._ui.toggle_crosshair_visibility_button.clicked.connect(self._on_toggle_crosshair_visibility) self._ui.save_voi_button.clicked.connect(self._on_save_voi_clicked) + self.confirm_review_button.clicked.connect(self._on_confirm_review_clicked) # Configure slice/time controls self._ui.cur_slice_slider.setMinimum(0) @@ -999,6 +1017,27 @@ def _on_save_voi_clicked(self): self._show_widget_lists([self._save_voi_widgets, self._voi_alpha_widgets]) self._refresh_frames() + def _on_confirm_review_clicked(self): + """Handle confirmation and transition to formal review screen.""" + + # Create CeusSeg object from current mask + seg_data = CeusSeg() + seg_data.seg_name = f"Manual_{self._image_data.scan_name}" + # Extract the binary mask from the overlap RGBA buffer (red channel > 0) + seg_data.seg_mask = (self._roi_masks_overlap[:, :, :, 0] > 0).astype(np.uint8) + seg_data.pixdim = self._image_data.pixdim[:3] + + # Preserve current visualization parameters for the preview step + seg_data.clahe_clip_limit = self._clahe_clip_limit + seg_data.gamma = self._gamma + seg_data.width_scale_axial = self._width_scale_axial + seg_data.width_scale_sagittal = self._width_scale_sagittal + seg_data.width_scale_coronal = self._width_scale_coronal + seg_data.use_philips_ceus = self._use_philips_ceus + + # Emit signal to coordinator + self.segmentation_completed.emit(seg_data) + def _on_export_voi_clicked(self): # Show saving label, hide save widgets self._ui.saving_voi_label.show() diff --git a/src/ceus/seg_loading/views/seg_preview_widget.py b/src/ceus/seg_loading/views/seg_preview_widget.py new file mode 100644 index 0000000..0815047 --- /dev/null +++ b/src/ceus/seg_loading/views/seg_preview_widget.py @@ -0,0 +1,672 @@ +""" +Segmentation Preview Widget for CEUS +""" + +from typing import Optional, Tuple, List, Dict, Any +from pathlib import Path +from matplotlib.backends.backend_qtagg import FigureCanvas +from matplotlib.colors import LinearSegmentedColormap +from PyQt6.QtWidgets import QWidget, QLabel, QHBoxLayout, QSizePolicy, QSlider, QVBoxLayout, QFrame, QCheckBox, QPushButton, QFileDialog +from PyQt6.QtCore import QEvent, pyqtSignal, Qt + +import numpy as np +import nibabel as nib +import matplotlib.pyplot as plt +import matplotlib.animation as anim + +from ...mvc.base_view import BaseViewMixin +from ..ui.draw_voi_ui import Ui_voi_drawer +from engines.ceus.src.data_objs import UltrasoundImage, CeusSeg +from engines.ceus.src.image_preprocessing.functions import enhance_clahe, enhance_gamma + +# Philips CEUS Colormap: Grayscale -> Red -> Yellow +philips_colors = [ + (0.0, 0.0, 0.0), # 0% - Black + (0.4, 0.4, 0.4), # 40% - Gray + (0.8, 0.0, 0.0), # 80% - Red + (1.0, 1.0, 0.0) # 100% - Yellow +] +philips_cmap = LinearSegmentedColormap.from_list("philips_ceus", philips_colors) + +class SegPreviewWidget(QWidget, BaseViewMixin): + """ + Widget for previewing and confirming segmentation for CEUS. + Reuses UI components from VOI drawer but in a read-only preview mode. + """ + + # Signals for communicating with controller + segmentation_confirmed = pyqtSignal() + back_requested = pyqtSignal() + close_requested = pyqtSignal() + + def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, parent: Optional[QWidget] = None): + QWidget.__init__(self, parent) + self.__init_base_view__(parent) + self._ui = Ui_voi_drawer() + self._image_data = image_data + self._seg_data = seg_data + self._pix_data = image_data.pixel_data + + # Enhancement parameters (Inherited from seg_data) + self._clahe_clip_limit = getattr(seg_data, 'clahe_clip_limit', 1.2) + self._gamma = getattr(seg_data, 'gamma', 1.5) + self._width_scale_axial = getattr(seg_data, 'width_scale_axial', 1.0) + self._width_scale_sagittal = getattr(seg_data, 'width_scale_sagittal', 1.0) + self._width_scale_coronal = getattr(seg_data, 'width_scale_coronal', 1.0) + self._use_philips_ceus = getattr(seg_data, 'use_philips_ceus', False) + + # Cache for enhanced volume + self._enhanced_cache = None + self._enhanced_cache_frame = -1 + + # Crosshair / navigation state + self._crosshair_active = False + self._crosshair_visible = True + + # Dimensions: x, y, z, t + if self._pix_data.ndim == 4: + self._x_len, self._y_len, self._z_len, self._num_slices = self._pix_data.shape + else: + # Fallback if 3D + self._x_len, self._y_len, self._z_len = self._pix_data.shape + self._num_slices = 1 + self._pix_data = self._pix_data.reshape((self._x_len, self._y_len, self._z_len, 1)) + + self._crosshair_xyzt = [self._x_len // 2, self._y_len // 2, self._z_len // 2, 0] + + # Segmentation mask overlay + self._roi_masks_overlap = np.zeros((self._x_len, self._y_len, self._z_len, 4), dtype=np.uint8) + if hasattr(seg_data, 'seg_mask') and seg_data.seg_mask is not None: + # seg_mask should be same spatial shape (x, y, z) + mask = seg_data.seg_mask + if mask.shape == (self._x_len, self._y_len, self._z_len): + self._roi_masks_overlap[mask > 0] = [255, 0, 0, 125] # Red with transparency + + # Per-plane resources (axial, sagittal, coronal) + self._ax_sag_cor_matplotlib_canvases = [None, None, None] + self._ax_sag_cor_planes = (None, None, None) + self._ax_sag_cor_index_maps = ((0, 1), (2, 1), (0, 2)) # (horiz_dim, vert_dim) + self._ax_sag_cor_animations = [None, None, None] + self._ax_sag_cor_plane_artists = [None, None, None] + self._ax_sag_cor_crosshair_lines = [(None, None), (None, None), (None, None)] + self._ax_sag_cor_pending = [False, False, False] + self._ax_sag_cor_seg_masks = [None, None, None] + + # UI & visualization setup + self._setup_ui() + self._setup_matplotlib_canvases() + self._initialize_plane_displays() + self._setup_all_plane_animations() + self._connect_signals() + self._connect_matplotlib_events() + self.setFocusPolicy(Qt.FocusPolicy.StrongFocus) + self._update_scan_display() + self._refresh_frames() + + def _setup_ui(self) -> None: + """Setup the user interface to match the segmentation menu style.""" + self._ui.setupUi(self) + + # Store QLabels as tags for layout mapping + self._ax_sag_cor_planes = (self._ui.ax_plane, self._ui.sag_plane, self._ui.cor_plane) + + # Configure layout + self.setLayout(self._ui.full_screen_layout) + self._ui.full_screen_layout.setStretchFactor(self._ui.side_bar_layout, 1) + self._ui.full_screen_layout.setStretchFactor(self._ui.voi_layout, 10) + + # Widget groups matching DrawVOIWidget for consistency + self._drawing_widgets = [ + self._ui.draw_roi_button, + self._ui.interpolate_voi_button, + self._ui.undo_last_pt_button, + self._ui.close_roi_button, + self._ui.undo_last_roi_button, + self._ui.construct_voi_label, + ] + + # Add a "Confirm & Analysis" button programmatically + self.confirm_review_button = QPushButton("Confirm && Analysis") + self.confirm_review_button.setMinimumSize(self._ui.save_voi_button.minimumSize()) + self.confirm_review_button.setMaximumSize(self._ui.save_voi_button.maximumSize()) + self.confirm_review_button.setStyleSheet(self._ui.save_voi_button.styleSheet()) + + # Insert it into the layout that has Restart and Save + self._ui.horizontalLayout_2.addWidget(self.confirm_review_button) + + # Update existing button texts for clarity in preview mode + self._ui.restart_voi_button.setText("Review / Redraw") + self._ui.save_voi_button.setText("Save Setup") + + self._voi_decision_widgets = [ + self._ui.restart_voi_button, + self._ui.save_voi_button, + self.confirm_review_button + ] + + self._save_voi_widgets = [ + self._ui.back_from_save_button, + self._ui.dest_folder_label, + self._ui.voi_name_label, + self._ui.save_folder_input, + self._ui.save_name_input, + self._ui.choose_save_folder_button, + self._ui.clear_save_folder_button, + self._ui.export_voi_button, + ] + + self._voi_alpha_widgets = [ + self._ui.alpha_label, + self._ui.alpha_of_label, + self._ui.alpha_spin_box, + self._ui.alpha_status, + self._ui.alpha_total + ] + + # Initial visibility + self._ui.scan_name_input.setText(self._image_data.scan_name) + self._ui.segSidebarLabel_2.setText("Segmentation Selection") + self._ui.toggle_crosshair_visibility_button.setText('Hide Crosshair') + self._ui.cur_slice_label.setText("Current Frame:") + + self._hide_widget_lists([self._drawing_widgets, self._save_voi_widgets, self._voi_alpha_widgets]) + self._show_widget_lists([self._voi_decision_widgets]) + + # Hide original plane labels (replaced by canvases) + for widget in [self._ui.ax_plane, self._ui.sag_plane, self._ui.cor_plane, + self._ui.interp_loading_label, self._ui.saving_voi_label]: + widget.hide() + + self._ui.navigating_label.hide() + self._ui.observing_label.show() + + # Setup enhancement controls + self._setup_enhancement_controls() + + # Update slider for frames + self._ui.cur_slice_slider.setMinimum(0) + self._ui.cur_slice_slider.setMaximum(self._num_slices - 1) + self._ui.cur_slice_slider.setValue(0) + self._ui.cur_slice_total.setText(str(self._num_slices)) + self._ui.cur_slice_spin_box.setRange(1, self._num_slices) + self._ui.cur_slice_spin_box.setValue(1) + + self._ui.ax_total_frames.setText(str(self._z_len)) + self._ui.sag_total_frames.setText(str(self._x_len)) + self._ui.cor_total_frames.setText(str(self._y_len)) + + # Install event filters + for label in self._ax_sag_cor_planes: + if label: + label.installEventFilter(self) + + def _show_widget_lists(self, widget_lists: List[List[QWidget]]) -> None: + """Helper to show groups of widgets.""" + for widget_list in widget_lists: + for widget in widget_list: + widget.show() + + def _hide_widget_lists(self, widget_lists: List[List[QWidget]]) -> None: + """Helper to hide groups of widgets.""" + for widget_list in widget_lists: + for widget in widget_list: + widget.hide() + + def _setup_enhancement_controls(self) -> None: + """Add enhancement sliders to the sidebar, mirroring DrawVOIWidget style.""" + enh_group = QFrame() + enh_group.setStyleSheet("background-color: rgba(255, 255, 255, 0); border: none;") + + container_layout = QVBoxLayout(enh_group) + container_layout.setContentsMargins(0, 10, 0, 10) + container_layout.setSpacing(15) + + row1_layout = QHBoxLayout() + row2_layout = QHBoxLayout() + row1_layout.setSpacing(20) + row2_layout.setSpacing(20) + + def create_enh_column(label_text, min_val, max_val, current_val, callback): + col_widget = QWidget() + col_layout = QVBoxLayout(col_widget) + col_layout.setContentsMargins(0, 0, 0, 0) + col_layout.setSpacing(5) + + lbl = QLabel(label_text) + lbl.setStyleSheet("font-size: 14px; color: white; font-weight: bold;") + lbl.setAlignment(Qt.AlignmentFlag.AlignCenter) + col_layout.addWidget(lbl) + + row_layout = QHBoxLayout() + slider = QSlider(Qt.Orientation.Horizontal) + slider.setRange(min_val, max_val) + slider.setValue(current_val) + slider.setStyleSheet(self._ui.cur_slice_slider.styleSheet()) + slider.setMinimumWidth(80) + slider.setMaximumWidth(120) + slider.valueChanged.connect(callback) + + val_lbl = QLabel(f"{current_val/10.0:.1f}") + val_lbl.setMinimumWidth(40) + val_lbl.setStyleSheet("color: #3498db; font-weight: bold; font-size: 14px;") + + row_layout.addWidget(slider) + row_layout.addWidget(val_lbl) + col_layout.addLayout(row_layout) + return col_widget, slider, val_lbl + + # Sliders + clahe_col, self.clahe_slider, self.clahe_val_lbl = create_enh_column( + "CLAHE", 1, 100, int(self._clahe_clip_limit * 10), self._on_clahe_changed + ) + gamma_col, self.gamma_slider, self.gamma_val_lbl = create_enh_column( + "GAMMA", 1, 40, int(self._gamma * 10), self._on_gamma_changed + ) + width_ax_col, self.width_ax_slider, self.width_ax_val_lbl = create_enh_column( + "WIDTH (AX)", 1, 50, int(self._width_scale_axial * 10), self._on_width_axial_changed + ) + width_sag_col, self.width_sag_slider, self.width_sag_val_lbl = create_enh_column( + "WIDTH (SAG)", 1, 50, int(self._width_scale_sagittal * 10), self._on_width_sagittal_changed + ) + width_cor_col, self.width_cor_slider, self.width_cor_val_lbl = create_enh_column( + "WIDTH (COR)", 1, 50, int(self._width_scale_coronal * 10), self._on_width_coronal_changed + ) + + row1_layout.addWidget(clahe_col) + row1_layout.addWidget(gamma_col) + + self.philips_check = QCheckBox("Pseudocoloring") + self.philips_check.setChecked(self._use_philips_ceus) + self.philips_check.setStyleSheet("color: white; font-weight: bold; font-size: 14px;") + self.philips_check.stateChanged.connect(self._on_philips_toggled) + row1_layout.addWidget(self.philips_check) + + row2_layout.addWidget(width_ax_col) + row2_layout.addWidget(width_sag_col) + row2_layout.addWidget(width_cor_col) + + container_layout.addLayout(row1_layout) + container_layout.addLayout(row2_layout) + self._ui.verticalLayout_2.addWidget(enh_group) + + def _invalidate_enhancement_cache(self) -> None: + """Clear cache when processing parameters change.""" + self._enhanced_cache = None + self._enhanced_cache_frame = -1 + self._refresh_frames() + + def _on_clahe_changed(self, value: int) -> None: + """Handle CLAHE change.""" + self._clahe_clip_limit = value / 10.0 + if hasattr(self, 'clahe_val_lbl'): + self.clahe_val_lbl.setText(f"{self._clahe_clip_limit:.1f}") + self._invalidate_enhancement_cache() + + def _on_gamma_changed(self, value: int) -> None: + """Handle gamma change.""" + self._gamma = value / 10.0 + if hasattr(self, 'gamma_val_lbl'): + self.gamma_val_lbl.setText(f"{self._gamma:.1f}") + self._invalidate_enhancement_cache() + + def _on_width_axial_changed(self, value: int) -> None: + """Handle axial aspect ratio.""" + self._width_scale_axial = value / 10.0 + if hasattr(self, 'width_ax_val_lbl'): + self.width_ax_val_lbl.setText(f"{self._width_scale_axial:.1f}") + self._update_aspect_ratios() + + def _on_width_sagittal_changed(self, value: int) -> None: + """Handle sagittal aspect ratio.""" + self._width_scale_sagittal = value / 10.0 + if hasattr(self, 'width_sag_val_lbl'): + self.width_sag_val_lbl.setText(f"{self._width_scale_sagittal:.1f}") + self._update_aspect_ratios() + + def _on_width_coronal_changed(self, value: int) -> None: + """Handle coronal aspect ratio.""" + self._width_scale_coronal = value / 10.0 + if hasattr(self, 'width_cor_val_lbl'): + self.width_cor_val_lbl.setText(f"{self._width_scale_coronal:.1f}") + self._update_aspect_ratios() + + def _update_aspect_ratios(self) -> None: + """Update artist aspect ratios based on physics (pixdim) and sliders.""" + pix = self._image_data.pixdim + scales = [self._width_scale_axial, self._width_scale_sagittal, self._width_scale_coronal] + + # Calculate base physical aspects (Height / Width) + # Plane 0: Axial (XY) -> show (Y, X) -> Rows=Y, Cols=X -> dy / dx + aspect_ax = (pix[1] / pix[0] if pix[0] != 0 else 1.0) * scales[0] + # Plane 1: Sagittal (YZ) -> 90 CW Rotation -> show (Y, Z) -> Rows=Y, Cols=Z -> dy / dz + aspect_sag = (pix[1] / pix[2] if pix[2] != 0 else 1.0) * scales[1] + # Plane 2: Coronal (XZ) -> show (Z, X) -> Rows=Z, Cols=X -> dz / dx + aspect_cor = (pix[2] / pix[0] if pix[0] != 0 else 1.0) * scales[2] + + final_aspects = [aspect_ax, aspect_sag, aspect_cor] + + for i, aspect in enumerate(final_aspects): + artist = self._ax_sag_cor_plane_artists[i] + mask_artist = self._ax_sag_cor_seg_masks[i] + if artist: artist.axes.set_aspect(aspect) + if mask_artist: mask_artist.axes.set_aspect(aspect) + + self._refresh_frames() + + def _on_philips_toggled(self, state: int) -> None: + """Handle Philips CEUS pseudocolor toggle.""" + self._use_philips_ceus = state == Qt.CheckState.Checked.value + new_cmap = philips_cmap if self._use_philips_ceus else 'gray' + for artist in self._ax_sag_cor_plane_artists: + if artist: + artist.set_cmap(new_cmap) + self._refresh_frames() + + def _setup_matplotlib_canvases(self) -> None: + """Initialize and embed matplotlib canvases into each plane's placeholder layout.""" + # Use the vertical layouts from the UI and insert canvases in place of the hidden labels + layouts = (self._ui.verticalLayout_4, self._ui.verticalLayout_6, self._ui.verticalLayout_7) + for i, layout in enumerate(layouts): + fig, ax = plt.subplots(facecolor='black') + fig.subplots_adjust(left=0, right=1, top=1, bottom=0) + ax.axis('off') + canvas = FigureCanvas(fig) + canvas.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) + layout.insertWidget(1, canvas) + self._ax_sag_cor_matplotlib_canvases[i] = canvas + + def _initialize_plane_displays(self) -> None: + """Initial render of each orthogonal plane with fixed intensity scaling.""" + for i, canvas in enumerate(self._ax_sag_cor_matplotlib_canvases): + if not canvas: continue + ax = canvas.figure.axes[0] + + # Initial data slice + slice_data = self._get_plane_slice(i) + # Use fixed vmin/vmax to prevent auto-scaling contrast per slice + artist = ax.imshow(slice_data, cmap='gray', interpolation='nearest', + origin='lower', zorder=1, vmin=0, vmax=255) + self._ax_sag_cor_plane_artists[i] = artist + + # Mask overlay + mask_slice = self._get_mask_slice(i) + mask_artist = ax.imshow(mask_slice, interpolation='nearest', + origin='lower', zorder=2) + self._ax_sag_cor_seg_masks[i] = mask_artist + + # Crosshair lines + h_line = ax.axhline(self._crosshair_xyzt[self._ax_sag_cor_index_maps[i][1]], + color='cyan', alpha=0.6, lw=0.8, zorder=3) + v_line = ax.axvline(self._crosshair_xyzt[self._ax_sag_cor_index_maps[i][0]], + color='cyan', alpha=0.6, lw=0.8, zorder=3) + self._ax_sag_cor_crosshair_lines[i] = (v_line, h_line) + + self._update_aspect_ratios() + + def _get_plane_slice(self, plane_ix: int) -> np.ndarray: + """Extract a 2D image slice for the specified plane at current crosshair indices.""" + x, y, z, t = self._crosshair_xyzt + vol = self._get_enhanced_volume(t) + + if plane_ix == 0: # Axial (XY) at Z -> show (Y, X) + return vol[:, :, z].T + elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) + return np.rot90(vol[x, :, :].T, k=-1) + elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) + return vol[:, y, :].T + return np.zeros((10, 10)) + + def _get_mask_slice(self, plane_ix: int) -> np.ndarray: + """Extract a 2D mask slice for overlay.""" + x, y, z, _ = self._crosshair_xyzt + if plane_ix == 0: # Axial (XY) at Z -> show (Y, X) + return self._roi_masks_overlap[:, :, z, :].transpose(1, 0, 2) + elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) + arr = self._roi_masks_overlap[x, :, :, :].transpose(1, 0, 2) + return np.rot90(arr, k=-1) + elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) + return self._roi_masks_overlap[:, y, :, :].transpose(1, 0, 2) + return np.zeros((10, 10, 4), dtype=np.uint8) + + def _get_enhanced_volume(self, t: int) -> np.ndarray: + """Apply image processing and return the 3D volume at frame t.""" + if self._enhanced_cache is not None and self._enhanced_cache_frame == t: + return self._enhanced_cache + + # Extract the 3D volume for current frame + vol_3d = self._pix_data[:, :, :, t] + + # Create a temporary UltrasoundImage for the engine preprocessors + temp_im = UltrasoundImage(self._image_data.scan_path) + temp_im.pixel_data = vol_3d + temp_im.pixdim = self._image_data.pixdim + temp_im.frame_rate = self._image_data.frame_rate + + # Apply backend engine functions + temp_im = enhance_clahe(temp_im, clip_limit=self._clahe_clip_limit) + temp_im = enhance_gamma(temp_im, gamma=self._gamma) + + self._enhanced_cache = temp_im.pixel_data + self._enhanced_cache_frame = t + return self._enhanced_cache + + def _setup_all_plane_animations(self) -> None: + """Setup refresh animations for each matplotlib canvas.""" + for i in range(3): + self._ax_sag_cor_animations[i] = anim.FuncAnimation( + self._ax_sag_cor_matplotlib_canvases[i].figure, + lambda frame, p_ix=i: self._update_plane(p_ix), + interval=50, cache_frame_data=False + ) + + def _update_plane(self, plane_ix: int): + """Update artist data for a single plane if marked pending.""" + if not self._ax_sag_cor_pending[plane_ix]: + return + + artist = self._ax_sag_cor_plane_artists[plane_ix] + mask_artist = self._ax_sag_cor_seg_masks[plane_ix] + v_line, h_line = self._ax_sag_cor_crosshair_lines[plane_ix] + + if artist: + artist.set_data(self._get_plane_slice(plane_ix)) + if mask_artist: + mask_artist.set_data(self._get_mask_slice(plane_ix)) + + if v_line and h_line: + idx_x, idx_y = self._ax_sag_cor_index_maps[plane_ix] + v_line.set_xdata([self._crosshair_xyzt[idx_x]]) + h_line.set_ydata([self._crosshair_xyzt[idx_y]]) + v_line.set_visible(self._crosshair_visible) + h_line.set_visible(self._crosshair_visible) + + self._ax_sag_cor_matplotlib_canvases[plane_ix].draw_idle() + self._ax_sag_cor_pending[plane_ix] = False + + def _connect_signals(self) -> None: + """Connect UI signals to internal handlers, matching DrawVOIWidget patterns.""" + # Frame/Time Navigation + self._ui.cur_slice_slider.valueChanged.connect(self._on_slice_slider_changed) + self._ui.cur_slice_spin_box.valueChanged.connect(lambda v: self._ui.cur_slice_slider.setValue(int(v)-1)) + self._ui.toggle_crosshair_visibility_button.clicked.connect(self._on_toggle_crosshair) + self._ui.back_button.clicked.connect(self.back_requested.emit) + + # Decision Buttons + self.confirm_review_button.clicked.connect(self.segmentation_confirmed.emit) + self._ui.restart_voi_button.clicked.connect(self.back_requested.emit) + self._ui.save_voi_button.clicked.connect(self._on_save_voi_clicked) + + # Save Form Actions + self._ui.back_from_save_button.clicked.connect(self._on_back_from_save_clicked) + self._ui.choose_save_folder_button.clicked.connect(self._on_choose_save_folder) + self._ui.clear_save_folder_button.clicked.connect(lambda: self._ui.save_folder_input.clear()) + self._ui.export_voi_button.clicked.connect(self._on_export_voi_clicked) + + def _on_save_voi_clicked(self) -> None: + """Switch to the save file configuration menu.""" + self._hide_widget_lists([self._voi_decision_widgets]) + self._show_widget_lists([self._save_voi_widgets, self._voi_alpha_widgets]) + # Default save name + self._ui.save_name_input.setText(f"{self._image_data.scan_name}_mask") + + def _on_back_from_save_clicked(self) -> None: + """Switch back from save menu to decision menu.""" + self._hide_widget_lists([self._save_voi_widgets, self._voi_alpha_widgets]) + self._show_widget_lists([self._voi_decision_widgets]) + + def _on_choose_save_folder(self) -> None: + """Open directory dialog for saving.""" + folder = QFileDialog.getExistingDirectory(self, "Select Save Directory") + if folder: + self._ui.save_folder_input.setText(folder) + + def _on_export_voi_clicked(self) -> None: + """Export the current 3D mask to NIfTI.""" + folder_path = self._ui.save_folder_input.text() + file_name = self._ui.save_name_input.text() + + if not folder_path or not Path(folder_path).is_dir(): + self.show_error("Please select a valid folder.") + return + if not file_name: + self.show_error("Please enter a file name.") + return + + if not file_name.endswith('.nii.gz'): + file_name += '.nii.gz' + + out_path = Path(folder_path) / file_name + + try: + self.show_loading() + # Construct affine + affine = np.eye(4) + for i, res in enumerate(self._image_data.pixdim[:3]): + affine[i, i] = res + + # The mask is stored in self._seg_data.seg_mask + mask = self._seg_data.seg_mask + nii_img = nib.Nifti1Image(mask, affine) + nii_img.header["descrip"] = self._image_data.scan_name + nib.save(nii_img, out_path) + + self.hide_loading() + # After export, show decision again + self._on_back_from_save_clicked() + except Exception as e: + self.hide_loading() + self.show_error(f"Export failed: {str(e)}") + + def _on_slice_slider_changed(self, value: int) -> None: + """Handle time-series frame change.""" + self._crosshair_xyzt[3] = value + self._ui.cur_slice_spin_box.blockSignals(True) + self._ui.cur_slice_spin_box.setValue(value + 1) + self._ui.cur_slice_spin_box.blockSignals(False) + self._refresh_frames() + + def _on_toggle_crosshair(self) -> None: + """Toggle crosshair visibility.""" + self._crosshair_visible = not self._crosshair_visible + self._ui.toggle_crosshair_visibility_button.setText( + 'Show Crosshair' if not self._crosshair_visible else 'Hide Crosshair' + ) + self._refresh_frames() + + def _refresh_frames(self) -> None: + """Mark all planes for refresh.""" + self._ax_sag_cor_pending = [True, True, True] + + def _update_scan_display(self) -> None: + """Sync UI labels with current crosshair indices.""" + self._ui.sag_frame_num.setText(str(self._crosshair_xyzt[0])) + self._ui.cor_frame_num.setText(str(self._crosshair_xyzt[1])) + self._ui.ax_frame_num.setText(str(self._crosshair_xyzt[2])) + + # Update spinbox for t + self._ui.cur_slice_spin_box.blockSignals(True) + self._ui.cur_slice_spin_box.setValue(self._crosshair_xyzt[3] + 1) + self._ui.cur_slice_spin_box.blockSignals(False) + + def set_crosshair(self, x=None, y=None, z=None, t=None): + """Update crosshair position and trigger refresh.""" + changed = False + if x is not None and 0 <= x < self._x_len: + self._crosshair_xyzt[0] = x; changed = True + if y is not None and 0 <= y < self._y_len: + self._crosshair_xyzt[1] = y; changed = True + if z is not None and 0 <= z < self._z_len: + self._crosshair_xyzt[2] = z; changed = True + if t is not None and 0 <= t < self._num_slices: + self._crosshair_xyzt[3] = t; changed = True + + if changed: + self._update_scan_display() + self._refresh_frames() + + # ======================= Resize Handling ================================= + def eventFilter(self, obj, event): # type: ignore + if event.type() == QEvent.Type.Resize and obj in self._ax_sag_cor_planes: + self._resize_canvas_for(obj) + return super().eventFilter(obj, event) + + def _resize_canvas_for(self, label_widget: QLabel): + try: + idx = self._ax_sag_cor_planes.index(label_widget) + except ValueError: + return + canvas = self._ax_sag_cor_matplotlib_canvases[idx] + if not canvas: + return + + # Match canvas size to the QLabel/placeholder size + canvas.setGeometry(0, 0, label_widget.width(), label_widget.height()) + canvas.draw_idle() + + def _resize_all_canvases(self): + """Force a resize of all embedded matplotlib canvases.""" + for label in self._ax_sag_cor_planes: + if label: + self._resize_canvas_for(label) + + def showEvent(self, event): + # Ensure canvases sized properly when shown + self._resize_all_canvases() + return super().showEvent(event) + + def _connect_matplotlib_events(self): + """Connect motion and click events on each plane's matplotlib canvas.""" + for plane_ix, canvas in enumerate(self._ax_sag_cor_matplotlib_canvases): + if not canvas: continue + canvas.mpl_connect('motion_notify_event', lambda e, p=plane_ix: self._on_canvas_motion(e, p)) + canvas.mpl_connect('button_press_event', lambda e, p=plane_ix: self._on_canvas_click(e, p)) + + def _on_canvas_click(self, event, plane_ix: int): + if event.inaxes is None: return + self._crosshair_active = not self._crosshair_active + if self._crosshair_active: + self._ui.navigating_label.show() + self._ui.observing_label.hide() + else: + self._ui.navigating_label.hide() + self._ui.observing_label.show() + self._on_canvas_motion(event, plane_ix) + + def _on_canvas_motion(self, event, plane_ix: int): + if not self._crosshair_active or event.inaxes is None or event.xdata is None or event.ydata is None: + return + + vary_dims = self._ax_sag_cor_index_maps[plane_ix] + dim_x, dim_y = vary_dims[0], vary_dims[1] + dim_lengths = [self._x_len, self._y_len, self._z_len, self._num_slices] + + new_xval = int(round(event.xdata)) + new_yval = int(round(event.ydata)) + if 0 <= new_xval < dim_lengths[dim_x] and 0 <= new_yval < dim_lengths[dim_y]: + params = {} + if self._crosshair_xyzt[dim_x] != new_xval: + params[['x','y','z','t'][dim_x]] = new_xval + if self._crosshair_xyzt[dim_y] != new_yval: + params[['x','y','z','t'][dim_y]] = new_yval + if params: + self.set_crosshair(**params) From 922fc0788c3fabbd2bab93c110bcaf328690c3f2 Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 20 Feb 2026 11:41:58 +0100 Subject: [PATCH 50/61] Update ceus submodule with image preprocessing changes --- engines/ceus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/ceus b/engines/ceus index ac0a06f..e5ae0e4 160000 --- a/engines/ceus +++ b/engines/ceus @@ -1 +1 @@ -Subproject commit ac0a06faa707e4c9ff87aa8ae86276e47b7e8aa6 +Subproject commit e5ae0e467bc4e5608e6f1e086a1fa8905a5417c1 From 90b92199978cf3b8688ae8cb92f39e1dd8f6d328 Mon Sep 17 00:00:00 2001 From: omid Date: Wed, 18 Mar 2026 11:20:04 +0100 Subject: [PATCH 51/61] Fix orientation mismatch and vertical inversion in SegPreviewWidget --- src/ceus/seg_loading/views/seg_preview_widget.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ceus/seg_loading/views/seg_preview_widget.py b/src/ceus/seg_loading/views/seg_preview_widget.py index 0815047..6343997 100644 --- a/src/ceus/seg_loading/views/seg_preview_widget.py +++ b/src/ceus/seg_loading/views/seg_preview_widget.py @@ -385,13 +385,13 @@ def _initialize_plane_displays(self) -> None: slice_data = self._get_plane_slice(i) # Use fixed vmin/vmax to prevent auto-scaling contrast per slice artist = ax.imshow(slice_data, cmap='gray', interpolation='nearest', - origin='lower', zorder=1, vmin=0, vmax=255) + zorder=1, vmin=0, vmax=255) self._ax_sag_cor_plane_artists[i] = artist # Mask overlay mask_slice = self._get_mask_slice(i) mask_artist = ax.imshow(mask_slice, interpolation='nearest', - origin='lower', zorder=2) + zorder=2) self._ax_sag_cor_seg_masks[i] = mask_artist # Crosshair lines @@ -411,7 +411,9 @@ def _get_plane_slice(self, plane_ix: int) -> np.ndarray: if plane_ix == 0: # Axial (XY) at Z -> show (Y, X) return vol[:, :, z].T elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) - return np.rot90(vol[x, :, :].T, k=-1) + arr = vol[x, :, :] + arr_t = arr.T + return np.rot90(arr_t, k=-1) elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) return vol[:, y, :].T return np.zeros((10, 10)) @@ -422,8 +424,9 @@ def _get_mask_slice(self, plane_ix: int) -> np.ndarray: if plane_ix == 0: # Axial (XY) at Z -> show (Y, X) return self._roi_masks_overlap[:, :, z, :].transpose(1, 0, 2) elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) - arr = self._roi_masks_overlap[x, :, :, :].transpose(1, 0, 2) - return np.rot90(arr, k=-1) + arr = self._roi_masks_overlap[x, :, :, :] + arr_t = np.transpose(arr, (1, 0, 2)) + return np.rot90(arr_t, k=-1) elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) return self._roi_masks_overlap[:, y, :, :].transpose(1, 0, 2) return np.zeros((10, 10, 4), dtype=np.uint8) From 19dbd0ae11bbfbaca6330eda497e01f261cad55c Mon Sep 17 00:00:00 2001 From: omid Date: Wed, 18 Mar 2026 11:56:01 +0100 Subject: [PATCH 52/61] Fix Sagittal plane coordinate mapping and broadcast error in DrawVOIWidget --- src/ceus/seg_loading/views/draw_voi_widget.py | 67 ++++++++++--------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 3ad604e..9a54f42 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -650,8 +650,12 @@ def _get_mask_slice(self, plane_ix: int): """Return RGBA numpy slice for the mask of the given plane index.""" idx = self._get_plane_indices(plane_ix)[:-1] # no time dimension arr = self._roi_masks_overlap[idx] - # All planes need transpose to match the image slice orientation. - # Sagittal (plane 1) specifically needs a 90 deg clockwise rotation. + + # Consistent mapping for all planes as areas: + # Axial: (X, Y) slice -> want (Y, X) for imshow -> transpose (1, 0, 2) + # Sagittal: (Y, Z) slice -> want (Z, Y) then rot -> transpose (1, 0, 2) + rot90 + # Coronal: (X, Z) slice -> want (Z, X) for imshow -> transpose (1, 0, 2) + arr_reg = np.transpose(arr, (1, 0, 2)) if plane_ix == 1: return np.rot90(arr_reg, k=-1) @@ -935,9 +939,16 @@ def _on_roi_close(self): if plane_ix == 0: # Axial target_slice_mask[:, :, fixed_val] = mask_2d.T elif plane_ix == 1: # Sagittal - target_slice_mask[fixed_val, :, :] = mask_2d + # mask_2d from meshgrid (Y_len, X_len) where X_idx=z, Y_idx=y + # In sagittal plane_ix=1: vary_x=z(2), vary_y=y(1). fixed=x(0) + # mask_2d shape is (y_len, z_len). + # Meshgrid with 'xy' returns (rows=Y, cols=X), so mask_2d is (Y, Z). + # The display uses rot90(arr.T, k=-1) which is (Z, Y). + # To match the display, we must rot90 back: rot90(mask_2d, k=1).T + target_slice_mask[fixed_val, :, :] = np.rot90(mask_2d, k=1).T elif plane_ix == 2: # Coronal - target_slice_mask[:, fixed_val, :] = mask_2d + # mask_2d from meshgrid (Y_len, X_len) where X_idx=x, Y_idx=z + target_slice_mask[:, fixed_val, :] = mask_2d.T # Apply colors to the RGBA mask where the 3D mask is true current_roi_mask_rgba[target_slice_mask, 0] = 255 # Red @@ -1209,28 +1220,25 @@ def _remove_duplicates(self, points: List[List[float]]) -> List[List[float]]: def _on_interpolate_voi(self): """Handle VOI interpolation from the drawn 2D ROIs.""" - if len(self._drawn_rois) == 2 or not len(self._drawn_rois): - print("At least 3 ROIs on different planes or 1 ROI is required for 3D interpolation.") + if len(self._drawn_rois) < 1: + print("At least 1 ROI is required for 3D interpolation.") return # Combine all points from all drawn ROIs all_points = [] - for _, pts, _ in self._drawn_rois: - xyz_pts = np.array(pts)[:, :3].T - x_interp, y_interp, z_interp = calculateSpline(*xyz_pts) - all_points.extend(zip(x_interp, y_interp, z_interp)) + for plane_num, pts, _ in self._drawn_rois: + all_points.extend(pts) # Ensure no duplicate points are used for interpolation unique_points = self._remove_duplicates(all_points) - if len(unique_points) < 4: + if len(unique_points) < 3: self.show_error("Interpolation Error", "Not enough unique points for 3D spline interpolation.") return # Perform 3D spline interpolation - x_coords, y_coords, z_coords = zip(*unique_points) - coords = np.transpose([x_coords, y_coords, z_coords]) + coords = np.array(unique_points) - if len(self._drawn_rois) > 2: + if len(self._drawn_rois) > 1: # Stop any existing worker if self._voi_interpolation_worker and self._voi_interpolation_worker.isRunning(): self._voi_interpolation_worker.quit() @@ -1249,22 +1257,14 @@ def _on_interpolate_voi(self): self._set_interp_loading(True) self._voi_interpolation_worker.start() else: + # Single ROI Case - just fill the area of that single mesh voi_mask = np.zeros((self._x_len, self._y_len, self._z_len), dtype=bool) - # For simplicity, we'll mark the voxels the spline passes through. - # A more robust solution would involve filling the volume enclosed by the spline surface. - interp_points = np.round(np.array(list(coords))).astype(int) - - # Clamp points to be within bounds - interp_points[:, 0] = np.clip(interp_points[:, 0], 0, self._x_len - 1) - interp_points[:, 1] = np.clip(interp_points[:, 1], 0, self._y_len - 1) - interp_points[:, 2] = np.clip(interp_points[:, 2], 0, self._z_len - 1) - - voi_mask[interp_points[:, 0], interp_points[:, 1], interp_points[:, 2]] = True + # For a single ROI, we extract the boolean mask from the stored RGBA mask + # The red channel (index 0) is set to 255 for the drawn mask. + _, _, roi_mask_rgba = self._drawn_rois[0] + voi_mask = roi_mask_rgba[:, :, :, 0] > 0 - # Fill holes in the resulting mask to create a solid volume - voi_mask = _smooth_3d_mask(voi_mask) - self._hide_widget_lists([self._drawing_widgets]) self._on_interpolation_finished(voi_mask) def _save_voi(self): @@ -1281,13 +1281,18 @@ def _save_voi(self): out_path = Path(self._ui.save_folder_input.text()) / out_name + # Construct affine matching standard NIfTI orientation affine = np.eye(4) for i, res in enumerate(self._image_data.pixdim[:3]): affine[i, i] = res - voi_mask = np.array(self._roi_masks_overlap[:, :, :, 0] / 255.0).astype(np.uint8) - niiarray = nib.Nifti1Image(voi_mask, affine) - niiarray.header["descrip"] = self._image_data.scan_name - nib.save(niiarray, out_path) + + # Ensure binary mask is correctly extracted from the overlay buffer + voi_mask = (self._roi_masks_overlap[:, :, :, 0] > 0).astype(np.uint8) + + # Save as NIfTI image + nii_img = nib.Nifti1Image(voi_mask, affine) + nii_img.header["descrip"] = self._image_data.scan_name + nib.save(nii_img, out_path) def _set_interp_loading(self, loading_state: bool) -> None: """Set the interpolation loading state.""" From 469635d322620fbbf14d815d4bbfc1ceba5ceb01 Mon Sep 17 00:00:00 2001 From: omid Date: Wed, 18 Mar 2026 11:56:05 +0100 Subject: [PATCH 53/61] Fix spline interpolation crash by deduplicating points --- src/ceus/seg_loading/views/spline.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/ceus/seg_loading/views/spline.py b/src/ceus/seg_loading/views/spline.py index 65bf06e..7fa2d8b 100644 --- a/src/ceus/seg_loading/views/spline.py +++ b/src/ceus/seg_loading/views/spline.py @@ -17,10 +17,25 @@ def calculateSpline(xpts, ypts, zpts=None): # 2D spline interpolation cv.append([xpts[i], ypts[i], zpts[i]]) else: cv.append([xpts[i], ypts[i]]) + + # Remove duplicate points which cause "ValueError: Invalid inputs" in splprep cv = np.array(cv) - if len(xpts) == 2: + if len(cv) > 1: + # Calculate distances between consecutive points + diffs = np.diff(cv, axis=0) + dists = np.sqrt(np.sum(diffs**2, axis=1)) + # Keep first point and points that are sufficiently far from the previous one + mask = np.concatenate(([True], dists > 1e-5)) + cv = cv[mask] + + if len(cv) < 2: + if zpts is not None: + return np.array([cv[0][0]]), np.array([cv[0][1]]), np.array([cv[0][2]]) + return np.array([cv[0][0]]), np.array([cv[0][1]]) + + if len(cv) == 2: tck, _ = interpolate.splprep(cv.T, s=0.0, k=1) - elif len(xpts) == 3: + elif len(cv) == 3: tck, _ = interpolate.splprep(cv.T, s=0.0, k=2) else: tck, _ = interpolate.splprep(cv.T, s=0.0, k=3) From c91d149b52a164a921230b9489f12c197782f541 Mon Sep 17 00:00:00 2001 From: omid Date: Wed, 18 Mar 2026 11:56:09 +0100 Subject: [PATCH 54/61] Synchronize SegPreviewWidget orientation with DrawVOIWidget --- .../seg_loading/views/seg_preview_widget.py | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/ceus/seg_loading/views/seg_preview_widget.py b/src/ceus/seg_loading/views/seg_preview_widget.py index 6343997..ce46674 100644 --- a/src/ceus/seg_loading/views/seg_preview_widget.py +++ b/src/ceus/seg_loading/views/seg_preview_widget.py @@ -79,9 +79,36 @@ def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, parent: Optio if hasattr(seg_data, 'seg_mask') and seg_data.seg_mask is not None: # seg_mask should be same spatial shape (x, y, z) mask = seg_data.seg_mask + + # Ensure spatial alignment with image data if dimensions are flipped or permuted + # If the mask was saved from DrawVOIWidget, it should match the pixel_data shape if mask.shape == (self._x_len, self._y_len, self._z_len): - self._roi_masks_overlap[mask > 0] = [255, 0, 0, 125] # Red with transparency - + self._roi_masks_overlap[mask > 0] = [255, 0, 0, 125] # Red with transparency + elif mask.shape == (self._y_len, self._x_len, self._z_len): + # Handle common XY transpose if detected + self._roi_masks_overlap[mask.transpose(1, 0, 2) > 0] = [255, 0, 0, 125] + else: + # Log or handle shape mismatch more gracefully if needed + print(f"Warning: Mask shape {mask.shape} does not match image shape {(self._x_len, self._y_len, self._z_len)}") + # Try to fit the mask as much as possible if shapes match in 3D volume + try: + self._roi_masks_overlap[mask[:self._x_len, :self._y_len, :self._z_len] > 0] = [255, 0, 0, 125] + except Exception: + pass + + # Jump crosshair to a point within the mask to show it immediately + mask_indices = np.where(self._roi_masks_overlap[..., 3] > 0) + if len(mask_indices[0]) > 0: + mid_idx = len(mask_indices[0]) // 2 + self._crosshair_xyzt = [ + mask_indices[0][mid_idx], + mask_indices[1][mid_idx], + mask_indices[2][mid_idx], + 0 + ] + else: + self._crosshair_xyzt = [self._x_len // 2, self._y_len // 2, self._z_len // 2, 0] + # Per-plane resources (axial, sagittal, coronal) self._ax_sag_cor_matplotlib_canvases = [None, None, None] self._ax_sag_cor_planes = (None, None, None) @@ -200,6 +227,10 @@ def _setup_ui(self) -> None: if label: label.installEventFilter(self) + # ============================================================================ + # UI SETUP & HELPERS + # ============================================================================ + def _show_widget_lists(self, widget_lists: List[List[QWidget]]) -> None: """Helper to show groups of widgets.""" for widget_list in widget_lists: From 65cd7ec16d9d03203413193aa4923c0dd6ced4b8 Mon Sep 17 00:00:00 2001 From: omid Date: Wed, 18 Mar 2026 12:15:24 +0100 Subject: [PATCH 55/61] Synchronize VOI rendering and interpolation display across drawing and preview widgets --- src/ceus/seg_loading/views/seg_preview_widget.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ceus/seg_loading/views/seg_preview_widget.py b/src/ceus/seg_loading/views/seg_preview_widget.py index ce46674..5746a36 100644 --- a/src/ceus/seg_loading/views/seg_preview_widget.py +++ b/src/ceus/seg_loading/views/seg_preview_widget.py @@ -421,15 +421,16 @@ def _initialize_plane_displays(self) -> None: # Mask overlay mask_slice = self._get_mask_slice(i) + # Match interpolation and zorder to DrawVOIWidget mask_artist = ax.imshow(mask_slice, interpolation='nearest', - zorder=2) + zorder=8) self._ax_sag_cor_seg_masks[i] = mask_artist # Crosshair lines - h_line = ax.axhline(self._crosshair_xyzt[self._ax_sag_cor_index_maps[i][1]], - color='cyan', alpha=0.6, lw=0.8, zorder=3) - v_line = ax.axvline(self._crosshair_xyzt[self._ax_sag_cor_index_maps[i][0]], - color='cyan', alpha=0.6, lw=0.8, zorder=3) + # Get actual coordinate indices for current plane from maps + idx_x, idx_y = self._ax_sag_cor_index_maps[i] + v_line = ax.axvline(x=self._crosshair_xyzt[idx_x], color='yellow', lw=0.8, animated=True, zorder=11) + h_line = ax.axhline(y=self._crosshair_xyzt[idx_y], color='yellow', lw=0.8, animated=True, zorder=11) self._ax_sag_cor_crosshair_lines[i] = (v_line, h_line) self._update_aspect_ratios() @@ -456,6 +457,7 @@ def _get_mask_slice(self, plane_ix: int) -> np.ndarray: return self._roi_masks_overlap[:, :, z, :].transpose(1, 0, 2) elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) arr = self._roi_masks_overlap[x, :, :, :] + # Consistent with DrawVOIWidget: transpose(1, 0, 2) then rot90(k=-1) arr_t = np.transpose(arr, (1, 0, 2)) return np.rot90(arr_t, k=-1) elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) From ea9d1b8affc03b4408831bc337af0c814c72b0e1 Mon Sep 17 00:00:00 2001 From: omid Date: Wed, 18 Mar 2026 12:18:38 +0100 Subject: [PATCH 56/61] Standardize mask overlay transposition logic for bit-perfect Axial/Coronal synchronization --- src/ceus/seg_loading/views/seg_preview_widget.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ceus/seg_loading/views/seg_preview_widget.py b/src/ceus/seg_loading/views/seg_preview_widget.py index 5746a36..0d364f4 100644 --- a/src/ceus/seg_loading/views/seg_preview_widget.py +++ b/src/ceus/seg_loading/views/seg_preview_widget.py @@ -454,14 +454,17 @@ def _get_mask_slice(self, plane_ix: int) -> np.ndarray: """Extract a 2D mask slice for overlay.""" x, y, z, _ = self._crosshair_xyzt if plane_ix == 0: # Axial (XY) at Z -> show (Y, X) - return self._roi_masks_overlap[:, :, z, :].transpose(1, 0, 2) + # Match DrawVOIWidget approach: index mask then transpose + arr = self._roi_masks_overlap[:, :, z, :] + return np.transpose(arr, (1, 0, 2)) elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) arr = self._roi_masks_overlap[x, :, :, :] - # Consistent with DrawVOIWidget: transpose(1, 0, 2) then rot90(k=-1) + # Consistent with DrawVOIWidget: (1, 0, 2) then rot90(k=-1) arr_t = np.transpose(arr, (1, 0, 2)) return np.rot90(arr_t, k=-1) elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) - return self._roi_masks_overlap[:, y, :, :].transpose(1, 0, 2) + arr = self._roi_masks_overlap[:, y, :, :] + return np.transpose(arr, (1, 0, 2)) return np.zeros((10, 10, 4), dtype=np.uint8) def _get_enhanced_volume(self, t: int) -> np.ndarray: From 96373dfce42a6470df3ed7a4fb38727606f5034b Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 20 Mar 2026 10:44:50 +0100 Subject: [PATCH 57/61] feat: add crosshair hover behavior to SegPreviewWidget --- .../seg_loading/views/seg_preview_widget.py | 187 ++++++++++++++---- 1 file changed, 144 insertions(+), 43 deletions(-) diff --git a/src/ceus/seg_loading/views/seg_preview_widget.py b/src/ceus/seg_loading/views/seg_preview_widget.py index 0d364f4..5274bb9 100644 --- a/src/ceus/seg_loading/views/seg_preview_widget.py +++ b/src/ceus/seg_loading/views/seg_preview_widget.py @@ -200,8 +200,8 @@ def _setup_ui(self) -> None: self._show_widget_lists([self._voi_decision_widgets]) # Hide original plane labels (replaced by canvases) - for widget in [self._ui.ax_plane, self._ui.sag_plane, self._ui.cor_plane, - self._ui.interp_loading_label, self._ui.saving_voi_label]: + # Note: We do NOT hide ax_plane, sag_plane, cor_plane here because they are needed as containers + for widget in [self._ui.interp_loading_label, self._ui.saving_voi_label]: widget.hide() self._ui.navigating_label.hide() @@ -227,6 +227,16 @@ def _setup_ui(self) -> None: if label: label.installEventFilter(self) + def _cleanup_animations(self): + """Internal helper to stop animations safely.""" + for i in range(3): + if i < len(self._ax_sag_cor_animations) and self._ax_sag_cor_animations[i]: + try: + self._ax_sag_cor_animations[i].event_source.stop() + except Exception: + pass + self._ax_sag_cor_animations[i] = None + # ============================================================================ # UI SETUP & HELPERS # ============================================================================ @@ -363,26 +373,37 @@ def _on_width_coronal_changed(self, value: int) -> None: def _update_aspect_ratios(self) -> None: """Update artist aspect ratios based on physics (pixdim) and sliders.""" - pix = self._image_data.pixdim - scales = [self._width_scale_axial, self._width_scale_sagittal, self._width_scale_coronal] - - # Calculate base physical aspects (Height / Width) - # Plane 0: Axial (XY) -> show (Y, X) -> Rows=Y, Cols=X -> dy / dx - aspect_ax = (pix[1] / pix[0] if pix[0] != 0 else 1.0) * scales[0] - # Plane 1: Sagittal (YZ) -> 90 CW Rotation -> show (Y, Z) -> Rows=Y, Cols=Z -> dy / dz - aspect_sag = (pix[1] / pix[2] if pix[2] != 0 else 1.0) * scales[1] - # Plane 2: Coronal (XZ) -> show (Z, X) -> Rows=Z, Cols=X -> dz / dx - aspect_cor = (pix[2] / pix[0] if pix[0] != 0 else 1.0) * scales[2] - - final_aspects = [aspect_ax, aspect_sag, aspect_cor] - - for i, aspect in enumerate(final_aspects): - artist = self._ax_sag_cor_plane_artists[i] - mask_artist = self._ax_sag_cor_seg_masks[i] - if artist: artist.axes.set_aspect(aspect) - if mask_artist: mask_artist.axes.set_aspect(aspect) + if not hasattr(self, '_image_data') or self._image_data is None: + return + + try: + pix = self._image_data.pixdim - self._refresh_frames() + # Plane 0: Axial (XY) -> show (Y, X) -> Rows=Y, Cols=X -> dy / dx + if self._ax_sag_cor_matplotlib_canvases[0]: + dx, dy = pix[0], pix[1] + aspect_ax = (dy / dx if dx != 0 else 1.0) * self._width_scale_axial + self._ax_sag_cor_matplotlib_canvases[0].figure.gca().set_aspect(aspect_ax) + + # Plane 1: Sagittal (YZ) -> 90 CW Rotation -> show (Y, Z) -> Rows=Y, Cols=Z -> dy / dz + if self._ax_sag_cor_matplotlib_canvases[1]: + dy, dz = pix[1], pix[2] + aspect_sag = (dy / dz if dz != 0 else 1.0) * self._width_scale_sagittal + self._ax_sag_cor_matplotlib_canvases[1].figure.gca().set_aspect(aspect_sag) + + # Plane 2: Coronal (XZ) -> show (Z, X) -> Rows=Z, Cols=X -> dz / dx + if self._ax_sag_cor_matplotlib_canvases[2]: + dx, dz = pix[0], pix[2] + aspect_cor = (dz / dx if dx != 0 else 1.0) * self._width_scale_coronal + self._ax_sag_cor_matplotlib_canvases[2].figure.gca().set_aspect(aspect_cor) + + for canvas in self._ax_sag_cor_matplotlib_canvases: + if canvas: + canvas.draw_idle() + + self._refresh_frames() + except Exception as e: + print(f"Error updating aspect ratios: {e}") def _on_philips_toggled(self, state: int) -> None: """Handle Philips CEUS pseudocolor toggle.""" @@ -395,15 +416,21 @@ def _on_philips_toggled(self, state: int) -> None: def _setup_matplotlib_canvases(self) -> None: """Initialize and embed matplotlib canvases into each plane's placeholder layout.""" - # Use the vertical layouts from the UI and insert canvases in place of the hidden labels - layouts = (self._ui.verticalLayout_4, self._ui.verticalLayout_6, self._ui.verticalLayout_7) - for i, layout in enumerate(layouts): + # Use the axial, sagittal, coronal labels themselves as the parent for the canvases + # This ensures they are inside their respective QFrame boxes and aligned correctly + for i, parent_label in enumerate(self._ax_sag_cor_planes): fig, ax = plt.subplots(facecolor='black') fig.subplots_adjust(left=0, right=1, top=1, bottom=0) ax.axis('off') canvas = FigureCanvas(fig) + canvas.setParent(parent_label) + + # Use Expanding policy canvas.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) - layout.insertWidget(1, canvas) + + # Hide the label's text but keep the background/frame + parent_label.setText("") + self._ax_sag_cor_matplotlib_canvases[i] = canvas def _initialize_plane_displays(self) -> None: @@ -443,10 +470,12 @@ def _get_plane_slice(self, plane_ix: int) -> np.ndarray: if plane_ix == 0: # Axial (XY) at Z -> show (Y, X) return vol[:, :, z].T elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) + # Match DrawVOIWidget approach: arr.T then rot90(k=-1) arr = vol[x, :, :] arr_t = arr.T return np.rot90(arr_t, k=-1) - elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) + elif plane_ix == 2: # Coronal (XZ) at Y -> show (Y, X) + # Mirror Axial for Coronal to match DrawVOI behavior return vol[:, y, :].T return np.zeros((10, 10)) @@ -454,7 +483,7 @@ def _get_mask_slice(self, plane_ix: int) -> np.ndarray: """Extract a 2D mask slice for overlay.""" x, y, z, _ = self._crosshair_xyzt if plane_ix == 0: # Axial (XY) at Z -> show (Y, X) - # Match DrawVOIWidget approach: index mask then transpose + # Match DrawVOIWidget approach: index mask then transpose (1, 0, 2) arr = self._roi_masks_overlap[:, :, z, :] return np.transpose(arr, (1, 0, 2)) elif plane_ix == 1: # Sagittal (YZ) at X -> show (Z, Y) then rotate 90 CW -> (Y, Z) @@ -462,7 +491,8 @@ def _get_mask_slice(self, plane_ix: int) -> np.ndarray: # Consistent with DrawVOIWidget: (1, 0, 2) then rot90(k=-1) arr_t = np.transpose(arr, (1, 0, 2)) return np.rot90(arr_t, k=-1) - elif plane_ix == 2: # Coronal (XZ) at Y -> show (Z, X) + elif plane_ix == 2: # Coronal (XZ) at Y -> show (Y, X) + # Mirror Axial for Coronal to match DrawVOI behavior arr = self._roi_masks_overlap[:, y, :, :] return np.transpose(arr, (1, 0, 2)) return np.zeros((10, 10, 4), dtype=np.uint8) @@ -492,20 +522,30 @@ def _get_enhanced_volume(self, t: int) -> np.ndarray: def _setup_all_plane_animations(self) -> None: """Setup refresh animations for each matplotlib canvas.""" for i in range(3): + canvas = self._ax_sag_cor_matplotlib_canvases[i] self._ax_sag_cor_animations[i] = anim.FuncAnimation( - self._ax_sag_cor_matplotlib_canvases[i].figure, + canvas.figure, lambda frame, p_ix=i: self._update_plane(p_ix), - interval=50, cache_frame_data=False + interval=33, + blit=True, + cache_frame_data=False ) def _update_plane(self, plane_ix: int): - """Update artist data for a single plane if marked pending.""" - if not self._ax_sag_cor_pending[plane_ix]: - return - + """Update artist data for a single plane.""" + # Always return the list of artists for blitting + v_line, h_line = self._ax_sag_cor_crosshair_lines[plane_ix] artist = self._ax_sag_cor_plane_artists[plane_ix] mask_artist = self._ax_sag_cor_seg_masks[plane_ix] - v_line, h_line = self._ax_sag_cor_crosshair_lines[plane_ix] + + artists = [] + if artist: artists.append(artist) + if mask_artist: artists.append(mask_artist) + if v_line: artists.append(v_line) + if h_line: artists.append(h_line) + + if not self._ax_sag_cor_pending[plane_ix]: + return artists if artist: artist.set_data(self._get_plane_slice(plane_ix)) @@ -514,13 +554,14 @@ def _update_plane(self, plane_ix: int): if v_line and h_line: idx_x, idx_y = self._ax_sag_cor_index_maps[plane_ix] + # When refreshing (e.g. slice changed), snap back to stored indices v_line.set_xdata([self._crosshair_xyzt[idx_x]]) h_line.set_ydata([self._crosshair_xyzt[idx_y]]) v_line.set_visible(self._crosshair_visible) h_line.set_visible(self._crosshair_visible) - self._ax_sag_cor_matplotlib_canvases[plane_ix].draw_idle() self._ax_sag_cor_pending[plane_ix] = False + return artists def _connect_signals(self) -> None: """Connect UI signals to internal handlers, matching DrawVOIWidget patterns.""" @@ -528,11 +569,11 @@ def _connect_signals(self) -> None: self._ui.cur_slice_slider.valueChanged.connect(self._on_slice_slider_changed) self._ui.cur_slice_spin_box.valueChanged.connect(lambda v: self._ui.cur_slice_slider.setValue(int(v)-1)) self._ui.toggle_crosshair_visibility_button.clicked.connect(self._on_toggle_crosshair) - self._ui.back_button.clicked.connect(self.back_requested.emit) + self._ui.back_button.clicked.connect(self._on_back_requested) # Decision Buttons - self.confirm_review_button.clicked.connect(self.segmentation_confirmed.emit) - self._ui.restart_voi_button.clicked.connect(self.back_requested.emit) + self.confirm_review_button.clicked.connect(self._on_confirm_review) + self._ui.restart_voi_button.clicked.connect(self._on_back_requested) self._ui.save_voi_button.clicked.connect(self._on_save_voi_clicked) # Save Form Actions @@ -541,6 +582,16 @@ def _connect_signals(self) -> None: self._ui.clear_save_folder_button.clicked.connect(lambda: self._ui.save_folder_input.clear()) self._ui.export_voi_button.clicked.connect(self._on_export_voi_clicked) + def _on_back_requested(self): + """Handle back request with cleanup.""" + self._cleanup_animations() + self.back_requested.emit() + + def _on_confirm_review(self): + """Handle confirmation with cleanup.""" + self._cleanup_animations() + self.segmentation_confirmed.emit() + def _on_save_voi_clicked(self) -> None: """Switch to the save file configuration menu.""" self._hide_widget_lists([self._voi_decision_widgets]) @@ -553,6 +604,21 @@ def _on_back_from_save_clicked(self) -> None: self._hide_widget_lists([self._save_voi_widgets, self._voi_alpha_widgets]) self._show_widget_lists([self._voi_decision_widgets]) + def closeEvent(self, event): + """Clean up animations and canvases before the widget is destroyed.""" + self._cleanup_animations() + + for i in range(3): + canvas = self._ax_sag_cor_matplotlib_canvases[i] + if canvas: + try: + plt.close(canvas.figure) + except Exception: + pass + self._ax_sag_cor_matplotlib_canvases[i] = None + + super().closeEvent(event) + def _on_choose_save_folder(self) -> None: """Open directory dialog for saving.""" folder = QFileDialog.getExistingDirectory(self, "Select Save Directory") @@ -659,7 +725,11 @@ def _resize_canvas_for(self, label_widget: QLabel): return # Match canvas size to the QLabel/placeholder size - canvas.setGeometry(0, 0, label_widget.width(), label_widget.height()) + # We ensure it fills the parent label precisely + canvas_width = label_widget.width() + canvas_height = label_widget.height() + canvas.setFixedSize(canvas_width, canvas_height) + canvas.move(0, 0) canvas.draw_idle() def _resize_all_canvases(self): @@ -692,7 +762,19 @@ def _on_canvas_click(self, event, plane_ix: int): self._on_canvas_motion(event, plane_ix) def _on_canvas_motion(self, event, plane_ix: int): - if not self._crosshair_active or event.inaxes is None or event.xdata is None or event.ydata is None: + """Handle mouse movement over a plane and update crosshair indices.""" + # If no active navigation (locked), we just update the lines to follow mouse + if not self._crosshair_active: + if event.inaxes is not None and event.xdata is not None and event.ydata is not None: + self._update_hover_crosshair(event.xdata, event.ydata, plane_ix) + else: + # Snap back to current indices when mouse leaves the axes + idx_x, idx_y = self._ax_sag_cor_index_maps[plane_ix] + self._update_hover_crosshair(self._crosshair_xyzt[idx_x], self._crosshair_xyzt[idx_y], plane_ix) + return + + # If crosshair is active (clicked), update global position + if event.inaxes is None or event.xdata is None or event.ydata is None: return vary_dims = self._ax_sag_cor_index_maps[plane_ix] @@ -701,11 +783,30 @@ def _on_canvas_motion(self, event, plane_ix: int): new_xval = int(round(event.xdata)) new_yval = int(round(event.ydata)) + if 0 <= new_xval < dim_lengths[dim_x] and 0 <= new_yval < dim_lengths[dim_y]: params = {} if self._crosshair_xyzt[dim_x] != new_xval: - params[['x','y','z','t'][dim_x]] = new_xval + key = ['x','y','z','t'][dim_x] + params[key] = new_xval if self._crosshair_xyzt[dim_y] != new_yval: - params[['x','y','z','t'][dim_y]] = new_yval + key = ['x','y','z','t'][dim_y] + params[key] = new_yval + if params: self.set_crosshair(**params) + + # Also sync lines with the new global position + if self._crosshair_visible: + self._update_hover_crosshair(event.xdata, event.ydata, plane_ix) + + def _update_hover_crosshair(self, x, y, plane_ix): + """Update crosshair lines to follow mouse hover.""" + v_line, h_line = self._ax_sag_cor_crosshair_lines[plane_ix] + if v_line and h_line: + v_line.set_xdata([x, x]) + h_line.set_ydata([y, y]) + v_line.set_visible(self._crosshair_visible) + h_line.set_visible(self._crosshair_visible) + # Only update the background for this ONE canvas + self._ax_sag_cor_matplotlib_canvases[plane_ix].draw_idle() From e271857bfdffe695bb1c88830188bb49599cba1a Mon Sep 17 00:00:00 2001 From: omid Date: Fri, 20 Mar 2026 10:58:16 +0100 Subject: [PATCH 58/61] UI: Add crosshair hover logic, adjustable VOI alpha, and fixed window resizing for NIfTI preview --- .../seg_loading/views/seg_preview_widget.py | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/ceus/seg_loading/views/seg_preview_widget.py b/src/ceus/seg_loading/views/seg_preview_widget.py index 5274bb9..98f8a8c 100644 --- a/src/ceus/seg_loading/views/seg_preview_widget.py +++ b/src/ceus/seg_loading/views/seg_preview_widget.py @@ -54,6 +54,7 @@ def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, parent: Optio self._width_scale_sagittal = getattr(seg_data, 'width_scale_sagittal', 1.0) self._width_scale_coronal = getattr(seg_data, 'width_scale_coronal', 1.0) self._use_philips_ceus = getattr(seg_data, 'use_philips_ceus', False) + self._mask_alpha = 125 # Default alpha for mask overlay (0-255) # Cache for enhanced volume self._enhanced_cache = None @@ -76,6 +77,7 @@ def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, parent: Optio # Segmentation mask overlay self._roi_masks_overlap = np.zeros((self._x_len, self._y_len, self._z_len, 4), dtype=np.uint8) + self._seg_mask_indices = None # Store binary mask indices for alpha updates if hasattr(seg_data, 'seg_mask') and seg_data.seg_mask is not None: # seg_mask should be same spatial shape (x, y, z) mask = seg_data.seg_mask @@ -83,18 +85,21 @@ def __init__(self, image_data: UltrasoundImage, seg_data: CeusSeg, parent: Optio # Ensure spatial alignment with image data if dimensions are flipped or permuted # If the mask was saved from DrawVOIWidget, it should match the pixel_data shape if mask.shape == (self._x_len, self._y_len, self._z_len): - self._roi_masks_overlap[mask > 0] = [255, 0, 0, 125] # Red with transparency + self._seg_mask_indices = np.where(mask > 0) elif mask.shape == (self._y_len, self._x_len, self._z_len): # Handle common XY transpose if detected - self._roi_masks_overlap[mask.transpose(1, 0, 2) > 0] = [255, 0, 0, 125] + self._seg_mask_indices = np.where(mask.transpose(1, 0, 2) > 0) else: # Log or handle shape mismatch more gracefully if needed print(f"Warning: Mask shape {mask.shape} does not match image shape {(self._x_len, self._y_len, self._z_len)}") # Try to fit the mask as much as possible if shapes match in 3D volume try: - self._roi_masks_overlap[mask[:self._x_len, :self._y_len, :self._z_len] > 0] = [255, 0, 0, 125] + self._seg_mask_indices = np.where(mask[:self._x_len, :self._y_len, :self._z_len] > 0) except Exception: pass + + if self._seg_mask_indices is not None and len(self._seg_mask_indices[0]) > 0: + self._roi_masks_overlap[self._seg_mask_indices[0], self._seg_mask_indices[1], self._seg_mask_indices[2]] = [255, 0, 0, 125] # Jump crosshair to a point within the mask to show it immediately mask_indices = np.where(self._roi_masks_overlap[..., 3] > 0) @@ -313,6 +318,15 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): "WIDTH (COR)", 1, 50, int(self._width_scale_coronal * 10), self._on_width_coronal_changed ) + # Add VOI Alpha slider + alpha_col, self.alpha_slider, self.alpha_val_lbl = create_enh_column( + "VOI ALPHA", 0, 2550, int(self._mask_alpha * 10), lambda v: self._on_alpha_changed(v // 10) + ) + # Fix label to show integer for alpha + self.alpha_val_lbl.setText(str(self._mask_alpha)) + self.alpha_slider.valueChanged.disconnect() + self.alpha_slider.valueChanged.connect(lambda v: (self._on_alpha_changed(v // 10), self.alpha_val_lbl.setText(str(v // 10)))) + row1_layout.addWidget(clahe_col) row1_layout.addWidget(gamma_col) @@ -321,6 +335,7 @@ def create_enh_column(label_text, min_val, max_val, current_val, callback): self.philips_check.setStyleSheet("color: white; font-weight: bold; font-size: 14px;") self.philips_check.stateChanged.connect(self._on_philips_toggled) row1_layout.addWidget(self.philips_check) + row1_layout.addWidget(alpha_col) row2_layout.addWidget(width_ax_col) row2_layout.addWidget(width_sag_col) @@ -371,6 +386,16 @@ def _on_width_coronal_changed(self, value: int) -> None: self.width_cor_val_lbl.setText(f"{self._width_scale_coronal:.1f}") self._update_aspect_ratios() + def _on_alpha_changed(self, value: int) -> None: + """Handle alpha transparency change for the VOI mask.""" + self._mask_alpha = value + # Update the rgba mask transparency + # Use stored mask indices to ensure we can recover from alpha=0 + if self._seg_mask_indices is not None and len(self._seg_mask_indices[0]) > 0: + # Re-apply color (Red) and new alpha to the relevant indices + self._roi_masks_overlap[self._seg_mask_indices[0], self._seg_mask_indices[1], self._seg_mask_indices[2]] = [255, 0, 0, self._mask_alpha] + self._refresh_frames() + def _update_aspect_ratios(self) -> None: """Update artist aspect ratios based on physics (pixdim) and sliders.""" if not hasattr(self, '_image_data') or self._image_data is None: From ac53ba8177ae217db3be6416c695a4e816df3876 Mon Sep 17 00:00:00 2001 From: omid Date: Tue, 24 Mar 2026 09:25:13 +0100 Subject: [PATCH 59/61] Fix ValueError in ROI interpolation by stripping 4th dimension for pyvista compatibility --- src/ceus/seg_loading/views/spline.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ceus/seg_loading/views/spline.py b/src/ceus/seg_loading/views/spline.py index 7fa2d8b..e65263a 100644 --- a/src/ceus/seg_loading/views/spline.py +++ b/src/ceus/seg_loading/views/spline.py @@ -69,6 +69,11 @@ def ellipsoidFitLS(pos): def calculateSpline3D(points): + # If the points have a 4th dimension (time), we strip it as pyvista expects (x, y, z) + points = np.array(points) + if points.shape[1] == 4: + points = points[:, :3] + cloud = pv.PolyData(points, force_float=False) volume = cloud.delaunay_3d(alpha=100) shell = volume.extract_geometry() # type: ignore From 0c6f4b9e0f597cad3399bced26b97ec4d2f9f938 Mon Sep 17 00:00:00 2001 From: omid Date: Tue, 31 Mar 2026 14:39:46 +0200 Subject: [PATCH 60/61] chore: Update ceus backend submodule with analysis discovery fix --- engines/ceus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/ceus b/engines/ceus index e5ae0e4..b6021f2 160000 --- a/engines/ceus +++ b/engines/ceus @@ -1 +1 @@ -Subproject commit e5ae0e467bc4e5608e6f1e086a1fa8905a5417c1 +Subproject commit b6021f2729291f74a1183757229547ae27ae4cab From 2d50296cf66e85cba8a488fd7b631557bf6c8672 Mon Sep 17 00:00:00 2001 From: omid Date: Tue, 31 Mar 2026 14:51:51 +0200 Subject: [PATCH 61/61] feat: Add 'Confirm & Review' button to manual segmentation UI --- src/ceus/seg_loading/views/draw_voi_widget.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ceus/seg_loading/views/draw_voi_widget.py b/src/ceus/seg_loading/views/draw_voi_widget.py index 9a54f42..0f9ac88 100644 --- a/src/ceus/seg_loading/views/draw_voi_widget.py +++ b/src/ceus/seg_loading/views/draw_voi_widget.py @@ -305,20 +305,22 @@ def _setup_ui(self) -> None: self._ui.undo_last_roi_button, self._ui.construct_voi_label, ] - self._voi_decision_widgets = [ - self._ui.restart_voi_button, - self._ui.save_voi_button, - ] - + # Add a "Confirm & Review" button programmatically - self.confirm_review_button = QPushButton("Confirm && Review", parent=self._ui.horizontalLayoutWidget_4) + self.confirm_review_button = QPushButton("Confirm && Review") self.confirm_review_button.setMinimumSize(self._ui.save_voi_button.minimumSize()) self.confirm_review_button.setMaximumSize(self._ui.save_voi_button.maximumSize()) self.confirm_review_button.setStyleSheet(self._ui.save_voi_button.styleSheet()) - # Move it to a reasonable position - maybe next to save button - self.confirm_review_button.setGeometry(self._ui.save_voi_button.geometry().translated(0, 50)) self.confirm_review_button.hide() - self._voi_decision_widgets.append(self.confirm_review_button) + + # Add to the layout formally + self._ui.verticalLayout_2.addWidget(self.confirm_review_button) + + self._voi_decision_widgets = [ + self._ui.restart_voi_button, + self._ui.save_voi_button, + self.confirm_review_button, + ] self._save_voi_widgets = [ self._ui.back_from_save_button,