cellects.gui.cellects
cellects.gui.cellects
Main window for Cellects application managing stacked workflow steps.
This module implements a user-assisted image analysis workflow using a QStackedWidget to navigate between configuration and analysis phases. It provides windows for data setup, image/video processing, output requirements, and advanced parameters. Automatic algorithm suggestions are offered at each step while allowing full user customization. Uses SaveAllVarsThread in background operations to maintain UI responsiveness.
Main Components CellectsMainWidget : Central stacked widget managing workflow navigation
Notes Uses QThread for background operations to maintain UI responsiveness.
CellectsMainWidget
Bases: QStackedWidget
Main widget: this is the main window of the Cellects application.
Source code in src/cellects/gui/cellects.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
__init__()
Initializes the Cellects application window and sets up initial state.
Sets the title, dimensions, and default values for various attributes required to manage the GUI's state and display settings. Initializes a ProgramOrganizer object and loads its variable dictionary.
Attributes:
| Name | Type | Description |
|---|---|---|
pre_processing_done |
bool
|
Indicates whether pre-processing has been completed. |
last_is_first |
bool
|
Tracks if the last operation was the first in sequence. |
last_tab |
str
|
The most recently accessed tab name (default: "data_specifications"). |
screen_height |
int
|
Height of the monitor in pixels. |
screen_width |
int
|
Width of the monitor in pixels. |
im_max_width |
int
|
Maximum width allowed for displayed images (default: 570). |
im_max_height |
int
|
Maximum height allowed for displayed images (default: 266). |
image_window_width_diff |
int
|
Difference in width between image window and max image size. |
image_window_height_diff |
int
|
Difference in height between image window and max image size. |
image_to_display |
ndarray
|
Placeholder for the image to be displayed (initialized as zeros). |
i |
int
|
Counter or index used in the application. |
po |
ProgramOrganizer
|
Instance managing the organization and variables of the program. |
Source code in src/cellects/gui/cellects.py
center()
Centers the window on the screen.
Moves the window to the center of the available screen geometry. Allows users to always see the application's windows in a consistent position, regardless of screen resolution or window size.
Source code in src/cellects/gui/cellects.py
change_widget(idx)
Display a widget using its position (idx) in the stack
Source code in src/cellects/gui/cellects.py
closeEvent(event)
Close the application window and handle cleanup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
QCloseEvent
|
The close event that triggered this function. |
required |
Notes
This function does not return any value and is intended for event handling purposes only.
Source code in src/cellects/gui/cellects.py
instantiate_cellects()
Initiates the Cellects application by setting up the main window and starting various threads.
Extended Description
This method is responsible for initializing the Cellects application. It sets up the main window, creates necessary widgets, and starts the required threads for background operations.
Other Parameters:
| Name | Type | Description |
|---|---|---|
night_mode |
bool
|
Indicates whether the application should run in night mode. This parameter is managed by another part of the code and should not be set directly. |
Source code in src/cellects/gui/cellects.py
instantiate_widgets(several_folder_included=True)
Instantiate various windows for the application's GUI.
This function configures the main GUI windows for image and video analysis, output requirements, and advanced parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
several_folder_included
|
bool
|
A flag to determine whether the |
True
|