About the two data rate of micro-manager

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

About the two data rate of micro-manager

luchangli1993

Dear all,

Currently I’m designing a micro-manger plugin to processing images by GPU. I get the raw image in the On-the-fly processor pipeline and send it to C++ code processed by CUDA based on your previous suggestion. While I meet a problem that in live mode, there are two data rate: acquisition data rate and display data rate, the display data rate is much slower than the acquisition.

It’s seems only displayed images can be acquired from the pipeline in live mode, thus the processing efficiency is very low since other images are “discarded”. Although in multi-dimensional acquisition (MDA) mode all images can be acquired, I strongly want to use the live mode since the MDA need a high performance PC when I need to acquire tremendous images (I only need the processed result but not the raw images).

      Are there some methods that can access all images from the pipeline in live mode, or in MDA just acquire images but not save them to RAM and hard disk?

 

Thank you very much and best wishes.

 

 
2017-03-01

Luchang Li
Doctorial student
Britton Chance Center for Biomedical Photonics
Wuhan National Laboratory for Optoelectronics (WNLO)
Huazhong University of Science and Technology
1037 Luoyu Road WNLO G201, Wuhan 430074, P. R. China

------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the two data rate of micro-manager

Nico Stuurman-2

Hi Luchang,


Currently I’m designing a micro-manger plugin to processing images by GPU. I get the raw image in the On-the-fly processor pipeline and send it to C++ code processed by CUDA based on your previous suggestion. While I meet a problem that in live mode, there are two data rate: acquisition data rate and display data rate, the display data rate is much slower than the acquisition.

It’s seems only displayed images can be acquired from the pipeline in live mode, thus the processing efficiency is very low since other images are “discarded”. Although in multi-dimensional acquisition (MDA) mode all images can be acquired, I strongly want to use the live mode since the MDA need a high performance PC when I need to acquire tremendous images (I only need the processed result but not the raw images).


Indeed, for live mode it is important to always display the latest (newest) image, and if the display can not keep up, it is OK to drop images.  For an acquisition all data need to be acquired.

There are currently no options in the MDA to discard images (although that should be an easy "DataStore" to create).  If your want your camera to stream (which seems to be the case since you are using live mode), it would be easy to do this in a script (or plugin) and grab the images from the core yourself.  In that case, there is no need to go through the pipeline (you have the image already), although it will be easy to insert the image into the pipeline as well.

You can find an example Beanshell script to here:  https://github.com/micro-manager/micro-manager/blob/mm2/scripts/burstAcquisition.bsh.

Curious to see your GPU processing code.  Any way you can share?

Best,

Nico




------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the two data rate of micro-manager

luchangli1993
Thanks Nico,
After I finish my plugin, I will share both the plugin and GPU code and I think many people will be interested it.
It's better to distribute my work as a plugin but not script, since it's easier to use and many parameters to set. You mentioned I should get images directly from core but not from pipeline, can I finish it in a plugin? I will study the script first.
 
Thank you very much and best wishes.
 
2017-03-03
Luchang Li
Doctorial student
Britton Chance Center for Biomedical Photonics
Wuhan National Laboratory for Optoelectronics (WNLO)
Huazhong University of Science and Technology
1037 Luoyu Road WNLO G201, Wuhan 430074, P. R. China

发件人:Nico Stuurman <[hidden email]>
发送时间:2017-03-02 12:44
主题:Re: [micro-manager-general] About the two data rate of micro-manager
收件人:"Micro-Manager General"<[hidden email]>
抄送:
 

Hi Luchang,


Currently I’m designing a micro-manger plugin to processing images by GPU. I get the raw image in the On-the-fly processor pipeline and send it to C++ code processed by CUDA based on your previous suggestion. While I meet a problem that in live mode, there are two data rate: acquisition data rate and display data rate, the display data rate is much slower than the acquisition.

It’s seems only displayed images can be acquired from the pipeline in live mode, thus the processing efficiency is very low since other images are “discarded”. Although in multi-dimensional acquisition (MDA) mode all images can be acquired, I strongly want to use the live mode since the MDA need a high performance PC when I need to acquire tremendous images (I only need the processed result but not the raw images).


Indeed, for live mode it is important to always display the latest (newest) image, and if the display can not keep up, it is OK to drop images.  For an acquisition all data need to be acquired.

There are currently no options in the MDA to discard images (although that should be an easy "DataStore" to create).  If your want your camera to stream (which seems to be the case since you are using live mode), it would be easy to do this in a script (or plugin) and grab the images from the core yourself.  In that case, there is no need to go through the pipeline (you have the image already), although it will be easy to insert the image into the pipeline as well.

You can find an example Beanshell script to here:  https://github.com/micro-manager/micro-manager/blob/mm2/scripts/burstAcquisition.bsh.

Curious to see your GPU processing code.  Any way you can share?

Best,

Nico




------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the two data rate of micro-manager

Nico Stuurman-2
Hi Luchang,


>
> After I finish my plugin, I will share both the plugin and GPU code
> and I think many people will be interested it.

Thanks!  Looking forward to seeing it!

> It's better to distribute my work as a plugin but not script, since
> it's easier to use and many parameters to set. You mentioned I should
> get images directly from core but not from pipeline, can I finish it
> in a plugin? I will study the script first.

