Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] feat: Stage explorer #400

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
29a7557
feat: wip add stage explorer
fdrgsp Nov 27, 2024
b993122
feat: add properties + example
fdrgsp Nov 27, 2024
ff302b0
fix: auto_reset_view
fdrgsp Nov 27, 2024
811d96c
fix: update
fdrgsp Nov 27, 2024
3bb6df1
fix: _on_pixel_size_changed + rename
fdrgsp Nov 27, 2024
570ef9a
fix: DataStore get_image
fdrgsp Nov 27, 2024
724fdf1
fix: _on_setting_checked + rename
fdrgsp Nov 27, 2024
8d18acd
fix: remove _draw_scale_info
fdrgsp Nov 28, 2024
1efb902
fix: remove core from StageViewer and add it only to StageExplorer
fdrgsp Nov 28, 2024
5290dbf
fix: simplify StageViewer and move logic to StageExplorer
fdrgsp Nov 28, 2024
fb9fc83
fix: text
fdrgsp Nov 28, 2024
3bccb86
fix: reset_view
fdrgsp Nov 28, 2024
5984b33
fix: use float
fdrgsp Nov 28, 2024
f7a30cd
fix: remove swttings btn and use toolsbtns
fdrgsp Nov 28, 2024
9b98c4d
fix: remove swttings btn and use toolsbtns
fdrgsp Nov 28, 2024
14bbdf3
fix
fdrgsp Nov 28, 2024
48e755f
fix: use generator
fdrgsp Nov 28, 2024
9ebb34a
fix: remove print
fdrgsp Nov 29, 2024
3c1091c
fix: remove DataStore and use dict
fdrgsp Nov 29, 2024
d6c3ebe
fix: SS_TOOLBUTTON
fdrgsp Nov 29, 2024
c7e0382
fix: Reset View
fdrgsp Nov 29, 2024
7c96933
fix: map_marker
fdrgsp Nov 29, 2024
5a7d03c
fix: pos stage label
fdrgsp Nov 29, 2024
232c753
fix: example
fdrgsp Nov 29, 2024
c8bad47
fix: update ss
fdrgsp Nov 30, 2024
51128ec
wip
fdrgsp Nov 30, 2024
2d994a0
fix: not snap while mda is running
fdrgsp Dec 4, 2024
7b7a704
fix: _poll_stage_position
fdrgsp Dec 4, 2024
f4c55ad
fix: parent
fdrgsp Dec 5, 2024
58bab22
fix: example of crash
fdrgsp Dec 5, 2024
2e5bacb
fix: example of crash
fdrgsp Dec 5, 2024
312eab4
fix: remove unused
fdrgsp Dec 5, 2024
07334d1
Merge branch 'pymmcore-plus:main' into stage-explorer
fdrgsp Dec 6, 2024
0b7447a
wip
Dec 6, 2024
d0dc640
feat: use Rectangle
fdrgsp Dec 7, 2024
71fcdf4
fix: better handle reset_view
fdrgsp Dec 7, 2024
475852f
fix: remove auto_reset_view
fdrgsp Dec 7, 2024
7f84113
fix: fix pixel size
fdrgsp Dec 7, 2024
bdfabc1
fix: scale
fdrgsp Dec 7, 2024
4a2b9ba
fix: is_running
fdrgsp Dec 7, 2024
a7241f2
fix: remove print
fdrgsp Dec 7, 2024
adc29a1
fix: flip
fdrgsp Dec 7, 2024
848370d
fix: don't use private attr
fdrgsp Dec 8, 2024
ecf5433
fix: _is_image_within_view
fdrgsp Dec 8, 2024
11de99f
fix: wip
fdrgsp Dec 9, 2024
cac5fae
fix: add vispy
fdrgsp Dec 9, 2024
cc31110
wip
fdrgsp Dec 12, 2024
cdb827b
fix: example
fdrgsp Dec 12, 2024
12f14c8
fix: add MIN_XY_DIFF to reset view when polling
fdrgsp Dec 21, 2024
b5ff070
wip: rotation
fdrgsp Jan 2, 2025
8f8fbd6
fix: addSeparator
fdrgsp Jan 3, 2025
0426604
test: add StageViewer tests
fdrgsp Jan 3, 2025
27c6662
Merge branch 'pymmcore-plus:main' into stage-explorer
fdrgsp Jan 3, 2025
78aaa97
fix: update
fdrgsp Jan 4, 2025
12e2494
fix: rotation
fdrgsp Jan 4, 2025
446d419
fix: reorder
fdrgsp Jan 4, 2025
481aa2f
fix: update marker logic
fdrgsp Jan 4, 2025
27f3294
fix: wip _is_image_within_view
fdrgsp Jan 4, 2025
327c2bd
Merge remote-tracking branch 'upstream/main' into stage-explorer
fdrgsp Feb 8, 2025
93d6856
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 11, 2025
0203f21
Merge branch 'main' into stage-explorer
fdrgsp Feb 11, 2025
5e86861
fix flip
fdrgsp Feb 18, 2025
fd6cd84
handle rotation of stage pos marker
fdrgsp Feb 18, 2025
a581260
_handle_rotation
fdrgsp Feb 18, 2025
cdc2904
remove print
fdrgsp Feb 18, 2025
34673e7
updatre rotation
fdrgsp Feb 18, 2025
9e77238
wip roi
fdrgsp Feb 19, 2025
9833179
wip roi
fdrgsp Feb 19, 2025
5a150fe
wip multi roi
fdrgsp Feb 19, 2025
c3e1180
fix
fdrgsp Feb 19, 2025
b647e9c
fix
fdrgsp Feb 19, 2025
df6d9df
rectChanged
fdrgsp Feb 19, 2025
728066b
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 19, 2025
065a0e4
wip
fdrgsp Feb 20, 2025
b253609
wip
fdrgsp Feb 20, 2025
b422f0a
wip
fdrgsp Feb 20, 2025
26f004b
wip
fdrgsp Feb 20, 2025
173ec5c
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 20, 2025
eeea3b3
scale
fdrgsp Feb 21, 2025
d6f9be5
wip
fdrgsp Feb 21, 2025
4e40fba
wip
fdrgsp Feb 21, 2025
91d48c4
flip
fdrgsp Feb 21, 2025
5d01b2d
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 21, 2025
7848068
fix flip
fdrgsp Feb 21, 2025
adf0b85
example
fdrgsp Feb 21, 2025
fdd01f6
fix flip
Feb 21, 2025
79b394a
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 21, 2025
e08bbba
fix flip
Feb 21, 2025
a80915b
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 21, 2025
2303e35
remove print
fdrgsp Feb 22, 2025
f68744b
fix get x y from matrix
fdrgsp Feb 22, 2025
35dd645
fix _get_full_boundaries
fdrgsp Feb 23, 2025
fe0f7ec
remove unused
fdrgsp Feb 23, 2025
b785d50
roi
fdrgsp Feb 23, 2025
c0c7c8d
reorder
fdrgsp Feb 23, 2025
9d7629a
wip roi
fdrgsp Feb 23, 2025
cb955c3
cursor
fdrgsp Feb 23, 2025
006814b
comment + (dis)connect
fdrgsp Feb 23, 2025
cbd3eea
update rois
fdrgsp Feb 23, 2025
619bdda
update value()
fdrgsp Feb 23, 2025
341f59e
roi text
fdrgsp Feb 24, 2025
74f4eea
fix GridFromEdges
fdrgsp Feb 25, 2025
5a2ac78
_build_grid_plan
fdrgsp Feb 25, 2025
e3dcab7
update timerEvent
fdrgsp Feb 25, 2025
073fd79
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 25, 2025
627ffa7
TODO
fdrgsp Feb 25, 2025
cac6c86
increase marker pixels
fdrgsp Feb 25, 2025
d1f7d54
move roi logic to explorer
fdrgsp Feb 26, 2025
bd951b5
text
fdrgsp Feb 26, 2025
5b3b25e
fix section
fdrgsp Feb 26, 2025
09b6bbd
rois btns
fdrgsp Feb 26, 2025
a0021ae
fix RotationControl
fdrgsp Feb 26, 2025
8e4686d
fix _get_full_boundaries + stage marker
Feb 27, 2025
b3045b9
style(pre-commit.ci): auto fixes [...]
pre-commit-ci[bot] Feb 27, 2025
a02e3b1
Merge branch 'pymmcore-plus:main' into stage-explorer
fdrgsp Mar 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unused
fdrgsp committed Feb 23, 2025
commit fe0f7ec0891ac133885936d84a87b5ff3071e90d
Original file line number Diff line number Diff line change
@@ -326,7 +326,6 @@ def _on_sys_config_loaded(self) -> None:

def _on_pixel_size_changed(self) -> None:
"""Update the stage position marker when the pixel size changes."""
self._stage_viewer.pixel_size = self._mmc.getPixelSizeUm()
self._update_stage_marker()

def _on_image_snapped(self) -> None:
Original file line number Diff line number Diff line change
@@ -54,9 +54,6 @@ def __init__(self, parent: Optional[QWidget] = None) -> None:
self.view = cast(ViewBox, self.canvas.central_widget.add_view())
self.view.camera = scene.PanZoomCamera(aspect=1)

# pixel size property
self._pixel_size: float = 1.0

# to store the displayed images scale
self._current_scale: float = 1

@@ -72,7 +69,6 @@ def __init__(self, parent: Optional[QWidget] = None) -> None:
def add_image(self, img: np.ndarray, transform: np.ndarray) -> None:
"""Add an image to the scene with the given transform."""
frame = ImageData(img, cmap="grays", parent=self.view.scene, clim="auto")
frame.scale = self._pixel_size
# keep the added image on top of the others
frame.order = min(child.order for child in self._get_images()) - 1
# add the image to the scene with the transform