[micro-manager-general] Tethered cam and Multi D Acq

0 views
Skip to first unread message

Carlos G Mendioroz

unread,
Feb 17, 2020, 9:25:48 AM2/17/20
to Micro-Manager General
Hi,
I must be doing something very dumb, but I'm lost.
I'm trying to provide a realtime pin intensity graph for a group that is
using a microscope. In order to develop this, I've setup a uManager VM
using a Canon 40D via DSLRRemote.

This sort of works, I can snap, but when I do a time series (using
Multi-D Acq with, say, 10 x 200ms snaps) the resulting ImageJ window
shows 10 identical snaps, even though my "subject" is changing.

When viewing the ImageJ info, it says 1 channel, 1 slice, 1 frame, even
though I acn "play" it at different fps... it's not a stack either.

Help ?

--
Carlos G Mendioroz <tr...@acm.org>


_______________________________________________
micro-manager-general mailing list
micro-mana...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

Carlos G Mendioroz

unread,
Mar 14, 2020, 5:36:46 PM3/14/20
to Micro-Manager General
Carlos G Mendioroz @ 17/02/2020 11:24 -0300 dixit:
> Hi,
> I must be doing something very dumb, but I'm lost.
> I'm trying to provide a realtime pin intensity graph for a group that is
> using a microscope. In order to develop this, I've setup a uManager VM
> using a Canon 40D via DSLRRemote.
>
> This sort of works, I can snap, but when I do a time series (using
> Multi-D Acq with, say, 10 x 200ms snaps) the resulting ImageJ window
> shows 10 identical snaps, even though my "subject" is changing.
>
> When viewing the ImageJ info, it says 1 channel, 1 slice, 1 frame, even
> though I acn "play" it at different fps... it's not a stack either.
>
> Help ?
>

Follow up:
I've tried running a small script (from example) to see what's going on
and I'm puzzled.
Script:
----------------------------------------------------
import ij.ImagePlus;
import org.micromanager.data.Coords;
import org.micromanager.data.Image;
import org.micromanager.data.Datastore;
import org.micromanager.display.DisplayWindow;

//print("Live measurements");
Datastore store = mm.data().createRAMDatastore();
DisplayWindow display = mm.displays().createDisplay(store);
mmc.snapImage();
TaggedImage tmp = mmc.getTaggedImage();
image1 = mm.data().convertTaggedImage(tmp);
image1 = image.copyAtCoords(image.getCoords().copy().channel(0).build());
store.putImage(image1);

mmc.sleep(1000);

mmc.snapImage();
tmp = mmc.getTaggedImage();
image2 = mm.data().convertTaggedImage(tmp);
image2 = image.copyAtCoords(image.getCoords().copy().channel(1).build());
store.putImage(image2);

//store.save(Datastore.SaveMode.MULTIPAGE_TIFF, display);
---------------------------------------------

Granted, I do not know now what is really needed, but:
-store.save() is not recognized as a valid method (from example, not
important)
-when the first snap is taken, I can see it in the display, but when
second snap gets added it somehow replaces #1 too, so I end up with a
store that has two identical images.

Somewhere there is a buffer being reused and store does not create a copy ?

Carlos G Mendioroz

unread,
Mar 19, 2020, 7:39:12 PM3/19/20
to Micro-Manager General
Seems I'm the only one interested in a Canon camera, but for the record,
I'm making progress...

Carlos G Mendioroz @ 14/03/2020 18:34 -0300 dixit:
I've cleaned up my script quite a bit, after RTFM:
---------------------------------------------------
now = 0;
images = mm.live().snap(false);
image = images.get(0);

cbuilder = image.getCoords().copy();
dstore = mm.displays().show(image.copyAtCoords(cbuilder.time(now).build()));

mmc.sleep(5000);

now++;
images = mm.live().snap(false);
image = images.get(0);

dstore.putImage(image.copyAtCoords(cbuilder.time(now).build()));
---------------------------------------------------

(Lesson learned: coord indexes the images on the store, and even though
it has a time dimension (int), it does not like not being a N0 sequence,
i.e. ints starting at 0)

This takes 2 snaps 5 seconds appart. Using the demo camera it works.
Using DSLRremote, the store ends up having 2 time 0 images.

So there is something fishy with DSLRRemote.
Reply all
Reply to author
Forward
0 new messages