Yes, you can do everything in a plugin that you can do in a script. You
have multiple options.  You can have your plugin create buttons that
start and stop the data acquisition.  When started, call the core to
start burstacquisition as I described before.  Grab the images that
appear in the circular buffer, and either process them directly, or
insert them in the pipeline as you did before.  If you do not need to do
anything with the images that you processed, it may not be very useful
to do the pipeline approach.

Best,

Nico


------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the two data rate of micro-manager

luchangli1993
Dear Nico,
Thank you very much for your answers.
Directly use the core to get images is a good idea. I still have a problem, how can I display the images acquired in burstacquisition in real time? Although the raw images is not useful after processed, I want it be displayed to supervise the image quality. Only some of them to be displayed is ok.
 
Thank you very much and best wishes.
 
2017-03-04
Luchang Li
Doctorial student
Britton Chance Center for Biomedical Photonics
Wuhan National Laboratory for Optoelectronics (WNLO)
Huazhong University of Science and Technology
1037 Luoyu Road WNLO G201, Wuhan 430074, P. R. China

发件人:Nico Stuurman <[hidden email]>
发送时间:2017-03-03 09:24
主题:Re: [micro-manager-general] About the two data rate of micro-manager
收件人:"Micro-Manager General"<[hidden email]>
抄送:
 
Hi Luchang, 
 
 
> After I finish my plugin, I will share both the plugin and GPU code  
> and I think many people will be interested it. 
 
Thanks!  Looking forward to seeing it! 
 
> It's better to distribute my work as a plugin but not script, since  
> it's easier to use and many parameters to set. You mentioned I should  
> get images directly from core but not from pipeline, can I finish it  
> in a plugin? I will study the script first. 
 
Yes, you can do everything in a plugin that you can do in a script. You  
have multiple options.  You can have your plugin create buttons that  
start and stop the data acquisition.  When started, call the core to  
start burstacquisition as I described before.  Grab the images that  
appear in the circular buffer, and either process them directly, or  
insert them in the pipeline as you did before.  If you do not need to do  
anything with the images that you processed, it may not be very useful  
to do the pipeline approach. 
 
Best, 
 
Nico 
 
 
------------------------------------------------------------------------------ 
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 
https://lists.sourceforge.net/lists/listinfo/micro-manager-general 

------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the two data rate of micro-manager

Nico Stuurman-2
Hi Luchang,


On 3/3/17 11:48 PM, luchangli1993 wrote:
> Directly use the core to get images is a good idea. I still have a
> problem, how can I display the images acquired in burstacquisition in
> real time? Although the raw images is not useful after processed, I
> want it be displayed to supervise the image quality. Only some of them
> to be displayed is ok.

You would need to create your own Datastore and attach a DisplayWindow
to it.  Then update the displayed image at a rate that it can handle.  
The wiki page gives some high level overview:
https://micro-manager.org/wiki/Version_2.0_API#Display_controls:_the_display_API.
I think I pointed you to the burstAcquisition script before.  That shows
you how to insert data into a Datastore.  Open a DisplayWindow on that
store, insert images always at the sam coordinate, and trigger an update
of the DisplayWindow, and you should be good to do.

Best,

Nico


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: About the two data rate of micro-manager

luchangli1993
Thanks nico, I will try it.
 
2017-03-07
Luchang Li
Doctorial student
Britton Chance Center for Biomedical Photonics
Wuhan National Laboratory for Optoelectronics (WNLO)
Huazhong University of Science and Technology
1037 Luoyu Road WNLO G305, Wuhan 430074, P. R. China

发件人:Nico Stuurman <[hidden email]>
发送时间:2017-03-07 02:17
主题:Re: [micro-manager-general] About the two data rate of micro-manager
收件人:"Micro-Manager General"<[hidden email]>
抄送:
 
Hi Luchang, 
 
 
On 3/3/17 11:48 PM, luchangli1993 wrote: 
> Directly use the core to get images is a good idea. I still have a  
> problem, how can I display the images acquired in burstacquisition in  
> real time? Although the raw images is not useful after processed, I  
> want it be displayed to supervise the image quality. Only some of them  
> to be displayed is ok. 
 
You would need to create your own Datastore and attach a DisplayWindow  
to it.  Then update the displayed image at a rate that it can handle.   
The wiki page gives some high level overview:  
https://micro-manager.org/wiki/Version_2.0_API#Display_controls:_the_display_API.  
I think I pointed you to the burstAcquisition script before.  That shows  
you how to insert data into a Datastore.  Open a DisplayWindow on that  
store, insert images always at the sam coordinate, and trigger an update  
of the DisplayWindow, and you should be good to do. 
 
Best, 
 
Nico 
 
 
------------------------------------------------------------------------------ 
Announcing the Oxford Dictionaries API! The API offers world-renowned 
dictionary content that is easy and intuitive to access. Sign up for an 
account today to start using our lexical data to power your apps and 
projects. Get started today and enter our developer competition. 
http://sdm.link/oxford 
_______________________________________________ 
micro-manager-general mailing list 
https://lists.sourceforge.net/lists/listinfo/micro-manager-general 

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Loading...