Giter VIP home page Giter VIP logo

Comments (2)

fdrgsp avatar fdrgsp commented on June 15, 2024 3

Hi @hiroalchem, if you want to use napari-micromanager, you can acquire a time-lapse using the Muti-D Acquisition tab (image below).

After loading your Micro-Manager configuration and setting the channels you want to acquire in the Channels table, you can check the Time box and set the time-lapse parameter. You can define how many timepoints you want to acquire in the Timepoints spinbox and the interval between each timepoints (in your example 5 minutes) in the Interval spinbox (you can also select the interval's unit - ms, sec, min - in the drop-down box). When you press on the Run button, the acquisition will start.

Screen Shot 2022-08-05 at 6 02 01 AM


For the image processing, If you want to analyze each timepoints after they are acquired, you can connect your analysis pipeline to the frameReady pymmcore-plus signal that is emitted every time an image is acquired.

This is an example if you want to use napari-micromanager:

import napari
from useq import MDASequence, MDAEvent
from pymmcore_plus import CMMCorePlus
import numpy as np

viewer = napari.Viewer()
dw, main_window = viewer.window.add_plugin_dock_widget("napari-micromanager")

# get the CMMCorePlus running instance
core = CMMCorePlus.instance()

# your analysis
def _on_mda_frame(image: np.ndarray, event: MDAEvent):
    
    # 'image' is the last image that has been acquired (numpy array)
    print(image)

    # 'event' contains all the info about the acquisition event
    print(event)

    # return if the 'frameReady' signal is not triggered by a Muti-D Acquisition
    sequence_metadata = main_window._mda_meta
    if sequence_metadata.mode != "mda":
        return

    # you can call your image processing pipeline here to perform the analysis on 'image'.

# connect your analysis code to the pymmcore-plus 'frameReady' signal.
core.mda.events.frameReady.connect(_on_mda_frame)

# run napari
napari.run()

You can now setup napari-micromanager and run the Muti-D Acquisition as explained above but this time your analysis pipeline is executed every time a frame is received.

I hope this is helping!

from napari-micromanager.

tlambert03 avatar tlambert03 commented on June 15, 2024

closing this @hiroalchem ... but feel free to reopen if you have more questions

from napari-micromanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.