You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new Java-based acquisition engine (https://github.com/micro-manager/AcqEngJ ) should be able to eventually replace the existing Clojure one, providing additional functionality and making long term maintenance and improvement of the acquisition system easier. Additionally, this would enable better integration of Pycro-Manager, such that arbitrary python code could be injected into the acquisition cycle to synchronize hardware, or used to modify/divert images.
Unfortunately, I don't have the bandwidth to take this on right now, but I'm hoping someone else might take a stab at it.
A first step in this process would be to import use of AcqEngJ into the mmstudio codebase, so that it can be tested side-by-side with the existing engine until it is vetted enough to fully replace it. This will also require additions to AcqEngJ, such as support for autofocus. Right now, AcqEngJ is used in both the Java side of Pycro-Manager and Micro-Magellan. Both these projects use NDViewer as an image viewer and NDTffStorage to save data, but the interfaces are entirely separated, so it should be possible to swap in the alternatives in mmstudio.
Practically this will involve:
Instantiating the new engine. This only needs to happen once.
import org.micromanager.acqj.internal.acqengj.Engine;
Engine engJ = new Engine(core);
Making an object that implements AcqEngJ's DataSink interface. This might need to be an adapted class, or maybe there is an existing mmstudio class that already maps to this easily.
Extending or creating a class that has an instance of org.micromanager.acqj.api.Acquisition. This class takes DataSink as an argument, and must have the initialize() and then start() methods called on it. It's public API and documentation can be found in org.micromanager.acqj.api.AcquisitionInterface
Tell the Acquisition what to acquire by calling submitEventIterator with an argument of an Iterator<org.micromanager.acqj.api.AcquisitionEvent>. Acquisition events correspond to the settings of a single image (i.e. one z slice on one channel). Submitting them as an iterator allows for the engine to do hardware sequencing, where applicable. One advantage of this system is that AcqusitionEvents can be serialized and deserialized using JSON, so acquisition instructions can come from code, a text file, or another programming language (e.g. Pycro-Manager). Convenience functions for doing this over time/z/channels/positions are already implemented (see here and here). Magellan's acquisition's provide a similar example of how to do this.
Finally, finish the acquisition by calling acquisition.finish()
Maybe add a method to the studio API that automatically creates an acquisition with the settings present on the MDA window (if this doesn't already exist), so that external libraries (like Pycro-Manager) can create acquisitions with the MM GUI, but inject its own python-based image processors.
The text was updated successfully, but these errors were encountered:
The new Java-based acquisition engine (https://github.com/micro-manager/AcqEngJ ) should be able to eventually replace the existing Clojure one, providing additional functionality and making long term maintenance and improvement of the acquisition system easier. Additionally, this would enable better integration of Pycro-Manager, such that arbitrary python code could be injected into the acquisition cycle to synchronize hardware, or used to modify/divert images.
Unfortunately, I don't have the bandwidth to take this on right now, but I'm hoping someone else might take a stab at it.
A first step in this process would be to import use of AcqEngJ into the mmstudio codebase, so that it can be tested side-by-side with the existing engine until it is vetted enough to fully replace it. This will also require additions to AcqEngJ, such as support for autofocus. Right now, AcqEngJ is used in both the Java side of Pycro-Manager and Micro-Magellan. Both these projects use NDViewer as an image viewer and NDTffStorage to save data, but the interfaces are entirely separated, so it should be possible to swap in the alternatives in mmstudio.
Practically this will involve:
Making an object that implements AcqEngJ's DataSink interface. This might need to be an adapted class, or maybe there is an existing mmstudio class that already maps to this easily.
Extending or creating a class that has an instance of
org.micromanager.acqj.api.Acquisition
. This class takesDataSink
as an argument, and must have theinitialize()
and thenstart()
methods called on it. It's public API and documentation can be found in org.micromanager.acqj.api.AcquisitionInterfaceTell the Acquisition what to acquire by calling
submitEventIterator
with an argument of anIterator<org.micromanager.acqj.api.AcquisitionEvent>
. Acquisition events correspond to the settings of a single image (i.e. one z slice on one channel). Submitting them as an iterator allows for the engine to do hardware sequencing, where applicable. One advantage of this system is thatAcqusitionEvents
can be serialized and deserialized using JSON, so acquisition instructions can come from code, a text file, or another programming language (e.g. Pycro-Manager). Convenience functions for doing this over time/z/channels/positions are already implemented (see here and here). Magellan's acquisition's provide a similar example of how to do this.Finally, finish the acquisition by calling
acquisition.finish()
Maybe add a method to the studio API that automatically creates an acquisition with the settings present on the MDA window (if this doesn't already exist), so that external libraries (like Pycro-Manager) can create acquisitions with the MM GUI, but inject its own python-based image processors.
The text was updated successfully, but these errors were encountered: