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: A vispy-based stage tracker #305

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1cf5a17
feat: wip StageRecorder
fdrgsp Feb 7, 2024
6be1354
feat: wip add Rectangle or Markers
fdrgsp Feb 7, 2024
1827a35
fix: use px size
fdrgsp Feb 7, 2024
c5a10f6
feat: add _on_mouse_double_click
fdrgsp Feb 8, 2024
4008285
feat: add preview
fdrgsp Feb 8, 2024
dfa7860
feat: example
fdrgsp Feb 8, 2024
2f4695b
fix: use frameReady for MDA
fdrgsp Feb 8, 2024
39785d2
fix: stop icon
fdrgsp Feb 8, 2024
addbdce
feat: wip add images
fdrgsp Feb 8, 2024
d691a53
fix: fix scaling
fdrgsp Feb 8, 2024
62158a4
fix: remove live mode
fdrgsp Feb 8, 2024
5e415da
fix: wip example
fdrgsp Feb 8, 2024
eb52ce7
fix: wip flip
fdrgsp Feb 8, 2024
39052f9
Merge branch 'vispy_stage_recorder' of https://github.com/fdrgsp/pymm…
fdrgsp Feb 8, 2024
c247fb8
feat: add settings menu + update _on_mouse_double_click
fdrgsp Feb 9, 2024
c227213
fix: remove stop button
fdrgsp Feb 9, 2024
a22a149
fix: show/hide settings
fdrgsp Feb 9, 2024
2e80bc9
feat: wip deck
fdrgsp Feb 9, 2024
0367443
fix: _on_frame_ready
fdrgsp Feb 9, 2024
9b6bc1a
fix: no img
fdrgsp Feb 9, 2024
652f518
feat: with toolbar
fdrgsp Feb 9, 2024
623c9ee
fix: rename
fdrgsp Feb 10, 2024
fd33f2a
fix: reorder
fdrgsp Feb 10, 2024
bcde589
feat: update rec no image
fdrgsp Feb 10, 2024
4840034
feat: add xy stage poll
fdrgsp Feb 10, 2024
53f1941
feat: add preview to rec with images
fdrgsp Feb 10, 2024
f9680ac
feat: add auto_snap + rect border
fdrgsp Feb 10, 2024
9a7aaa5
feat: Rectangle border width
fdrgsp Feb 10, 2024
60621ea
fix: update example
fdrgsp Feb 10, 2024
ee6441d
fix: setContentsMargins
fdrgsp Feb 10, 2024
77950be
fix: remove old + rename
fdrgsp Feb 10, 2024
7e1d668
fix: add value method
fdrgsp Feb 11, 2024
41b06b5
fix: fix _on_frame_ready
fdrgsp Feb 11, 2024
c11f97c
feat: add properies + private names
fdrgsp Feb 12, 2024
f0257ef
fix: reorder
fdrgsp Feb 12, 2024
a958d5c
fix: rename poll property
fdrgsp Feb 12, 2024
047493f
feat: add _on_sequence_starded and _on_sequence_ended
fdrgsp Feb 12, 2024
72672ec
feat: wip deque
fdrgsp Feb 12, 2024
fb69e4d
fix: start with timer off
fdrgsp Feb 14, 2024
4ae13d7
Merge remote-tracking branch 'upstream/main' into vispy_stage_recorder
fdrgsp Jun 24, 2024
9c73cf4
fix: examples
fdrgsp Jun 25, 2024
4c77fc1
Merge branch 'main' into vispy_stage_recorder
fdrgsp Jul 5, 2024
5489b29
Merge remote-tracking branch 'upstream/main' into vispy_stage_recorder
fdrgsp Jul 22, 2024
91c3386
Merge branch 'main' into vispy_stage_recorder
fdrgsp Nov 11, 2024
27a9dae
wip
fdrgsp Nov 23, 2024
7d26b06
wip
fdrgsp Nov 23, 2024
1c64c2f
wip
fdrgsp Nov 24, 2024
c6e7845
wip
fdrgsp Nov 24, 2024
192e486
wip
fdrgsp Nov 25, 2024
c47b788
wip
fdrgsp Nov 25, 2024
7a98678
wip: update Image instead of deleting and redrawing
fdrgsp Nov 25, 2024
16292dd
wip
fdrgsp Nov 25, 2024
cb4bffd
wip
fdrgsp Nov 26, 2024
a77cd43
add pixel size
fdrgsp Nov 26, 2024
3f90b1b
pixel size + clim
fdrgsp Nov 26, 2024
639fe37
wip
fdrgsp Nov 26, 2024
8dc1d23
added image on top
fdrgsp Nov 26, 2024
8e93091
flip
fdrgsp Nov 27, 2024
4045729
wip
fdrgsp Nov 27, 2024
b5085d1
wip
fdrgsp Nov 27, 2024
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
37 changes: 37 additions & 0 deletions examples/stage_recorder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import useq
from pymmcore_plus import CMMCorePlus
from qtpy.QtWidgets import QApplication

from pymmcore_widgets import StageWidget
from pymmcore_widgets._stage_recorder import StageRecorder

app = QApplication([])

mmc = CMMCorePlus().instance()
mmc.loadSystemConfiguration()

mmc.setProperty("Camera", "Mode", "Noise")

rec = StageRecorder()
rec.poll_xy_stage = True
rec.show()

s = StageWidget(mmc.getXYStageDevice())
s.setStep(300)
s.show()


seq = useq.MDASequence(
channels=["FITC"],
grid_plan=useq.GridRowsColumns(
rows=4,
columns=4,
fov_width=mmc.getImageWidth() * mmc.getPixelSizeUm(),
fov_height=mmc.getImageHeight() * mmc.getPixelSizeUm(),
),
stage_positions=[(0, 0)],
)

mmc.run_mda(seq)

app.exec()
36 changes: 36 additions & 0 deletions examples/stage_tracker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""Example usage of the SnapButton class."""

import useq
from pymmcore_plus import CMMCorePlus
from qtpy.QtWidgets import QApplication

from pymmcore_widgets import StageWidget
from pymmcore_widgets._stage_tracker import StageTracker

app = QApplication([])

mmc = CMMCorePlus().instance()
mmc.loadSystemConfiguration()

track = StageTracker()
track.poll_xy_stage = True
track.show()

seq = useq.MDASequence(
channels=[{"config": "FITC", "exposure": 200}],
grid_plan=useq.GridRowsColumns(
rows=4,
columns=4,
fov_width=mmc.getImageWidth() * mmc.getPixelSizeUm(),
fov_height=mmc.getImageHeight() * mmc.getPixelSizeUm(),
),
stage_positions=[(0, 0)],
)

mmc.run_mda(seq)

s = StageWidget(mmc.getXYStageDevice())
s.setStep(300)
s.show()

app.exec()
Loading
Loading