Re: [micro-manager-general] ImageJ integration
Status: Beta
Brought to you by:
nicost
|
From: Carlos G M. <tr...@ac...> - 2020-03-29 17:42:49
|
Nico Stuurman @ 29/03/2020 13:45 -0300 dixit: > Hi Carlos, > > Sorry for the delay, slipped through the cracks.. No worries, thanks for you time. > >> as I'm trying to get a realtime (i.e. live) graph of pinhole >> intensities, > > It would be useful to understand a bit better what your end "product" > would be. My guess is that you want to be able to start a live stream, > have code that automatically finds pinholes (bright spots in the image), > and produces data (and/or graphs) with intensities of these pinholes in > all subsequent images. Is that about right? Hmm, some. Forgive my use of terms; as I said, I'm helping others here. They use pinhole to describe points of interest, but after reading a lot, I guess that is not the original meaning. So the use case is realtime multiple ROI intensity tracking. The ROIs will me manually setup on a live stream, and then they want to have a multi plot of corresponging intensities, updating as the aquisition goes. They want to use that as feedback for changing some experiment variables. > >> I "discovered" that ImageJ seems not aware that >> micro-manager (uM?) has a stack of images available and is only aware of >> the displayed ones. > > Correct. You do not want to access Micro-Manager images through the > ImageJ interface. When we started out we very much wanted to integrate > MM with ImageJ as much as possible, but quickly ran into all kinds of > limitations of ImageJ (don't forget that ImageJ was never designed for > its current use, it grew beyond Wayne Rasband's wildest imagination). > In the last refactoring of the MMcode, the interaction with ImageJ was > restricted to the part where images are displayed, so ImageJ has very > limited knowledge of the data. > >> ImageJ has some tools that work on stacks or hyperstacks that do not >> recognize uM data as such (i.e. ImageJ sees the images as 2D data). > > What tools do you want to use that work on stacks? There you have ROI manager, multiple ROI measurements, plots (even "live" that e.g. change as you change a line of interest). And ImageJ native plugins. >> I've seen many tools that bridge this gap, but all of them seem to work >> on static data (i.e. done experiments) but I would like to use them on >> live ones. >> >> Has anybody dealt with this already ? Is there a uM datastore -> ImageJ >> hyperstack bridge of sorts ? I do not want to reinvent the wheel... > > Use the MM api to access image data (i.e., see: > https://micro-manager.org/wiki/Version_2.0_API). Once you have an MM > Image, get an ImageJ ImageProcessor using the mm.data().ij() > ImageJConverter > (https://valelab4.ucsf.edu/~MM/doc-2.0.0-alpha/mmstudio/org/micromanager/data/ImageJConverter.html). > Inserts these into an ImageJ stack anyway you want. MM Datastores do > not fit 1:1 to ImageJ stacks or HyperStacks, although you could write > convenience functions if you so desire. The issue that I find is that the ImageJ GUI is not aware of the stack, or at least I have not been able to do it in a proper way. I have been able to get the ImagePlus processor, from which I can create a stack and dynamically add uM frames, but the only way to make ImageJ "aware" of it seems replacing the Display image. If I do that, ImageJ sees the stack and the tools work, but I'm breaking many assumptions by the code, I think. If there is no other way to have a realtime multi ROI graph of measurements... I guess that is the way it's going to be. > > Best, > > > Nico Thanks, -Carlos -- Carlos G Mendioroz <tr...@ac...> |