µmWeb alpha released for µManager 2.0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

µmWeb alpha released for µManager 2.0

Karl Bellve-3

First, this work is based off of Matt Neuro's Rest Server. Hats off to Matt for letting me extend his work.

As the name, µmWeb, implies you can access µManager across the web using simple URLs. I think this is the third name change...originally I called it µmKNIME because I was developing it with KNIME in mind, but then Kyle Douglass mentioned to me he used µmKNIME (now µmWeb) to change µManager properties via his smartphone. So, someone could create a smart phone app to control µManager...

First, µmWeb can be found here: https://github.com/kbellve/MMrestServer

Here are some of the things µmWeb can do:

Snap a single image and place it in a window titled "test" at timepoint 0: 
Snap a second image and place it in the same window titled "test" at timepoint 1: 
Snap an image and place it in the "Snap/Live" window:
Retrieve a single image from time = 1 from window "test"
Currently, this is coded to 8 bit PNG, and it is formatted for most web browsers and KNIME (get URL node) can retrieve it without too much fuss. More work needs to be done here...but this is only meant for artificial intelligence to determine if it was appropriate to take additional images/channels, which should be saved directly to a file system. 

Or, run a complete 3D multidimensional acquisition, saving as acquiring, with previously saved settings:
One can also modify most MDA settings via a URL before running an acquisition. 

One can also set or get any device properties. This allows you to manually run an acquisition or put devices into the proper state before you run an automated acquisition. 

This changes the exposure for the DCam device to 10 ms:
Additionally, one can either execute a local script, or upload a script for execution ( small scripts up to 2000 characters). The following is a modified version of "DataStoreExample.bsh" in the scripts directory.


This is alpha, and there is no security with this at this point. It can and possibly will blow up your computer, your microscope, and the universe...

The port 8000 is hard coded, and there is no encryption or user authentication. I am currently thinking on how to solve this. If you must have security, and you want to try this, you could always install a web server with ssl/tls acting as a frontend and only let µmWeb connect through that web server (i.e. appropriate firewall settings). Right now, µmWeb is far enough along for me to test KNIME control of µManager via µmWeb..so that is where my attention will be in the next few months. I will get back to security after that...

Here are some of the Acquisition options seen on the default µmWeb web page:

stopOptionalStops all non-blocking running acquisitions
runOptionalRuns the currently configured acquisition
settingsOptional[String] pathway to a previously saved MDA settings file
blockingOptional[false|true] Runs the currently configured acquisition as either blocking or non-blocking
saveOptional[false|true] Save images while acquiring the currently configured acquisition
rootOptional[String] Directory location to save the currently configured acquisition
prefixOptional[String] Prefix name for the currently configured acquisition
commentOptional[String] Comment for the currently configured acquisition
slicesFirstOptional[false|true] Slice coordinate changes first
timeFirstOptional[false|true] time coordinate changes first
relativeZOptional[false|true] Z coordinates relative or absolute
displayOptional[false|true] Should images be displayed during acquisition
autofocusOptional[false|true] Autofocus before acquiring each position/frame
skipautofocusOptional[Int] How many autofocus opportunities to skip before autofocusing
startZOptional[Int] Position to start 3D imaging, in microns 
Must be used with endZ and stepZ
endZOptional[Int] Position to end 3D imaging, in microns 
Must be used with startZ and stepZ
stepZOptional[Int] Distance between 3D steps, in microns 
Must be used with startZ and endZ
framesOptional[Int] How many frames (timepoints) should be acquired
intervalOptional[Int] How many milliseconds should μManager wait before acquiring the next image
cameraTimeoutOptional[Int] How many milliseconds should μManager wait for camera timeout

Here are some of the Snap options seen on the default µmWeb web page:
General Options
FieldPrevalenceDescription
exposureOptional[Int] The time in ms of exposure.
titleOptional[String] Title of new window.
Coordinate Options
If you are using a datastore, coordinates must also be passed to set the insert location of the new image. The location must not overwrite an image already in the datastore.
FieldPrevalenceDescription
timeOptional[Int] The time coordinate position of the new image, 0 indexed
channelOptional[Int] The channel coordinate position of the new image, 0 indexed
zOptional[Int] The z coordinate position of the new image, 0 indexed.
positionOptional[Int] The coordinate position of the new image, 0 indexed
Datastore Options
A datastore will only be created if the current window does not already have a datastore attached, and coordinates are also being passed.
FieldPrevalenceDescription
ramDefaultμManager creates a ram-backed Datastore by default
multitiffOptional[string] File name used by μManager to back a Datastore using a mutltipage tiff
singletiffOptional[string] File name used by μManager to back a Datastore using single plane tiffs
directoryOptional[string] directory used by μManager to back a Datastore
manageOptional[false|true] Instructs μManager to manage the datastore
metadataOptional[false|true] Instructs μManager to split the metadata into a separate file
splitOptional[false|true] Instructs μManager to split each stage positions into separate files



Cheers 

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general