organelle_segmenter_plugin
Controller
Bases: ABC
Source code in organelle_segmenter_plugin/core/controller.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 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 |
|
router: IRouter
property
Get the application Router
state: State
property
Get the application State object
viewer: ViewerAbstraction
property
Get the Napari viewer (abstracted)
cleanup()
Perform cleanup operations such as disconnecting events Override in child class if needed
Source code in organelle_segmenter_plugin/core/controller.py
20 21 22 23 24 25 |
|
load_view(view, model=None)
Loads the given view :param: view: the View to load
Source code in organelle_segmenter_plugin/core/controller.py
48 49 50 51 52 53 |
|
show_message_box(title, message)
Display a pop up message box :param: title: Message box title :param: message: message body to display
Source code in organelle_segmenter_plugin/core/controller.py
55 56 57 58 59 60 61 62 63 64 |
|
LayerReader
Reader / Helper class to extract information out of Napari Layers
Source code in organelle_segmenter_plugin/core/layer_reader.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 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 |
|
get_all_data(layer)
Get the image data from the layer for a given channel
inputs
channel_index (int): index of the channel to load layer (Layer): the Napari layer to read data from
Source code in organelle_segmenter_plugin/core/layer_reader.py
146 147 148 149 150 151 152 153 154 155 156 |
|
get_channel_data(channel_index, layer)
Get the image data from the layer for a given channel
inputs
channel_index (int): index of the channel to load layer (Layer): the Napari layer to read data from
Source code in organelle_segmenter_plugin/core/layer_reader.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
get_channels(layer)
Get the list of image channels from a layer
inputs
layer (Layer): the Napari layer to read data from
Source code in organelle_segmenter_plugin/core/layer_reader.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
State
Application state wrapper. Use this class as a way to easily store and access stateful data that needs to be shared accross controllers
Source code in organelle_segmenter_plugin/core/state.py
5 6 7 8 9 10 11 12 13 |
|
View
Bases: ABC
, QWidget
Base class for all Views to derive from
Source code in organelle_segmenter_plugin/core/view.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
template
property
Returns the view template
has_template()
True if the view has a template view, False otherwise
Source code in organelle_segmenter_plugin/core/view.py
32 33 34 35 36 |
|
load(model=None)
abstractmethod
Called when the view is loaded. When implementing in child class, use to load initial model data and setup the view's UI components
inputs
model - optional model to pass to the view at load time
Source code in organelle_segmenter_plugin/core/view.py
38 39 40 41 42 43 44 45 46 47 48 |
|
ViewTemplate
Bases: View
Source code in organelle_segmenter_plugin/core/view.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
get_container()
abstractmethod
Get the template's container Frame This should be container QFrame in which the child View or ViewTemplate be displayed
Source code in organelle_segmenter_plugin/core/view.py
52 53 54 55 56 57 58 |
|
load()
abstractmethod
Called when the view template is loaded. When implementing in child class, use to load initial model data and setup the view's UI components
Source code in organelle_segmenter_plugin/core/view.py
60 61 62 63 64 65 66 67 |
|
SegmenterModel
dataclass
Main Segmenter plugin model
Source code in organelle_segmenter_plugin/model/segmenter_model.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
reset()
Reset model state
Source code in organelle_segmenter_plugin/model/segmenter_model.py
29 30 31 32 33 34 35 36 37 38 39 40 |
|
Directories
Provides safe paths to common module directories
Source code in organelle_segmenter_plugin/util/directories.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
get_assets_dir()
classmethod
Path to the assets directory
Source code in organelle_segmenter_plugin/util/directories.py
13 14 15 16 17 18 |
|
get_style_dir()
classmethod
Path to the stylesheet directory
Source code in organelle_segmenter_plugin/util/directories.py
20 21 22 23 24 25 |
|
UiUtils
Source code in organelle_segmenter_plugin/util/ui_utils.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
dropdown_row(label, placeholder=None, default=None, options=None, enabled=False)
staticmethod
Given the contents of a dropdown and a label, return a FormRow containing a label and a QComboBox widget that can be used with the custom Form widget
Source code in organelle_segmenter_plugin/util/ui_utils.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
multi_dropdown_row(label, placeholder=None, default=None, options=None, enabled=False)
staticmethod
Given the contents of a dropdown and a label, return a FormRow containing a label and a QListWidget widget that can be used with the custom Form widget
Source code in organelle_segmenter_plugin/util/ui_utils.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
BatchProcessingView
Bases: View
Source code in organelle_segmenter_plugin/view/batch_processing_view.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 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 |
|
reset_run_batch()
Reset page state to reflect that there is no batch run in progress
Source code in organelle_segmenter_plugin/view/batch_processing_view.py
110 111 112 113 114 115 116 117 118 |
|
set_progress(progress)
Update progress bar
Inputs
progress (int): numerical value to set the progress bar to
Source code in organelle_segmenter_plugin/view/batch_processing_view.py
120 121 122 123 124 125 126 127 |
|
set_run_batch_in_progress()
Update page to reflect that a batch run is in progress
Source code in organelle_segmenter_plugin/view/batch_processing_view.py
100 101 102 103 104 105 106 107 108 |
|
update_button(enabled)
Update state of process button
Inputs
enabled: True to enable the button, false to disable it
Source code in organelle_segmenter_plugin/view/batch_processing_view.py
92 93 94 95 96 97 98 |
|
WorkflowSelectView
Bases: View
Source code in organelle_segmenter_plugin/view/workflow_select_view.py
30 31 32 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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
|
update_layers(layers, selected_layer=None)
Update / repopulate the list of selectable layers
Inputs
layers: List of layer names selected_layer_name: (optional) name of the layer to pre-select
Source code in organelle_segmenter_plugin/view/workflow_select_view.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|
update_workflows(enabled)
Update state of workflow list
Inputs
enabled: True to enable the list, False to disable it
Source code in organelle_segmenter_plugin/view/workflow_select_view.py
177 178 179 180 181 182 183 |
|