Re: [micro-manager-general] 3-Channel overview window
Status: Beta
Brought to you by:
nicost
|
From: Nico S. <nic...@uc...> - 2020-04-30 22:35:58
|
Hi Amit,
That is a beautiful hack! Really cool how the MM channel sliders
continue to operate on the overview window that you created! There is
something funky going on for me, with the channel names and colors
changing when I press the Ch1, 2, or 3 button, hope that can be
mitigated. There is of course a penalty in memory usage and performance
by creating images ~4x as large as needed for each channel, but that
should be fine in the beginning.
As for the crop ("Extract!") button, Micro-Manager does not use an
ImagePlus with ImageStack behind the scene, so your Duplicator command
there does not do what you think it should do.
I would keep a 3 channel Micro-Manager RewritableRAMDatastore as a
global, insert the images you acquire in that store, and then display
that store whenever someone presses the "Extract" button. That allows
the user to save the data in their original format, and - using the gear
icon - also to export to ImageJ as your code does.
The following snippet could guide you:
import org.micromanager.data.Coordinates;
store = mm.data().createRewritableRAMDatastore();
for (int ch=0; ch < 3; ch++) {
mm.getCore().snapImage();
TaggedImage tmp = mm.getCore().getTaggedImage();
Image image = mm.data().convertTaggedImage(tmp);
coords = Coordinates.builder().t(0).z(0).p(0).c(ch).build();
newImg = image.copyAtCoords(coords);
store.putImage(newImg);
}
// to display:
mm.displays().createDisplay(store);
Please do post where you get with this!
The best/final solution to side-by-side displays would be to create a
class implementing DataViewer that does what you are doing here. May not
even be that much work using your approach!
Best,
Nico
On 4/30/2020 5:40 AM, Amit Cherian wrote:
> Background...
> I put together a script to perform a 3-Channel overview window.
> 4 buttons, 3 for channels and 1 to crop. 3 dropdowns showing available
> presets from a predefined group, to assign a preset to each channel button.
> Pressing on of the channel buttons, snaps an image, pushes it to one of the
> quadrants of an Image canvas, 4times the size of the camera resolution. Also
> places a second copy in the bottom right quadrant to show an overlayed view.
> The images is tagged with channel axis position.
> Crop button crops out the original camera resolution from the overview image
> canvas.
>
> The issue I am facing...
> The crop processor crops, but can't seem to do it across the channels. The
> resulting image has the first channel across all the channels. Any advise?
>
> Script attached.
> thanks in advance!
>
> Looking forward to figuring out...
> how to make this into a plugin.
> how to accomplish the same with images from Live stream.
>
> DyMont_GUI-6_20200428.bsh
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__micro-2Dmanager.3463995.n2.nabble.com_file_t396861_DyMont-5FGUI-2D6-5F20200428.bsh&d=DwICAg&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=8mmPZGjKUeNYhA9inPbMjcFuLjjsNKNbMBwe9QzoitU&s=n3FovZ0EhXQJWa7LwP-uLJNtbzNOpINkQPewcCv3D2Y&e= >
>
>
>
>
>
>
> --
> 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=8mmPZGjKUeNYhA9inPbMjcFuLjjsNKNbMBwe9QzoitU&s=kv3XTmQQLk6ker9wsc7BevETavxxcja3J44CJmqi9ro&e=
>
>
> _______________________________________________
> micro-manager-general mailing list
> mic...@li...
> 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=8mmPZGjKUeNYhA9inPbMjcFuLjjsNKNbMBwe9QzoitU&s=e1y_xCBzv0y1qi0dpBaT14scOcOIE4VifqX5baZpwJI&e=
> .
|