MM2.0 scripting (BeanShell) and named-pipes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MM2.0 scripting (BeanShell) and named-pipes

TeaTarras
Hi, all

I am a novice user of MicroManager 2.0 (gamma), but would like to test its
full capabilities and for that I decided to ask for help. Namely, *during*
the fast image acquisition (Multi-D Acq) protocol, I would like to *output
every frame* (in real-time, as single TIFFs) to an external software. I am
aware of the named-pipes as a way of inter-process communication (IPC), but
is it possible to establish a named pipe via BeanShell scripting?

*If yes* - would anyone have a suggestion on how to do it? /(My platform is
Windows 10 Professional.)/

*If not* - I was planning to use Python to access MMCore and make IPC happen
in this environment. However, I am aware that MM does not offer GUI in
Python and I am stuck "in the darkness" (i.e. I can not access live view to
see what my camera is capturing). If I have MM software running as a
stand-alone, and I try to run my MMCore Python script for Multi-D Acq, I get
an error that the camera is not available (possibly because it is already
used by MM app itself).  In this case, how should I proceed to get both the
live view of my imaging plane and Python-control over the software/system?

Thanks in advance!
Tea




--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: MM2.0 scripting (BeanShell) and named-pipes

Nico Stuurman-2
Hi Tea,

I am not exactly sure what you want to accomplish, but you may want to
look into using Henry's Pygellan bridge:

https://github.com/henrypinkard/Pygellan

All very much work in progress, so ask this list if you get stuck.

Best,

Nico


On 3/16/2020 10:33 AM, TeaTarras wrote:

> Hi, all
>
> I am a novice user of MicroManager 2.0 (gamma), but would like to test its
> full capabilities and for that I decided to ask for help. Namely, *during*
> the fast image acquisition (Multi-D Acq) protocol, I would like to *output
> every frame* (in real-time, as single TIFFs) to an external software. I am
> aware of the named-pipes as a way of inter-process communication (IPC), but
> is it possible to establish a named pipe via BeanShell scripting?
>
> *If yes* - would anyone have a suggestion on how to do it? /(My platform is
> Windows 10 Professional.)/
>
> *If not* - I was planning to use Python to access MMCore and make IPC happen
> in this environment. However, I am aware that MM does not offer GUI in
> Python and I am stuck "in the darkness" (i.e. I can not access live view to
> see what my camera is capturing). If I have MM software running as a
> stand-alone, and I try to run my MMCore Python script for Multi-D Acq, I get
> an error that the camera is not available (possibly because it is already
> used by MM app itself).  In this case, how should I proceed to get both the
> live view of my imaging plane and Python-control over the software/system?
>
> Thanks in advance!
> Tea
>
>
>
>
> --
> Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__micro-2Dmanager.3463995.n2.nabble.com_&d=DwICAg&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=w-qEHR_MBfuS71j1qqcEPoBfPvqUs6xG1l-DqayDMKo&s=Z0RDLFoRJYaszqzTXKph1KlGo8ioE5px52U-QBLa5QQ&e=
>
>
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_micro-2Dmanager-2Dgeneral&d=DwICAg&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=w-qEHR_MBfuS71j1qqcEPoBfPvqUs6xG1l-DqayDMKo&s=PMDivONM_raxR6wR1uUzF_yrb9NN2Y_GGovW5OgOyS0&e=
> .



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: MM2.0 scripting (BeanShell) and named-pipes

PAVAK SHAH-4
Hi Tea,

This should 100% be possible since I know that Rapp Opto's micro-manager plugin connects to a named pipe to transfer images to their Syscon software for their UGA-42 Firefly / Caliburn systems. I've also connected to their named pipe for system control while running micro-manager inside of MATLAB (just to transfer coordinates rather than images). 

Some quick googling turned up this example code for reading / writing named streams in Java: 


And the suggestion that while it's possible for Java code to read/write from an existing OS level named stream by accessing it as a random access file, you can't create a new stream from Java. Your external code would need to create the stream.

Best,
Pavak


On Mon, Mar 16, 2020, 7:38 PM Nico Stuurman <[hidden email]> wrote:
Hi Tea,

I am not exactly sure what you want to accomplish, but you may want to
look into using Henry's Pygellan bridge:

https://github.com/henrypinkard/Pygellan

All very much work in progress, so ask this list if you get stuck.

Best,

Nico


On 3/16/2020 10:33 AM, TeaTarras wrote:
> Hi, all
>
> I am a novice user of MicroManager 2.0 (gamma), but would like to test its
> full capabilities and for that I decided to ask for help. Namely, *during*
> the fast image acquisition (Multi-D Acq) protocol, I would like to *output
> every frame* (in real-time, as single TIFFs) to an external software. I am
> aware of the named-pipes as a way of inter-process communication (IPC), but
> is it possible to establish a named pipe via BeanShell scripting?
>
> *If yes* - would anyone have a suggestion on how to do it? /(My platform is
> Windows 10 Professional.)/
>
> *If not* - I was planning to use Python to access MMCore and make IPC happen
> in this environment. However, I am aware that MM does not offer GUI in
> Python and I am stuck "in the darkness" (i.e. I can not access live view to
> see what my camera is capturing). If I have MM software running as a
> stand-alone, and I try to run my MMCore Python script for Multi-D Acq, I get
> an error that the camera is not available (possibly because it is already
> used by MM app itself).  In this case, how should I proceed to get both the
> live view of my imaging plane and Python-control over the software/system?
>
> Thanks in advance!
> Tea
>
>
>
>
> --
> Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__micro-2Dmanager.3463995.n2.nabble.com_&d=DwICAg&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=w-qEHR_MBfuS71j1qqcEPoBfPvqUs6xG1l-DqayDMKo&s=Z0RDLFoRJYaszqzTXKph1KlGo8ioE5px52U-QBLa5QQ&e=
>
>
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_micro-2Dmanager-2Dgeneral&d=DwICAg&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=w-qEHR_MBfuS71j1qqcEPoBfPvqUs6xG1l-DqayDMKo&s=PMDivONM_raxR6wR1uUzF_yrb9NN2Y_GGovW5OgOyS0&e=
> .



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general