spacr 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spacr/gui.py +2 -2
- spacr/gui_elements.py +8 -7
- {spacr-0.2.0.dist-info → spacr-0.2.2.dist-info}/METADATA +1 -1
- {spacr-0.2.0.dist-info → spacr-0.2.2.dist-info}/RECORD +8 -8
- {spacr-0.2.0.dist-info → spacr-0.2.2.dist-info}/LICENSE +0 -0
- {spacr-0.2.0.dist-info → spacr-0.2.2.dist-info}/WHEEL +0 -0
- {spacr-0.2.0.dist-info → spacr-0.2.2.dist-info}/entry_points.txt +0 -0
- {spacr-0.2.0.dist-info → spacr-0.2.2.dist-info}/top_level.txt +0 -0
spacr/gui.py
CHANGED
@@ -85,7 +85,7 @@ class MainApp(tk.Tk):
|
|
85
85
|
set_dark_style(ttk.Style(), containers=[additional_buttons_frame])
|
86
86
|
|
87
87
|
# Create a frame for the description below the icon grids
|
88
|
-
description_frame = tk.Frame(self.content_frame, height=70)
|
88
|
+
description_frame = tk.Frame(self.content_frame, height=70)
|
89
89
|
description_frame.pack(fill=tk.X, pady=10)
|
90
90
|
description_frame.pack_propagate(False) # Prevent the frame from resizing based on its content
|
91
91
|
set_dark_style(ttk.Style(), containers=[description_frame])
|
@@ -110,7 +110,7 @@ class MainApp(tk.Tk):
|
|
110
110
|
for i, (app_name, app_data) in enumerate(self.additional_gui_apps.items()):
|
111
111
|
app_func, app_desc = app_data
|
112
112
|
button = spacrButton(additional_buttons_frame, text=app_name, command=lambda app_name=app_name, app_func=app_func: self.load_app(app_name, app_func), icon_name=app_name.lower(), size=75, show_text=False)
|
113
|
-
button.grid(row=0, column=i, padx=5, pady=5)
|
113
|
+
button.grid(row=0, column=i, padx=5, pady=5)
|
114
114
|
self.additional_buttons[button] = app_desc
|
115
115
|
|
116
116
|
# Update description initially
|
spacr/gui_elements.py
CHANGED
@@ -308,7 +308,7 @@ class spacrButton(tk.Frame):
|
|
308
308
|
parent = self.master
|
309
309
|
while parent:
|
310
310
|
if hasattr(parent, 'show_description'):
|
311
|
-
parent.show_description(parent.main_buttons.get(self, "No description available."))
|
311
|
+
parent.show_description(parent.main_buttons.get(self, parent.additional_buttons.get(self, "No description available.")))
|
312
312
|
return
|
313
313
|
parent = parent.master
|
314
314
|
|
@@ -343,7 +343,6 @@ class spacrButton(tk.Frame):
|
|
343
343
|
self.canvas.itemconfig(self.button_icon, image=self.icon_photo)
|
344
344
|
self.canvas.image = self.icon_photo # Keep a reference to avoid garbage collection
|
345
345
|
|
346
|
-
|
347
346
|
class spacrSwitch(ttk.Frame):
|
348
347
|
def __init__(self, parent, text="", variable=None, command=None, *args, **kwargs):
|
349
348
|
super().__init__(parent, *args, **kwargs)
|
@@ -1606,9 +1605,7 @@ class AnnotateApp:
|
|
1606
1605
|
print(f'Quit application')
|
1607
1606
|
|
1608
1607
|
def create_menu_bar(root):
|
1609
|
-
from .
|
1610
|
-
from .gui_core import initiate_root
|
1611
|
-
|
1608
|
+
from .gui import initiate_root
|
1612
1609
|
gui_apps = {
|
1613
1610
|
"Mask": (lambda frame: initiate_root(frame, 'mask'), "Generate cellpose masks for cells, nuclei and pathogen images."),
|
1614
1611
|
"Measure": (lambda frame: initiate_root(frame, 'measure'), "Measure single object intensity and morphological feature. Crop and save single object image"),
|
@@ -1627,19 +1624,23 @@ def create_menu_bar(root):
|
|
1627
1624
|
}
|
1628
1625
|
|
1629
1626
|
def load_app_wrapper(app_name, app_func):
|
1630
|
-
load_app(
|
1627
|
+
root.load_app(app_name, app_func)
|
1631
1628
|
|
1632
1629
|
# Create the menu bar
|
1633
1630
|
menu_bar = tk.Menu(root, bg="#008080", fg="white")
|
1631
|
+
|
1634
1632
|
# Create a "SpaCr Applications" menu
|
1635
1633
|
app_menu = tk.Menu(menu_bar, tearoff=0, bg="#008080", fg="white")
|
1636
1634
|
menu_bar.add_cascade(label="SpaCr Applications", menu=app_menu)
|
1635
|
+
|
1637
1636
|
# Add options to the "SpaCr Applications" menu
|
1638
1637
|
for app_name, app_data in gui_apps.items():
|
1639
1638
|
app_func, app_desc = app_data
|
1640
1639
|
app_menu.add_command(label=app_name, command=lambda app_name=app_name, app_func=app_func: load_app_wrapper(app_name, app_func))
|
1640
|
+
|
1641
1641
|
# Add a separator and an exit option
|
1642
1642
|
app_menu.add_separator()
|
1643
1643
|
app_menu.add_command(label="Exit", command=root.quit)
|
1644
|
+
|
1644
1645
|
# Configure the menu for the root window
|
1645
|
-
root.config(menu=menu_bar)
|
1646
|
+
root.config(menu=menu_bar)
|
@@ -19,12 +19,12 @@ spacr/deep_spacr.py,sha256=ASBsN4JpHp_3S-91JUsB34IWTjTGPYI7jKV2qZnUR5M,37005
|
|
19
19
|
spacr/foldseek.py,sha256=YIP1d4Ci6CeA9jSyiv-HTDbNmAmcSM9Y_DaOs7wYzLY,33546
|
20
20
|
spacr/get_alfafold_structures.py,sha256=ehx_MQgb12k3hFecP6cYVlm5TLO8iWjgevy8ESyS3cw,3544
|
21
21
|
spacr/graph_learning.py,sha256=1tR-ZxvXE3dBz1Saw7BeVFcrsUFu9OlUZeZVifih9eo,13070
|
22
|
-
spacr/gui.py,sha256=
|
22
|
+
spacr/gui.py,sha256=etiarQYeELx_zPRWH8hdrhtD_aVnuamnvrCOtUBO0kI,8322
|
23
23
|
spacr/gui_2.py,sha256=OVRDbyHgoXCqGmTKt0C0ZQrJxTU4i-4eT2uYwk0w7CA,8322
|
24
24
|
spacr/gui_annotate.py,sha256=ugBksLGOHdtOLlEuRyyc59TrkYKu3rDf8JxEgiBSVao,6536
|
25
25
|
spacr/gui_classify_app.py,sha256=Zi15ryc1ocYitRF4kyxlC27XxGyzfSPdvj2d6ZrSh7E,8446
|
26
26
|
spacr/gui_core.py,sha256=ay1IMMjcJLk8GeaXdL5rzu8xkJmpy_5XzqNhET_4SaI,33199
|
27
|
-
spacr/gui_elements.py,sha256=
|
27
|
+
spacr/gui_elements.py,sha256=1vw6of9GcRUcEzZBxte3U5K--owAR_UzPO0pUuoqfk8,79784
|
28
28
|
spacr/gui_make_masks_app.py,sha256=tl4M4Q2WQgrrwjRBJVevxJxpNowqzPhWkdCOm2UfRbw,45053
|
29
29
|
spacr/gui_make_masks_app_v2.py,sha256=X3izTBXdCZDlkVe-fbG-jmCQtcAbmK0OIivjyWaLhug,30576
|
30
30
|
spacr/gui_mask_app.py,sha256=mhTl_XzXLFl8Tx3WYEMpdYB_qw9u5JJa0EdkvlcIzAE,10706
|
@@ -118,9 +118,9 @@ spacr/resources/icons/umap.png,sha256=2XvfWSYvLg85YPuPf3C5o8wNo7_ncg5v_GBsKwzRfC
|
|
118
118
|
spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model,sha256=z8BbHWZPRnE9D_BHO0fBREE85c1vkltDs-incs2ytXQ,26566572
|
119
119
|
spacr/resources/models/cp/toxo_plaque_cyto_e25000_X1120_Y1120.CP_model_settings.csv,sha256=fBAGuL_B8ERVdVizO3BHozTDSbZUh1yFzsYK3wkQN68,420
|
120
120
|
spacr/resources/models/cp/toxo_pv_lumen.CP_model,sha256=2y_CindYhmTvVwBH39SNILF3rI3x9SsRn6qrMxHy3l0,26562451
|
121
|
-
spacr-0.2.
|
122
|
-
spacr-0.2.
|
123
|
-
spacr-0.2.
|
124
|
-
spacr-0.2.
|
125
|
-
spacr-0.2.
|
126
|
-
spacr-0.2.
|
121
|
+
spacr-0.2.2.dist-info/LICENSE,sha256=SR-2MeGc6SCM1UORJYyarSWY_A-JaOMFDj7ReSs9tRM,1083
|
122
|
+
spacr-0.2.2.dist-info/METADATA,sha256=DfgYpGaXumaUI-rBxM2mkOnU58Rno9FCLSkHDVugSt8,5049
|
123
|
+
spacr-0.2.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
124
|
+
spacr-0.2.2.dist-info/entry_points.txt,sha256=BMC0ql9aNNpv8lUZ8sgDLQMsqaVnX5L535gEhKUP5ho,296
|
125
|
+
spacr-0.2.2.dist-info/top_level.txt,sha256=GJPU8FgwRXGzKeut6JopsSRY2R8T3i9lDgya42tLInY,6
|
126
|
+
spacr-0.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|